Skip to content

Commit 7b90fc3

Browse files
committed
fixing links in autodocs
1 parent ab9339a commit 7b90fc3

File tree

7 files changed

+236
-181
lines changed

7 files changed

+236
-181
lines changed

docs/autodocs/source/analyzer.rst

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ Analyzing the Results
66

77
After a simulation has completed BMTK will automatically save the results to the output folder. It is possible to have
88
BMTK read and analyze the results before the simulation has exited but usually not required. The type of results saved
9-
during the simulation is determined by the “reports” section of the simulation config [LINK]. But most commonly it is a
10-
spikes-trains file, a cell-variable report, an extracellular potential recording, and in the case of PopNet a report of
11-
the firing rate dynamics.
9+
during the simulation is determined by the “reports” section of the `simulation config <./simulators.html#configuration-files>`_.
10+
But most commonly it is a spikes-trains file, a cell-variable report, an extracellular potential recording, and in the
11+
case of PopNet a report of the firing rate dynamics.
1212

13-
The output files follow the SONATA Data format [LINK], and tools like pySONATA [LINK] or libSONATA [link] can be used
14-
to read them. The following consists of a high-level overview of these different formats and how you can use BMTK to
15-
find the results.
13+
The output files follow the `SONATA Data format <https://github.com/AllenInstitute/sonata>`_, and tools like
14+
`pySONATA <https://github.com/AllenInstitute/sonata/tree/master/src/pysonata>`_ or
15+
`libSONATA <https://github.com/BlueBrain/libsonata>`_ can be used to read them. The following consists of a high-level
16+
overview of these different formats and how you can use BMTK to find the results.
1617

1718

1819
Spike-Trains
@@ -32,7 +33,8 @@ sorted (default none). There is also an optional attribute “units” for the t
3233

3334
Reading
3435
+++++++
35-
You can use the SpikeTrains [LINK] class to load a sonata spikes files (or csv or nwb) into memory:
36+
You can use the :py:class:`SpikeTrains <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI>` class to load
37+
a sonata spikes files (or csv or nwb) into memory:
3638

3739
.. code:: python
3840
@@ -44,14 +46,17 @@ You can use the SpikeTrains [LINK] class to load a sonata spikes files (or csv o
4446
print(spikes.n_spikes())
4547
print(spikes.node_ids())
4648
47-
If you know what node you want use the ``get_times`` method to return an array of all spikes for a single node
49+
If you know what node you want use the :py:meth:`get_times() <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI.get_times>`
50+
method to return an array of all spikes for a single node
4851

4952
.. code:: python
5053
5154
node0_times = spikes.get_times(node_id=0)
5255
print(node0_times)
5356
54-
Otherwise you can use the ``to_dataframe`` or ``spikes`` method to get a list of all node_ids + timestamps
57+
Otherwise you can use the :py:meth:`to_dataframe() <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI.to_dataframe>`
58+
or :py:meth:`spikes() <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI.spikes>` method to get a list of
59+
all node_ids plus timestamps
5560

5661
.. code:: python
5762
@@ -77,7 +82,9 @@ Creating Spike Trains
7782
Commonly it’s necessary to generate spike-trains to use as inputs for a simulation. One option is to use FilterNet to
7883
generate inputs from external stimuli. You can also use the output of one simulation as the input to the next. But if
7984
you need to generate your own spike files, in property SONATA format, BMTK provides two ways of readily doing so. One
80-
is to user the ``SpikeTrains`` [LINK] class’s ``add_spikes`` or ``add_spike`` method:
85+
is to use the :py:class:`SpikeTrains <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI>` class
86+
:py:meth:`add_spikes() <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI.add_spikes>` or
87+
:py:meth:`add_spike() <bmtk.utils.reports.spike_trains.spike_trains_api.SpikeTrainsAPI.add_spike>` method:
8188

8289
.. code:: python
8390
@@ -89,7 +96,7 @@ is to user the ``SpikeTrains`` [LINK] class’s ``add_spikes`` or ``add_spike``
8996
timestamps=[0.5, 0.9, 1.0, 1.0])
9097
9198
92-
Or use the ``PoissonSpikeGenerator`` class
99+
Or use the :py:class:`PoissonSpikeGenerator <bmtk.utils.reports.spike_trains.spike_trains.PoissonSpikeGenerator>` class
93100

94101
.. code:: python
95102
@@ -128,11 +135,12 @@ used:
128135

129136
Reading Cell Variables
130137
++++++++++++++++++++++
131-
The ``CompartmentReport`` class should be used to pull data from a cell report.
138+
The :py:class:`CompartmentReport <bmtk.utils.reports.compartment.core.CompartmentReaderABC>` class should be used to
139+
pull data from a cell report.
132140

133141
.. code:: python
134142
135-
bmtk.utils.reports.compartments import CompartmentReport
143+
bmtk.utils.reports.compartment import CompartmentReport
136144
137145
pop_name = ...
138146
report = CompartmentReport('output/membrane_vm.h5',

docs/autodocs/source/bionet.rst

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ large-scale networks of multicompartmental neurons. Some of its main features in
99

1010
* Automatically integrates MPI for parallel simulations without the need of extra coding.
1111

12-
* Supports models and morphologies from the Allen `Cell-Types Database <http://celltypes.brain-map.org/data>`_, as well as custom hoc and NeuroML2 cell and synapse models.
12+
* Supports models and morphologies from the Allen `Cell-Types Database <http://celltypes.brain-map.org/data>`_, as well
13+
as custom hoc and NeuroML2 cell and synapse models.
1314

1415
* Use spike-trains, synaptic connections, current clamps or even extracellular stimulation to drive network firing.
1516

@@ -18,15 +19,16 @@ large-scale networks of multicompartmental neurons. Some of its main features in
1819

1920
Inputs
2021
--------
21-
Inputs can be specified in the “inputs” sections of the simulation config [LINK], following the rules specified in the
22-
SONATA Data format [LINK].
22+
Inputs can be specified in the “inputs” sections of the `simulation config <./simulators.html#configuration-files>`_,
23+
following the rules specified in the `SONATA Data format <https://github.com/AllenInstitute/sonata>`_.
2324

2425
Spike-Trains
2526
+++++++++
2627
The modeler may wish to have certain cells in the circuit generate a pre-arranged series of spikes to drive the network.
2728
These cells must have ``model_type`` value ``virtual`` and are not actual cell objects (you can’t record from them). You
28-
may use either a SONATA Spike-Train file [LINK], an NWB file, or a space-separated csv file with columns “node_id”,
29-
“population”, and “timestamps”. The following shows some examples of how to generate spike-train files using bmtk [LINK].
29+
may use either a `SONATA spike file <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md#spike-file>`_,
30+
an NWB file, or a space-separated csv file with columns **node_id**, **population**, and **timestamps**. The following
31+
shows some examples of how to generate `spike-train files using bmtk <./analyzer.html#creating-spike-trains>`_.
3032

3133
.. code:: json
3234
@@ -41,7 +43,7 @@ may use either a SONATA Spike-Train file [LINK], an NWB file, or a space-separat
4143
4244
* module: either sonata, hdf5, csv, or nwb: depending on the format of the spikes file
4345

44-
* node_set [LINK]: used to filter which cells will receive the inputs
46+
* `node_set <./simulators.html#node-sets>`_: used to filter which cells will receive the inputs
4547

4648
* input_file: path to file contain spike-trains for one or mode node
4749

@@ -66,7 +68,7 @@ only support injections at the soma.
6668
}
6769
6870
* module: Always IClamp
69-
* node_set [LINK]: used to filter which cells will receive the inputs
71+
* `node_set <./simulators.html#node-sets>`_: used to filter which cells will receive the inputs
7072
* amp: injection in pA
7173
* delay: onset of current injection in ms
7274
* duration: duration of current injection in ms
@@ -105,7 +107,7 @@ And in the configuration file
105107
}
106108
107109
* module: Always xstim
108-
* node_set [LINK]: used to filter which cells will receive the inputs
110+
* `node_set <./simulators.html#node-sets>`_: used to filter which cells will receive the inputs
109111
* positions_file: onset of current injection in ms
110112
* waveform: form on the input, requires arguments “shape”, “amp” (in pA), “del” (delay in ms) and “dur” (duration in ms). Shape may either be “dc” or “sin” (with optional arguments “freq”, “phase” and “offset”)
111113

@@ -126,7 +128,8 @@ cell.
126128
Membrane and Intracellular Variables
127129
++++++++++++++++++++++++++++++++++++
128130
Used to record the time trace of specific cell variables, usually the membrane potential (v). For multi-compartmental
129-
cells the report can record from any segment that contains mechanics for the desired variable. See SONATA docs [LINK]
131+
cells the report can record from any segment that contains mechanics for the desired variable. See
132+
`SONATA docs <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md#simulation-output---reports>`_
130133
for more information about how multi-segment recordings are represented.
131134

132135
.. code:: json
@@ -149,7 +152,7 @@ for more information about how multi-segment recordings are represented.
149152
}
150153
151154
* variable_name: name of variable being recorded, will depend on the cell model
152-
* cells: a node_set [LINK] to filter out what cells to record.
155+
* cells: a `node_set <./simulators.html#node-sets>`_ to filter out what cells to record.
153156
* sections: either “all”, “soma”, “basal” or “apical”
154157
* file_name: name of file where traces will be recorded, under the “output_dir”. If not specified the the report title
155158
will be used, eg “calcium_concentration.h5” and “membrane_potential.h5”
@@ -161,7 +164,9 @@ for more information about how multi-segment recordings are represented.
161164

162165
Extracellular Potential
163166
+++++++++++++++++++++++
164-
Will simulate recording from an extracellular electrode placed in the neuropil. See SONATA documentation [LINK]. Requires a space-separated csv file to specify the location of each recording channel:
167+
Will simulate recording from an extracellular electrode placed in the neuropil. See
168+
`SONATA documentation <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md#extracellular-report>`_.
169+
Requires a space-separated csv file to specify the location of each recording channel:
165170

166171
.. code::
167172
:name: ./components/xelectrode/linear_probe.csv
@@ -188,7 +193,7 @@ And in the config
188193
}
189194
}
190195
191-
* cells: a node_set [LINK] to filter out what cells will contribute to the ecp.
196+
* cells: a `node_set <./simulators.html#node-sets>`_ to filter out what cells will contribute to the ecp.
192197
* variable_name: name of contributing variable, v for membrane potential
193198
* electrode_positions: name of electrode placement file
194199
* contributions_dir: The output ecp file will contain the combined contributes from all cells and not possible to
@@ -199,8 +204,9 @@ And in the config
199204
Synaptic Variables
200205
++++++++++++++++++
201206
Similar to recording from membrane potential, by setting ``module`` parameter to ``netcon_report`` you can record the
202-
variables from a synapse. The output is similar to a SONATA membrane report [LINK], but instead of each column being a
203-
segment of a neuron, each column represents a different synapses.
207+
variables from a synapse. The output is similar to a
208+
`SONATA membrane report <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md#frame-oriented-node-element-recordings>`_,
209+
but instead of each column being a segment of a neuron, each column represents a different synapses.
204210

205211
.. code:: json
206212
@@ -221,8 +227,9 @@ Advanced Options
221227

222228
Specifying Synapse locations
223229
++++++++++++++++++++++++++++
224-
In SONATA the location of each synapse is determined by the "section_id" and "section_x" values [LINK], which requires
225-
modelers to know how NEURON parses the morphology of each cell. If these parameters are specified in the edges file
230+
In SONATA the location of each synapse is determined by the
231+
`"afferent_section_id" and "afferent_section_pos"attributes <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md#edges---required-attributes>`_,
232+
which requires modelers to know how NEURON parses the morphology of each cell. If these parameters are specified in the edges file
226233
SONATA will use them to place a synapse on the target.
227234

228235
Alternatively BMTK supports the option parameters “distance_range" and “target_sections”, which if present in the edges

0 commit comments

Comments
 (0)