You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* restructure toward unified docs
* removed n. reference in HOC for ions and elsewhere
* another n. fix
* optimization, compilation options, and main progref link
* C++ snippet in compilationoptions wasn't labeled as such
* removed :hoc:
* unified rxd docs, export no longer requires a special import
Also some minor cleanups to export code
* change all `:hoc:` to :
* rst parsing is now tab-aware
* doc handling fixes: whitespace, functions, tests
* typo fix
* h->n in HOC rxd example
---------
Co-authored-by: Rie Sakai <riemy1689@gmail.com>
Copy file name to clipboardExpand all lines: docs/courses/artificial_cells_neuron.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,12 @@ NEURON has four built-in point process classes which can be used to construct ar
16
16
`NetStim <https://nrn.readthedocs.io/en/latest/python/modelspec/programmatic/mechanisms/mech.html?highlight=netstim#NetStim>`_ produces a user-specified train of one or more output events, and can also be triggered by input events
17
17
18
18
2.
19
-
:hoc:class:`IntFire1`, which acts like a leaky integrator driven by delta function inputs. That is, the state variable m decays exponentially toward 0.
19
+
:class:`IntFire1`, which acts like a leaky integrator driven by delta function inputs. That is, the state variable m decays exponentially toward 0.
20
20
Arrival of an event with weight w causes an abrupt change in m.
21
21
If m exceeds 1, an output event is generated and the cell enters a refractory period during which it ignores further inputs. At the end of the refractory period, m is reset to 0 and the cell becomes responsive to new inputs.
22
22
23
23
3.
24
-
:hoc:class:`IntFire2`, a leaky integrator with time constant taum driven by a total current that is the sum of
24
+
:class:`IntFire2`, a leaky integrator with time constant taum driven by a total current that is the sum of
25
25
26
26
{ a user-settable constant "bias" current }
27
27
@@ -31,7 +31,7 @@ NEURON has four built-in point process classes which can be used to construct ar
31
31
32
32
Net synaptic current decays toward 0 with time constant taus, where taus > taum (synaptic current decays slowly compared to the rate at which "membrane potential" m equilibrates). When an input event with weight w arrives, the net synaptic current changes abruptly by the amount w.
33
33
34
-
4. :hoc:class:`IntFire4`, with fast excitation current (rises abruptly, decays exponentially) and slower alpha function like inhibition current that is integrated by even slower membrane.
34
+
4. :class:`IntFire4`, with fast excitation current (rises abruptly, decays exponentially) and slower alpha function like inhibition current that is integrated by even slower membrane.
35
35
36
36
NEURON requires that all point processes be located in a section. To meet this (in this context, conceptually irrelevant) requirement, the Network Builder tool locates each point process of its instantiated artificial cells in the dummy section called ``acell_home_``
Copy file name to clipboardExpand all lines: docs/courses/hoc_exercises.rst
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,7 +195,7 @@ Must declare an object reference (=object variable) before making an object
195
195
196
196
Objref: manipulate references to objects, not the objects themselves
197
197
198
-
- often names are chosen that make it easy to remember what an object reference is to be used for (eg g for a :hoc:class:`Graph` or vec for a :hoc:class:`Vector`) but it's important to remember that these are just for convenience and that any object reference can be used to point to any kind of object
198
+
- often names are chosen that make it easy to remember what an object reference is to be used for (eg g for a :class:`Graph` or vec for a :class:`Vector`) but it's important to remember that these are just for convenience and that any object reference can be used to point to any kind of object
199
199
200
200
Objects include vectors, graphs, lists, ...
201
201
###########################################
@@ -261,7 +261,7 @@ Lists are useful for maintaining pointers to objects so that they are maintained
261
261
262
262
1. Make vec point to a new vector. Print out and record its identity (``print vec``). Now print using the object name (ie print Vector[#] with the right #). This confirms that the object exists. Destroy the object by reinitializing the vec reference. Now try to print using the object name. What does it say.
263
263
264
-
2. As in Exercise 1: make vec point to a new :hoc:class:`Vector` and use print to find the vector name. Make XO a reference to a new list. Append the vector to the list: {XO.append(vec). Now dereference vec as in Exercise 1. Print out the object by name and confirm that it still exists. Even though the original objref is gone, it is still pointed to by the list.
264
+
2. As in Exercise 1: make vec point to a new :class:`Vector` and use print to find the vector name. Make XO a reference to a new list. Append the vector to the list: {XO.append(vec). Now dereference vec as in Exercise 1. Print out the object by name and confirm that it still exists. Even though the original objref is gone, it is still pointed to by the list.
265
265
266
266
3. Identify the vector on the list: (``print XO.object(0)``). Remove the vector from the list (``print XO.remove(0)``). Confirm that this vector no longer exists.
267
267
@@ -423,12 +423,12 @@ Graph
423
423
424
424
.. seealso::
425
425
426
-
:hoc:class:`Graph`
426
+
:class:`Graph`
427
427
428
428
Exercises
429
429
#########
430
430
431
-
1. write ``proc`` that draws a colored line ($1) from (0, 0) to given coordinate ($2, $3) assume g is a :hoc:class:`Graph` object
431
+
1. write ``proc`` that draws a colored line ($1) from (0, 0) to given coordinate ($2, $3) assume g is a :class:`Graph` object
432
432
433
433
2. write a ``proc`` that puts up two new graphs
434
434
@@ -467,15 +467,15 @@ Vector
467
467
468
468
.. seealso::
469
469
470
-
:hoc:class:`Vector`
470
+
:class:`Vector`
471
471
472
472
Exercises
473
473
#########
474
474
475
475
1.
476
476
Write a ``proc`` to make ``$o1`` vec elements the product of $o2*$o3 elements
477
477
478
-
(Use :hoc:meth:`Vector.resize` to get ``$o1`` to right size; generate error if sizes wrong e.g. ``if ($o2.size!=$o3.size) { print "ERROR: wrong sizes" return }``)
478
+
(Use :meth:`Vector.resize` to get ``$o1`` to right size; generate error if sizes wrong e.g. ``if ($o2.size!=$o3.size) { print "ERROR: wrong sizes" return }``)
479
479
480
480
2.
481
481
Graph vector values: ``vec.line(g, 1)`` or ``vec.mark(g, 1)``
@@ -487,7 +487,7 @@ Exercises
487
487
4.
488
488
Write a ``proc`` to multiply the elements of a vector by sequential values from ``1`` to ``size-1``
489
489
490
-
Hint: use :hoc:meth:`vec.resize <Vector.resize>`, :hoc:meth:`vec.indgen <Vector.indgen>`, :hoc:meth:`vec.mul <Vector.mul>`
490
+
Hint: use :meth:`vec.resize <Vector.resize>`, :meth:`vec.indgen <Vector.indgen>`, :meth:`vec.mul <Vector.mul>`
491
491
492
492
File
493
493
~~~~
@@ -517,7 +517,7 @@ File
517
517
518
518
.. seealso::
519
519
520
-
:hoc:class:`File`
520
+
:class:`File`
521
521
522
522
Exercises
523
523
#########
@@ -554,7 +554,7 @@ List
554
554
555
555
.. seealso::
556
556
557
-
:hoc:class:`List`
557
+
:class:`List`
558
558
559
559
Exercises
560
560
#########
@@ -621,7 +621,7 @@ Recording the simulation
621
621
622
622
.. seealso::
623
623
624
-
:hoc:meth:`Vector.record`
624
+
:meth:`Vector.record`
625
625
626
626
Graphing and analyzing data
627
627
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -669,5 +669,5 @@ Roll your own GUI
669
669
Exercise
670
670
########
671
671
672
-
1. put up panel to run sim and display (in an :hoc:func:`xvalue`) the average frequency
672
+
1. put up panel to run sim and display (in an :func:`xvalue`) the average frequency
Copy file name to clipboardExpand all lines: docs/courses/hopfield_brody_network_in_python.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Although this is a minimal model, learning the ropes is still difficult. Therefo
9
9
10
10
As you know, NEURON is optimized to handle the complex channel and compartment simulations that have been omitted from this exercise. The interested student might wish to convert this network into a network of spiking cells with realistic inhibitory interactions or a hybrid network with both realistic and artificial cells. Such an extended exercise would more clearly demonstrate NEURON's advantages for performing network simulations.
11
11
12
-
Standard intfire implementation (eg :hoc:class:`IntFire1` from ``intfire1.mod``))
12
+
Standard intfire implementation (eg :class:`IntFire1` from ``intfire1.mod``))
Copy file name to clipboardExpand all lines: docs/guide/faq.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -293,12 +293,12 @@ pulsedistrib also contains :download:`data/ipulse3.mod`, :download:`data/ipulse3
293
293
I want a current clamp that will generate a pulse when I send it an event, or that I can use to produce pulses at precalculated times.
294
294
-----------------------
295
295
296
-
Then get `pulsedistrib.zip <http://www.neuron.yale.edu/neuron/static/docs/repstim/pulsedistrib.zip>`_, and unzip it. Inside the pulsedistrib subdirectory you'll find :download:`data/ipulse3.mod`, :download:`data/ipulse3rig.ses`, and :download:`data/test_3.hoc` (and some other files that pertain to the previous question). :download:`data/ipulse3.mod` contains the NMODL code for a current clamp that produces a current pulse when it receives an input event. :download:`data/test_3.hoc` is a simple demo of the Ipulse3 mechanism, and :download:`data/ipulse3rig.ses` is used by :download:`data/test_3.hoc` to create the GUI for a demo of Ipulse3. It uses a :hoc:class:`NetStim` to generate the events that drive the Ipulse3. If you want to drive an Ipulse3 with recorded or precomputed event times, use the VecStim class as described under the topic `Driving a synapse with recorded or precomputed spike events <https://www.neuron.yale.edu/phpBB/viewtopic.php?f=28&t=2117>`_ in the "Hot tips" area of the `NEURON Forum <https://www.neuron.yale.edu/phpBB/>`_.
296
+
Then get `pulsedistrib.zip <http://www.neuron.yale.edu/neuron/static/docs/repstim/pulsedistrib.zip>`_, and unzip it. Inside the pulsedistrib subdirectory you'll find :download:`data/ipulse3.mod`, :download:`data/ipulse3rig.ses`, and :download:`data/test_3.hoc` (and some other files that pertain to the previous question). :download:`data/ipulse3.mod` contains the NMODL code for a current clamp that produces a current pulse when it receives an input event. :download:`data/test_3.hoc` is a simple demo of the Ipulse3 mechanism, and :download:`data/ipulse3rig.ses` is used by :download:`data/test_3.hoc` to create the GUI for a demo of Ipulse3. It uses a :class:`NetStim` to generate the events that drive the Ipulse3. If you want to drive an Ipulse3 with recorded or precomputed event times, use the VecStim class as described under the topic `Driving a synapse with recorded or precomputed spike events <https://www.neuron.yale.edu/phpBB/viewtopic.php?f=28&t=2117>`_ in the "Hot tips" area of the `NEURON Forum <https://www.neuron.yale.edu/phpBB/>`_.
297
297
298
298
I have a set of recorded or calculated spike times. How can I use these to drive a postsynaptic mechanism?
299
299
------------------------
300
300
301
-
Assuming that your synaptic mechanism has a ``NET_RECEIVE`` block, so that it is driven by events delivered by a :hoc:class:`NetCon`, I can think of two ways this might be done. Which one to use depends on how many calculated spike times you are dealing with.
301
+
Assuming that your synaptic mechanism has a ``NET_RECEIVE`` block, so that it is driven by events delivered by a :class:`NetCon`, I can think of two ways this might be done. Which one to use depends on how many calculated spike times you are dealing with.
302
302
303
303
If you only have a "few" spikes (up to a few dozen), you could just dump them into the spike queue at the onset of the simulation. Here's how:
Copy file name to clipboardExpand all lines: docs/guide/hoc_chapter_11_old_reference.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ When NEURON is installed, four programs are constructed from the combinations of
31
31
32
32
**ivoc**
33
33
34
-
OC with C++ classes and graphical interface (which is written in C++). This is the best starting place for building non-neural applications. These C++ classes are implemented in :file:`ivoc/SRC`. The files here are of general use apart from the neuron simulation domain and generally implement the graphical interface, eg. :hoc:class:`Graph`, :hoc:func:`xpanel`, :hoc:class:`VBox`, etc. However the :hoc:class:`File`, :hoc:class:`List`, :hoc:class:`Vector`, and :hoc:class:`Random` class are very useful even if no window manager is present.
34
+
OC with C++ classes and graphical interface (which is written in C++). This is the best starting place for building non-neural applications. These C++ classes are implemented in :file:`ivoc/SRC`. The files here are of general use apart from the neuron simulation domain and generally implement the graphical interface, eg. :class:`Graph`, :func:`xpanel`, :class:`VBox`, etc. However the :class:`File`, :class:`List`, :class:`Vector`, and :class:`Random` class are very useful even if no window manager is present.
35
35
36
36
**nrniv**
37
37
@@ -360,7 +360,7 @@ Names introduced by nrnoc
360
360
VClamp SVClamp IClamp AlphaSynapse
361
361
APCount
362
362
363
-
Missing from the above list are the built-in object classes such as :hoc:class:`List`, :hoc:class:`Graph`, :hoc:class:`HBox`, :hoc:class:`File`, :hoc:class:`Deck`, :hoc:class:`Random`, :hoc:class:`Vector` and some new functions such as :hoc:class:`fit\_praxis`, :hoc:class:`xmenu`, :hoc:class:`xbutton`, etc, as well as neuron specific classes such as :hoc:class:`Shape`, :hoc:class:`SectionList`, etc. The help files in :hoc:class:`NEURONHOME/lib/help` are kept up to date but this file tends to lag behind the current version.
363
+
Missing from the above list are the built-in object classes such as :class:`List`, :class:`Graph`, :class:`HBox`, :class:`File`, :class:`Deck`, :class:`Random`, :class:`Vector` and some new functions such as :class:`fit\_praxis`, :class:`xmenu`, :class:`xbutton`, etc, as well as neuron specific classes such as :class:`Shape`, :class:`SectionList`, etc. The help files in :class:`NEURONHOME/lib/help` are kept up to date but this file tends to lag behind the current version.
364
364
365
365
Variables
366
366
---------
@@ -612,7 +612,7 @@ As a trivial example of a function definition, consider:
612
612
return $1 * $1
613
613
}
614
614
615
-
This defines the function :hoc:class:`f(arg1)` which returns the square of its argument. User defined functions can be used in any expression.
615
+
This defines the function :class:`f(arg1)` which returns the square of its argument. User defined functions can be used in any expression.
616
616
617
617
Functions can be called recursively. For example, the factorial function, can be defined as
Copy file name to clipboardExpand all lines: docs/guide/optimization2.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -328,7 +328,7 @@ Then we write our own custom ``init()`` procedure that uses a forall loop to giv
328
328
329
329
To simplify future code maintenance, we probably should put both of these code fragments into a single file called :file:`params.hoc`.
330
330
331
-
To make use of :file:`params.hoc`, we have to add a new :hoc:func:`load_file` statement to :file:`init_iclampopt.hoc`. The proxy variables have to exist before the MRF can use them, so :file:`params.hoc` must be loaded before :file:`iclampfit.ses`. Here's the new :file:`init_iclampopt.hoc` :
331
+
To make use of :file:`params.hoc`, we have to add a new :func:`load_file` statement to :file:`init_iclampopt.hoc`. The proxy variables have to exist before the MRF can use them, so :file:`params.hoc` must be loaded before :file:`iclampfit.ses`. Here's the new :file:`init_iclampopt.hoc` :
0 commit comments