Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
PrabhuUdurg committed Jun 20, 2024
2 parents e5d7873 + 32ea825 commit f5b5380
Show file tree
Hide file tree
Showing 26 changed files with 164 additions and 78 deletions.
6 changes: 3 additions & 3 deletions doc/htmldoc/connect_nest/nest_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ consideration, each of the restrictions can be disabled by setting a correspondi
* ``NEST_SERVER_DISABLE_AUTH``: By default, the NEST Server requires a NESTServerAuth tokens. Setting this variable to
``1`` disables this restriction. A token is automatically created and printed to the console by NEST Server upon
start-up. If needed, a custom token can be set using the environment variable ``NEST_SERVER_ACCESS_TOKEN``
* ``NEST_SERVER_CORS_ORIGINS``: By default, the NEST Server only allows requests from localhost (see `CORS
<https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`_). Other hosts can be explicitly allowed by supplying them
in the form `http://host_or_ip:*`` to this variable (By default: http://localhost:*).
* ``NEST_SERVER_CORS_ORIGINS``: By default, the NEST Server only allows requests from localhost (see
`CORS <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`_). Other hosts can be explicitly allowed by supplying them
in the form http://host_or_ip:\* to this variable (By default: http://localhost:\*).
* ``NEST_SERVER_ENABLE_EXEC_CALL``: By default, NEST Server only allows calls to its PyNEST-like API. If the use-case
requires the execution of scripts via the ``/exec`` route, this variable can be set to ``1``. PLEASE BE AWARE THAT
THIS OPENS YOUR COMPUTER TO REMOTE CODE EXECUTION.
Expand Down
2 changes: 1 addition & 1 deletion doc/htmldoc/devices/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All about devices in NEST

.. grid-item-card:: Stimulate the network
:class-title: sd-d-flex-row sd-align-minor-center
:link: stimuate_network
:link: stimulate_network
:link-type: ref

.. grid-item-card:: Get data from simulation
Expand Down
2 changes: 0 additions & 2 deletions doc/htmldoc/get-started_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ More topics
.. toctree::
:hidden:

understand_index

.. |nav| image:: static/img/GPS-Settings-256_nest.svg
.. |script| image:: static/img/script_white.svg
:scale: 20%
Expand Down
72 changes: 54 additions & 18 deletions doc/htmldoc/index.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
Welcome to the NEST Simulator documentation
===========================================


Welcome to the NEST Simulator documentation!
============================================


.. grid::
:gutter: 2

.. grid-item::

NEST is used in computational neuroscience to model and study behavior of large networks of neurons.
.. grid:: 1 1 1 1
:gutter: 2

The models describe single neuron and synapse behavior and their connections.
Different mechanisms of plasticity can be used to investigate artificial learning
and help to shed light on the fundamental principles of how the brain works.
.. grid-item::

NEST is used in computational neuroscience to model and study behavior of large networks of neurons.

NEST offers convenient and efficient commands to define and connect large networks,
ranging from algorithmically determined connections to data-driven connectivity.
Create connections between neurons using numerous synapse models from STDP to gap junctions.
The models describe single neuron and synapse behavior and their connections.
Different mechanisms of plasticity can be used to investigate learning
and help to shed light on the fundamental principles of how the brain works.

.. button-ref:: tutorials_guides
:ref-type: ref
:shadow:
:color: primary
NEST offers convenient and efficient commands to define and connect large networks,
ranging from algorithmically determined connections to data-driven connectivity.
Create connections between neurons using numerous synapse models from STDP to gap junctions.

Start exploring NEST
.. grid-item::

.. button-ref:: tutorials_guides
:ref-type: ref
:shadow:
:color: primary

Start exploring NEST

.. grid-item::

Expand All @@ -47,7 +53,7 @@ Welcome to the NEST Simulator documentation
.. figure:: static/img/astrocyte_interaction.png


Investigate neuron and astrocyte interactions
Inspect neuron and astrocyte interactions


.. figure:: static/img/hpc_benchmark_connectivity.svg
Expand All @@ -58,7 +64,7 @@ Welcome to the NEST Simulator documentation
.. figure:: static/img/pong_sim.gif


Play PONG with NEST
Simulate a game of PONG with NEST

.. figure:: static/img/gapjunctions.png

Expand All @@ -76,6 +82,36 @@ Welcome to the NEST Simulator documentation
Discover all our examples!


How NEST works --- The Big Picture
----------------------------------

.. grid::

.. grid-item::

.. raw:: html

<object data="_static/img/excalidraw_nestconcept_horiz.svg" type="image/svg+xml"></object>


.. grid::

.. grid-item::


A NEST simulation is created with input from :doc:`stimulation devices </models/index_generator>`,
:doc:`neuron models </models/index_neuron>`, and :doc:`synapse models </models/index_synapse>`,
along with :ref:`connection rules <connectivity_concepts>`.
You can choose what data to record with :doc:`recording devices </models/index_recorder>`.
After simulation, the output is ready for analysis with NEST's built in :py:mod:`.raster_plot` and :py:mod:`.voltage_trace`
modules or external tools such as :doc:`Elephant <elephant:index>`.


You can find these components in NEST or you can implement your own custom
models and extend NEST's functionalities using :doc:`NESTML <nestml:index>` and the :doc:`NEST extension module <extmod:index>`, respectively.
Check out our wide-ranging list of :doc:`network model <examples/index>` examples.


.. toctree::
:caption: USAGE
:hidden:
Expand Down
10 changes: 10 additions & 0 deletions doc/htmldoc/neurons/parametrization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ The following parameters and functionalities are provided:
- :ref:`Combination of parameters <combine_ex>`


.. admonition:: Create parameters after setting number of threads!

For correct results, it is essential to create parameter objects
only *after* the number of threads (virtual processes) has been
set. If parameter objects are created first and the number of
threads changed afterwards, this will result incorrect behavior and
possibly a segmentation fault. Unfortunately, NEST cannot currently
detect existing parameter objects when the number of threads change.


.. _random_ex:

Random parameters
Expand Down
4 changes: 2 additions & 2 deletions doc/htmldoc/related_projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ real-time operation.
TheVirtualBrain (TVB)
---------------------

:ref:`TVB <tvb:top_basic>` is a framework for the simulation of the dynamics of large-scale brain networks with
:ref:`TVB <tvb:index>` is a framework for the simulation of the dynamics of large-scale brain networks with
biologically realistic connectivity.

* :ref:`Get started with TVB <tvb:tutorial_0_gettingstarted>`
* :ref:`Get started with TVB <tvb:tutorial_0_GettingStarted>`

ConnPlotter
-----------
Expand Down
34 changes: 26 additions & 8 deletions doc/htmldoc/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ section#kernel-attributes-nest-nestmodule dd {
padding-bottom: 20px !important;
box-shadow: 3px 3px var(--nest-orange) !important;
}


.center {

text-align: center;
font-style: italic;
}
/* Provide a specific height to the svg object on index page
* Reason: Safari does not interpret percentages or max-content
* correctly
* there is an additional @media setting for <768px screens*/
section#welcome-to-the-nest-simulator-documentation object {
height: 400px;
}
/*************************************************************
* Rules for mermaid diagrams
*************************************************************/
Expand All @@ -141,12 +155,6 @@ figure.align-default {
outline-style: groove;
}

.center {

text-align: center;
font-style: italic;
}

/**************************************************************************************
* Rules for carousel
* ***********************************************************************************/
Expand Down Expand Up @@ -212,10 +220,11 @@ div[role="main"] .md-source {
border-radius: 5px;
}
/* Add padding around buttons on index page */
#welcome-to-the-nest-simulator-documentation [data-md-color-primary="orange"] .md-typeset a {
#welcome-to-the-nest-simulator-documentation [data-md-color-primary="orange"] .sd-button {
padding: 6px;
}


.md-typeset details {
background-color: white;
}
Expand Down Expand Up @@ -347,6 +356,11 @@ nav.md-nav.md-nav--secondary label.md-nav__title:after{
font-weight: bold;
display: flex;
align-items: center;

}

#welcome-to-the-nest-simulator-documentation .sd-row-cols-lg-1 > *{
width: 85%;
}

#pynest-examples img.sd-card-img-top {
Expand Down Expand Up @@ -975,7 +989,11 @@ This is for the larger monitors and possibly full screen viewers.
@media only screen and (min-width: 1240px) {
#hero h1{ font-size:2em;}
}

@media only screen and (max-width: 768px) {
section#welcome-to-the-nest-simulator-documentation object {
height: 200px;
}
}
/*
RETINA (2x RESOLUTION DEVICES)
This applies to the retina iPhone (4s) and iPad (2,3) along with
Expand Down
21 changes: 21 additions & 0 deletions doc/htmldoc/static/img/excalidraw_nestconcept_horiz.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/htmldoc/synapses/synapse_specification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Array parameters

Array parameters can be used with the rules ``one_to_one``, ``all_to_all``,
``fixed_total_number``, ``fixed_indegree``, and ``fixed_outdegree``.
For details on connection rules, see :ref:`connectivity_concept`.
For details on connection rules, see :ref:`connectivity_concepts`.
The arrays can be specified as NumPy arrays or Python
lists. As with the scalar parameters, all parameters have to be
specified as arrays of the correct type.
Expand Down
7 changes: 7 additions & 0 deletions models/amat2_psc_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ The following parameters can be set in the status dictionary:
implementation to avoid a degenerate case of the ODE describing the
model [1]_. For very similar values, numerics will be unstable.
- Some parameter values given in Table 1 of [4]_ are incorrect. For
correct values, see Table 4 of [5]_.
References
++++++++++
Expand All @@ -147,6 +150,10 @@ References
for reproducing diverse firing patterns and predicting precise
firing times. Frontiers in Computational Neuroscience, 5:42.
DOI: https://doi.org/10.3389/fncom.2011.00042
.. [5] Heiberg T, Kriener B, Tetzlaff T, Einevoll GT, Plesser HE (2018).
Firing-rate model for neurons with a broad repertoire of spiking behaviors.
J Comput Neurosci, 45:103.
DOI: https://doi.org/10.1007/s10827-018-0693-9
Sends
+++++
Expand Down
2 changes: 1 addition & 1 deletion models/hh_cond_beta_gap_traub.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Postsynaptic currents
Incoming spike events induce a postsynaptic change of conductance modelled by a
beta function as outlined in [4]_ [5]_. The beta function is normalized such that an
event of weight 1.0 results in a peak current of 1 nS at :math:`t = \tau_{rise,xx}`
event of weight 1.0 results in a peak conductance of 1 nS at :math:`t = \tau_{rise,xx}`
where xx is `ex` or `in`.
Spike Detection
Expand Down
2 changes: 1 addition & 1 deletion models/iaf_cond_alpha.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Description
``iaf_cond_alpha`` is an implementation of a spiking neuron using IAF dynamics with
conductance-based synapses. Incoming spike events induce a postsynaptic change
of conductance modelled by an alpha function. The alpha function
is normalized such that an event of weight 1.0 results in a peak current of 1 nS
is normalized such that an event of weight 1.0 results in a peak conductance of 1 nS
at :math:`t = \tau_{syn}`.
See also [1]_, [2]_, [3]_.
Expand Down
2 changes: 1 addition & 1 deletion models/iaf_cond_exp_sfa_rr.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spike-frequency adaptation and relative refractory mechanisms as described in
Incoming spike events induce a postsynaptic change of conductance modelled by
an exponential function. The exponential function is normalized such that an
event of weight 1.0 results in a peak current of 1 nS.
event of weight 1.0 results in a peak conductance of 1 nS.
Outgoing spike events induce a change of the adaptation and relative refractory
conductances by ``q_sfa`` and ``q_rr``, respectively. Otherwise these conductances
Expand Down
4 changes: 4 additions & 0 deletions models/iaf_psc_delta.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ hyperpolarization to biophysically plausible values, set parameter
.. note::
NEST uses exact integration [1]_, [2]_ to integrate subthreshold membrane
dynamics.
Spikes arriving while the neuron is refractory, are discarded by
default. If the property ``refractory_input`` is set to True, such
spikes are added to the membrane potential at the end of the
Expand Down
2 changes: 1 addition & 1 deletion nestkernel/recording_backend_ascii.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ each MPI process. This can cause a high load on the file system in
large simulations. This backend can become prohibitively inefficient,
particularly on machines with distributed filesystems. In case you
experience such scaling problems, the :doc:`recording backend for
SIONlib <recording_backend_sionlib>` may be a possible alternative.
SIONlib </models/recording_backend_sionlib>` may be a possible alternative.
Filenames of data files are determined according to the following
pattern:
Expand Down
2 changes: 1 addition & 1 deletion nestkernel/recording_backend_sionlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ a binary container file (or to a rather small set of such files). This
is especially useful for large-scale simulations running in a
distributed way on many MPI processes/OpenMP threads. In such usage
scenarios, writing to plain text files (see :doc:`recording backend
for ASCII files <recording_backend_ascii>`) would cause a large
for ASCII files </models/recording_backend_ascii>`) would cause a large
overhead because of the huge number of generated files and thus be
very inefficient.
Expand Down
16 changes: 8 additions & 8 deletions pynest/examples/EI_clustered_network/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ If you use this code, we ask you to cite the paper by Rostami et al. [1]_ and th
File structure
--------------

* :doc:`run_simulation.py <run_simulation>`: an example script to try out the EI-clustered circuit model
* :doc:`network.py <network>`: the main ``Network`` class with functions to build and simulate the network
* :doc:`helper.py <helper>`: helper functions for calculation of synaptic weights and currents and plot function for raster plots
* :doc:`network_params.py <network_params>`: network and neuron parameters
* :doc:`stimulus_params.py <stimulus_params>`: parameters for optional external stimulation
* :doc:`sim_params.py <sim_params>`: simulation parameters
* :doc:`run_simulation_EI.py <run_simulation_EI>`: an example script to try out the EI-clustered circuit model
* :doc:`network_EI.py <network_EI>`: the main ``Network`` class with functions to build and simulate the network
* :doc:`helper_EI.py <helper_EI>`: helper functions for calculation of synaptic weights and currents and plot function for raster plots
* :doc:`network_params_EI.py <network_params_EI>`: network and neuron parameters
* :doc:`stimulus_params_EI.py <stimulus_params_EI>`: parameters for optional external stimulation
* :doc:`sim_params_EI.py <sim_params_EI>`: simulation parameters

Running the simulation
----------------------

.. code-block:: bash
python run_simulation.py
python run_simulation_EI.py
A raster plot of the network activity is saved as ``clustered_ei_raster.png``.

The code can be parallelized by using multiple threads during the NEST simulation.
This can be done by setting the parameter ``n_vp`` in the ``run_simulation.py`` script.
This can be done by setting the parameter ``n_vp`` in the ``run_simulation_EI.py`` script.

Contributions to this PyNEST model implementation
-------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# helper.py
# helper_EI.py
#
# This file is part of NEST.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# network.py
# network_EI.py
#
# This file is part of NEST.
#
Expand Down Expand Up @@ -58,8 +58,8 @@ class ClusteredNetwork:
def __init__(self, sim_dict, net_dict, stim_dict):
"""Initialize the ClusteredNetwork object.
Parameters are given and explained in the files network_params.py,
sim_params.py and stimulus_params.py.
Parameters are given and explained in the files network_params_EI.py,
sim_params_EI.py and stimulus_params_EI.py.
Parameters
----------
Expand Down
Loading

0 comments on commit f5b5380

Please sign in to comment.