{{ message }}

Revised content in the "Introduction to PyNEST"#661

Merged
merged 15 commits into from Mar 13, 2017
Merged

Revised content in the "Introduction to PyNEST"#661

merged 15 commits into from Mar 13, 2017

Conversation

steffengraber commented Feb 14, 2017

 Content update reflecting the status per October 2016. I suggest @abigailm and @jougs as reviewers. The text was updated successfully, but these errors were encountered:
 Better image quality 
 c6a42aa 
 New Content 
 57c4f05 
 minor 
 2e44724 
 problem with ':' in text 
 36cb598 
 linked sample1_circgauss.png 
 83e1151 
 cloded td 
 c160fbb 
 minor 
 e8a3f54 
 minor 
 e806150 
 table in one row 
 4cf459d 
requested review from abigailm and jougs Feb 15, 2017
suggested changes

Silmathoron left a comment

Hit @steffengraber,
in python_interface.png, could you replace "iaf_neuron" by "iaf_psc_alpha", since we're in the process of removing it?

 @@ -79,9 +79,14 @@ populations and will also be returned by the function Models(). ipop1 = nest.Create("inh_iaf_neuron", 30) ipop2 = nest.Create("inh_iaf_neuron", 30) Once you have set up your populations of neurons, the function PrintNetwork()

Silmathoron Feb 15, 2017

Why remove the part about PrintNetwork?

heplesser Feb 16, 2017

In this case, users might perceive the output of PrintNetwork() as confusing rather than helpful, since the two populations of 30 neurons each would show up as one range of 60 neurons. With subnet removal in NEST3, PrintNetwork() will become even less useful. So I think we might as well drop it here and rather add new suggestions when we revise documentation for NEST3.

abigailm Feb 20, 2017

I agree with @heplesser

 nest.Connect(pop1, pop2, syn_spec={"weight":20.0}) Alternatively, the neurans can be connected with the one\_to\_one. This

Silmathoron Feb 15, 2017

neurons

 requiring the specification of further parameters, such as in-degree or connection probabilities, must be defined in a dictionary containing the key rule and the key for parameters associated to the rule. Please see for an illustrated

Silmathoron Feb 15, 2017

Since connection_management is referred to several times, maybe it would be a good idea to use  [Connection management][cm] everywhere and set it as [cm]: connection_management.md "Connection management" at the end of the file...
This way if we want to change it at some point it will be easier...

 same population simultaneously in the role of pre and post. For more information on connecting neurons, please read the documentation of the Connect function and consult the guide at [Connection Management](connection-management.md).

Silmathoron Feb 15, 2017

see above

 @@ -230,30 +270,46 @@ These are the new functions we introduced for the examples in this handout. ### Getting information about NEST PrintNetwork(depth=1, subnet=None):

Silmathoron Feb 15, 2017

Same question as before: I don't think PrintNetwork is deprecated, only subnet

abigailm Feb 20, 2017

but not especially useful anymore, so I would rather remove it.

 - GetKernelStatus(keys=none): Obtain parameters of the simulation kernel. Returns:

Silmathoron Feb 15, 2017

This does not bring more information compared to nest.GetKernelStatus in ipython... I think example code for each case would be more suited here.

heplesser Feb 16, 2017

Maybe a compact table/list of methods would be useful, leaving all details to the docstrings.

 Parameters: source - list of source GIDs

Silmathoron Feb 15, 2017

this is not easily readable (no linebreak). I don't know if it's supposed to be formatted at some point, but otherwise could you add double spaces at the end of each lines to force linebreak?

 or, if available, a NumPy array with the following five entries: source-gid, target-gid, target-thread, synapse-id, port Note: Only connections with targets on the MPI process executing the

Silmathoron Feb 15, 2017

let's make Note: bold ^^

 replaced "iaf_neuron" by "iaf_psc_alpha" in .png 
 371fa43 
 some minor changes 
 30f13f8 
changed "neurans" to "neurons"  (line 143)
introducing [Connection management][cm]
 better readable 
 3cc6a67 
a list for linebreaks (line 303)
make bold for highlighting (line 318)

steffengraber commented Feb 16, 2017

 @Silmathoron Thank your for reviewing. The small changes are done. Regarding your questions and comments about 'PrintNetwork' and 'nest.GetKernelStatus' @abigailm is better suited to give the right answer.

requested changes

abigailm left a comment

many minor changes but otherwise good. Also, can you please turn the syntax highlighting back on?

 @@ -17,26 +17,38 @@ discusses in this primer, please visit [nest-initiative.org/](http://nest-initia or have a look at the source directory of your NEST installation in the

abigailm Feb 20, 2017

For more information on the usage of PyNEST, please see the other sections of this primer [links to other sections]. More advanced examples can be found at [link to example listing], or have a look at...

 @@ -17,26 +17,38 @@ discusses in this primer, please visit [nest-initiative.org/](http://nest-initia or have a look at the source directory of your NEST installation in the subdirectory: pynest/examples/. For the internals of the NEST simulator you may refer to the [publications](publications.md). to the [$1$](#1),[$2$](#2).

abigailm Feb 20, 2017

I would remove this last sentence altogether, given this primer is now online with all the other documentation

 in$$C++$$ to obtain highest possible performance for the simulation. with an interface to Python [$5$](#5). [Fig. 1](#figure-1) illustrates the interaction between the user’s simulation script (mysimulation.py) and the NEST simulator. [$2]$(#2) contains a technically detailed description of the

abigailm Feb 20, 2017

The citation is mangled in my view - I see [2].

Silmathoron Feb 20, 2017

I guess @abigailm meant [[2]], because the correct code is [$2$](#2) and not [$2]$(#2)

abigailm Feb 20, 2017

I will try again. For me it displays, literally, as: [[2]](#2) with no link

Silmathoron Feb 20, 2017

Yes, that's what I meant, it's just that your previous message was disturbing because GitHub automatically converted it to a link with only one bracket showing

 called \*id\*s. Many PyNEST functions expect or return a list of ids (see ). Thus it is easy to apply functions to large sets of nodes with a single function call. called \*id\*s. Many PyNEST functions expect or return a list of ids (see

abigailm Feb 20, 2017

bold of ids is not working for me. Maybe italics would be better anyway, for consistency.

 Thus it is easy to apply functions to large sets of nodes with a single function call. called \*id\*s. Many PyNEST functions expect or return a list of ids (see [Sec.8](#command-overview)). Thus it is easy to apply functions to large sets

abigailm Feb 20, 2017

Sec. 8 is unhelpful as the sections are un-numbered. Name would be better.

 @@ -293,20 +295,25 @@ These are the new functions we introduced for the examples in this handout.

abigailm Feb 20, 2017

there is a 'See Part 2' above, which should be a link

 source-gid, target-gid, target-thread, synapse-id, port Note: Only connections with targets on the MPI process executing the command are returned. - GetConnections(neuron, synapse_model="None"))

abigailm Feb 20, 2017

 @@ -290,7 +334,8 @@ listed in NTUM Section 4.1, are: ## References $1$ Hans Ekkehard Plesser and Håkon Enger NEST Topology User Manual $1$ Hans Ekkehard Plesser and Håkon Enger NEST Topology User Manual

abigailm Feb 20, 2017

reference seems slightly mangled, should contain link

 @@ -290,7 +334,8 @@ listed in NTUM Section 4.1, are:

abigailm Feb 20, 2017

 @@ -290,7 +334,8 @@ listed in NTUM Section 4.1, are: ## References $1$ Hans Ekkehard Plesser and Håkon Enger NEST Topology User Manual $1$ Hans Ekkehard Plesser and Håkon Enger NEST Topology User Manual ## Acknowledgments

abigailm Feb 20, 2017

suggested changes

Silmathoron left a comment

Regarding @abigailm comment on syntax highlighting, I think this is processed automatically in html, so using python  would only make a difference on GitHub.

 returns a list of the ids of all the created neurons, in this case only one, which we store in a variable called neuron. After having imported NEST and also the Pylab interface to Matplotlib [$3$] (#3), which we will use to display the results, we can start to create nodes.

Silmathoron Feb 20, 2017

"we can start creating nodes"

 which we store in a variable called neuron. After having imported NEST and also the Pylab interface to Matplotlib [$3$] (#3), which we will use to display the results, we can start to create nodes. For a first example, we will create a neuron of type iaf_psc_alpha. This

"As a first"

Silmathoron Feb 20, 2017

why not keep the inline latex? $376.0 pA$

 The slicing with strides is done in line 23-24 and 26-28. Additional information can be found at.

Silmathoron Feb 20, 2017

 If no connectivity pattern is specified, the populations are connected via the default rule, namely all\_to\_all. Each neuron of pop1 is connected to every neuron in pop2, resulting in $10^2$ connections.

Silmathoron Feb 20, 2017

@abigailm: do you mean on GitHub or when you generate the html? GitHub does not use mathjax...

 the value of origin (default: $$0$$). For example, the following example creates a poisson_generator which is only active between $$100$$ and $$150 ms$$: (default $0$) determines the beginning of the device’s activity and the

Silmathoron Feb 20, 2017

same question as before (html or github?); also it should be "device ' s"

 ## Distributing synapse parameters The synapse parameters are specified in the synapse dictionary which is passed to the Connect-function. If the parameter is set to a scalar all

Silmathoron Feb 20, 2017

"to the Connect-function. If the parameter is set to a scalar , all"

 an example where the parameters alpha and weight of the stdp synapse are uniformly distributed. syn_dict = {"model": "stdp_synapse",

Silmathoron Feb 20, 2017

make a working example (correct alpha values: these are random):

alpha_min = 0.1
alpha_max = 2.
w_min = 0.5
w_max = 5.

syn_dict = {"model": "stdp_synapse",
"alpha": {"distribution": "uniform", "low": alpha_min, "high": alpha_max},
"weight": {"distribution": "uniform", "low": w_min, "high": w_max},
"delay": 1.0}


 connections will be drawn using the same parameter. Parameters can be randomly distributed by assigning a dictionary to the parameter. The dictionary has to contain the key distribution setting the target distribution of the parameters (for example normal). Optionally parameters

optionally ,

jougs commented Feb 21, 2017

 I'm removing myself from the list of reviewers as this is documentation only and there are already three reviewers without me.

removed their request for review Feb 21, 2017
 many minor changes 
 1afdb36 
correcting text, linking all parts together, linking  function names

steffengraber commented Feb 22, 2017

 Thank you @abigailm and @Silmathoron for reviewing. I did all the minor changes that were mentioned in the last comments. For easier reading and writing of markdown we decided for indented code blocks. They do not support syntax highlighting on Github. Inline-Mathjax is used as least as possible, also for better reading and writing.

 Merge branch 'master' into doc-pynest 
 40023eb 
suggested changes

Silmathoron left a comment

Ok, this looks almost good, a few details left to correct and it should be great ;)

 For more information on the usage of PyNEST, please see the other sections of this primer: - [Part 1: Neurons and simple neural networkss](part-1-neurons-and-simple-neural-networks.md)

Silmathoron Mar 8, 2017

"networks" (one "s")

 @@ -335,9 +351,4 @@ listed in NTUM Section 4.1, are: ## References $1$ Hans Ekkehard Plesser and Håkon Enger NEST Topology User Manual ## Acknowledgments

Silmathoron Mar 8, 2017

I don't know who Sarah Jarvis is, but I don't think keeping this acknowledgement costs much, does it?
Maybe you can add a "revised by" and the date at the end...

abigailm Mar 10, 2017

No, I removed this on purpose. Many people have contributed to this documentation now (although it's still mostly me ;) ), there is no particular reason to single out Sarah.

heplesser Mar 11, 2017

I concur with @abigailm.

 "alpha": {"distribution": "uniform", "low": Min_alpha, "high": Max_alpha}, "weight": {"distribution": "uniform", "low": Wmin, "high": Wmax}, "delay": 1.0 } "alpha": {"distribution": "uniform", "low": alpha_min, "high": alpha_max},

Silmathoron Mar 8, 2017

define alpha_min & co. so that the examples work if you copy-paste them

 For more information on the usage of PyNEST, please see the other sections of this primer: - [Part 1: Neurons and simple neural networkss](part-1-neurons-and-simple-neural-networks.md)

Silmathoron Mar 8, 2017

only one "s" to "networks"

 For more information on the usage of PyNEST, please see the other sections of this primer: - [Part 1: Neurons and simple neural networkss](part-1-neurons-and-simple-neural-networks.md)

Silmathoron Mar 8, 2017

one "s"

self-assigned this Mar 10, 2017
removed their assignment Mar 10, 2017

abigailm commented Mar 10, 2017

 I agree with @Silmathoron 's suggestions except for the acknowledgment, so a conditional 👍

steffengraber commented Mar 13, 2017

 Thank you again for reviewing. I made all the changes.

 some small changes 
 2fc725c 
approved these changes

Silmathoron left a comment

All good, thanks! 👍

approved these changes

abigailm commented Mar 13, 2017

 approving 👍 and merging

merged commit 4ea4b4c into nest:master Mar 13, 2017
1 check passed
deleted the doc-pynest branch Mar 14, 2017