From 7b05e21adb45794d7d7f51d9491bf9b5014686f6 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Sat, 26 Aug 2017 16:20:30 +0200 Subject: [PATCH 1/3] fixing various typos in pynest docs --- .../part-1-neurons-and-simple-neural-networks.md | 4 ++-- .../userdoc/md/documentation/part-2-populations-of-neurons.md | 4 ++-- .../documentation/part-3-connecting-networks-with-synapses.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md b/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md index dec5f074c2..46204569da 100644 --- a/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md +++ b/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md @@ -75,7 +75,7 @@ One such command is `nest.Models()`, which will return a list of all the available models you can use. If you want to obtain more information about a particular command, you may use Python’s standard help system. - nest.Models? + nest.Models() This will return the help text (docstring) explaining the use of this particular function. There is a help system within NEST as well. You can open the help @@ -377,7 +377,7 @@ current, and add a second neuron. nest.SetStatus(neuron1, {"I_e": 376.0}) neuron2 = nest.Create("iaf_psc_alpha") multimeter = nest.Create("multimeter") - nest.SetStatus(multimeter, {"withtime":True, "record_from":["V_m"]} + nest.SetStatus(multimeter, {"withtime":True, "record_from":["V_m"]}) We now connect `neuron1` to `neuron2`, and record the membrane potential from `neuron2` so we can observe the postsynaptic potentials caused by the spikes of diff --git a/extras/userdoc/md/documentation/part-2-populations-of-neurons.md b/extras/userdoc/md/documentation/part-2-populations-of-neurons.md index 92d04c40ce..796409d6dc 100644 --- a/extras/userdoc/md/documentation/part-2-populations-of-neurons.md +++ b/extras/userdoc/md/documentation/part-2-populations-of-neurons.md @@ -112,7 +112,7 @@ each of them, which is more efficient, and thus to be preferred. One way to do it is to give a list of dictionaries which is the same length as the number of nodes to be parameterised, for example using a list comprehension: - dVms = [{"V_m": Vrest+(Vth-Vrest)\*numpy.random.rand()} for x in epop1] + dVms = [{"V_m": Vrest+(Vth-Vrest)*numpy.random.rand()} for x in epop1] nest.SetStatus(epop1, dVms) If we only need to randomise one parameter then there is a more concise way by @@ -120,7 +120,7 @@ passing in the name of the parameter and a list of its desired values. Once again, the list must be the same size as the number of nodes to be parameterised: - Vms = Vrest+(Vth-Vrest)\*numpy.random.rand(len(epop1)) + Vms = Vrest+(Vth-Vrest)*numpy.random.rand(len(epop1)) nest.SetStatus(epop1, "V_m", Vms) Note that we are being rather lax with random numbers here. Really we have to diff --git a/extras/userdoc/md/documentation/part-3-connecting-networks-with-synapses.md b/extras/userdoc/md/documentation/part-3-connecting-networks-with-synapses.md index b6f9f7651b..a2a493999a 100644 --- a/extras/userdoc/md/documentation/part-3-connecting-networks-with-synapses.md +++ b/extras/userdoc/md/documentation/part-3-connecting-networks-with-synapses.md @@ -25,7 +25,7 @@ subdirectory: `pynest/examples/`. ## Parameterising synapse models NEST provides a variety of different synapse models. You can see the available -models by using the command `Models(synapses)`, which picks only the synapse +models by using the command `nest.Models(mtype='synapses')`, which picks only the synapse models out of the list of all available models. Synapse models can be parameterised analogously to neuron models. You can From e5f94fa4e723983f74d72ad4716c7fccbbdd115b Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Tue, 5 Sep 2017 12:23:41 +0200 Subject: [PATCH 2/3] fix formatting for ipython syntax --- .../part-1-neurons-and-simple-neural-networks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md b/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md index 46204569da..b04768f3e2 100644 --- a/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md +++ b/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md @@ -71,11 +71,11 @@ for. dir(nest) -One such command is `nest.Models()`, which will return a list of all the +One such command is `nest.Models?`, which will return a list of all the available models you can use. If you want to obtain more information about a -particular command, you may use Python’s standard help system. +particular command, you may use iPython’s standard help system. - nest.Models() + nest.Models? This will return the help text (docstring) explaining the use of this particular function. There is a help system within NEST as well. You can open the help From 13c870259757ebff95a0c852524f4b882320ef99 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Tue, 5 Sep 2017 13:29:33 +0200 Subject: [PATCH 3/3] fixing whitespace and IPython --- .../part-1-neurons-and-simple-neural-networks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md b/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md index b04768f3e2..68a339f77d 100644 --- a/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md +++ b/extras/userdoc/md/documentation/part-1-neurons-and-simple-neural-networks.md @@ -73,9 +73,9 @@ for. One such command is `nest.Models?`, which will return a list of all the available models you can use. If you want to obtain more information about a -particular command, you may use iPython’s standard help system. +particular command, you may use IPython’s standard help system. - nest.Models? + nest.Models? This will return the help text (docstring) explaining the use of this particular function. There is a help system within NEST as well. You can open the help