Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _how_do_i_plot_something_other_than_membrane_potential:

How do I plot something other than membrane potential?
------------------------------------------------------

Use the :ref:`Plot what? <using_plotwhat_to_specify_a_variable_to_be_plotted>` tool

9 changes: 9 additions & 0 deletions docs/guide/How_do_I_save_and_edit_figures.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _how_do_i_save_and_edit_figures:

How do I save and edit figures?
-------------------------------

The quick and dirty way is to capture screen images as bitmaps. The results are suitable for posting on WWW sites but resolution is generally too low for publication or grant proposals, and editing is a pain. For highest quality, PostScript is best. Use the Print & File Window Manager (PFWM) to save the graphs you want to an Idraw file. This is an encapsulated PostScript format that can be edited by idraw, which comes with the UNIX/Linux version of NEURON. It can also be imported by many draw programs, e.g. CorelDraw.

To learn more, :ref:`see this tutorial <working_with_postscript_and_idraw_figures>` from the NEURON Summer Course.

7 changes: 7 additions & 0 deletions docs/guide/can_i_edit_it.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _can_i_edit_it:

What is a ses (session) file? Can I edit it?
------------

A session file is a plain text file that contains hoc statements that will recreate the windows that were saved to it. It is often quite informative to examine the contents of a ses file, and sometimes it is very useful to change the file's contents with a text editor. :ref:`Read this <>` for more information.

7 changes: 7 additions & 0 deletions docs/guide/change-bg-color-neuron.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _change-bg-color-neuron:

How do I change the background color used in NEURON's shape plots and other graphs?
-------------------------------------------------------------------------------

Edit the :ref:`nrn.defaults <nrn_defaults>` file

7 changes: 7 additions & 0 deletions docs/guide/change-color-scale-shape-plots.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _change-color-scale-shape-plots:

How do I change the color scale used in shape plots?
---------------------------------------------------

:ref:`Create a file that specifies the desired RGB values. <nrn_defaults>`

9 changes: 9 additions & 0 deletions docs/guide/compile-mod-files.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _compile-mod-files:

How do I compile mod files?
--------------------------

If the folder with your NEURON scripts (HOC or Python) is the same as the folder with the mod files, open it in a terminal and type ``nrnivmodl``. You can also specify paths; e.g. if all the mod files are in a subfolder called ``mod`` but you're running NEURON from the current folder, type ``nrnivmodl mod``.

Windows and Mac also provide graphical tools that can be used to compile mod files.

7 changes: 7 additions & 0 deletions docs/guide/current-clamp-event-pulse.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _current-clamp-event-pulse:

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.
-------------------------------------------------------------------------------------------------------------

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/>`_.

9 changes: 9 additions & 0 deletions docs/guide/current-clamp-pulse-sequence.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _current-clamp-pulse-sequence:

I just want a current clamp that will deliver a sequence of current pulses at regular intervals. Vector play seems like overkill for this.
-------------------------------------------------------------------------------------------------------------

Right you are. Pick up `pulsedistrib.zip <http://www.neuron.yale.edu/neuron/static/docs/repstim/pulsedistrib.zip>`_, and unzip it into an empty directory. This creates a subdirectory called pulsedistrib, which contains :download:`data/Ipulse1.mod`, :download:`data/Ipulse2.mod`, :download:`data/readme.txt`, and :download:`data/test_1_and_2.hoc`. Read :download:`data/readme.txt`, compile the mod files, and then use NEURON to load :download:`data/test_1_and_2.hoc`, which is a simple demo of these two current pulse generators.

pulsedistrib also contains :download:`data/ipulse3.mod`, :download:`data/ipulse3rig.ses`, and :download:`data/test_3.hoc`, which address the next question in this list.

32 changes: 32 additions & 0 deletions docs/guide/drive-postsynaptic-with-spike-times.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. _drive-postsynaptic-with-spike-times:

I have a set of recorded or calculated spike times. How can I use these to drive a postsynaptic mechanism?
-----------------------------------------------------------------------------------------------

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.

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:

1.
Create a Vector and load it with the times at which you want to activate the synaptic mechanism.

2.
Then use an :ref:`finitialize_handler` that stuffs the spike times into the NetCon's event queue by calling the `NetCon class's event() method <https://nrn.readthedocs.io/en/latest/hoc/modelspec/programmatic/network/netcon.html>`_ during initialization.

For example, if the Vector that holds the event times is syntimes, and the NetCon that drives the synaptic point process is nc, this would work:

For example, if the Vector that holds the event times is syntimes, and the NetCon that drives the synaptic point process is nc, this would work:

.. code::
c++

objref fih
fih = new FInitializeHandler("loadqueue()")
proc loadqueue() { local ii
for ii=0,syntimes.size()-1 nc.event(syntimes.x[ii])
}

Don't forget that these are treated as *delivery* times, i.e. the NetCon's delay will have no effect on the times of synaptic activation. If additional conduction latency is needed, you will have to incorporate it by adding the extra time to the elements of syntimes before the FInitializeHandler is called.

If you have a lot of spikes then it's best to use an NMODL-defined artificial spiking cell that generates spike events at times that are stored in a Vector (which you fill with data before the simulation). For more information see `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/>`_.

12 changes: 12 additions & 0 deletions docs/guide/exit-neuron-no-gui.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _exit-neuron-no-gui:

How do I exit NEURON? I'm not using the GUI, and when I enter ^D at the oc> prompt it doesn't do anything?
-----------------------------------------------------------------------------------------------

You seem to be using an older MSWin or MacOS version of NEURON (why not get the most recent version?). Typing the command

quit()

at the oc> prompt works for all versions, new or old, under all OSes. Don't forget the parentheses, because quit() is a function. Oh, and you need to press the Enter or Return key too.


Loading
Loading