-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from NeuroML/pg_updates
Changes from #79 and minor tweaks
- Loading branch information
Showing
20 changed files
with
155 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
(userdocs:conventions)= | ||
# Conventions | ||
|
||
This page documents various conventions in use in NeuroML. | ||
|
||
In general, please prefer underscores `_` instead of spaces wherever possible, in filenames and ids. | ||
|
||
(userdocs:conventions:files)= | ||
## File naming | ||
|
||
When naming different NeuroML files, we suggest the following suffixes: | ||
|
||
- `channel.nml` for NeuroML files describing ion channels, for example: `Na.channel.nml` | ||
- `cell.nml` for NeuroML files describing cells, for example: `hh.cell.nml` | ||
- `synapse.nml` for NeuroML files describing synapses, for example: `AMPA.synapse.nml` | ||
- `net.nml` for NeuroML files describing networks of cells, for example: `excitatory.net.nml` | ||
|
||
For LEMS files that describe simulations of NeuroML models ({ref}`"LEMS Simulation files" <userdocs:lemssimulation>`), we suggest that: | ||
|
||
- file names start with the `LEMS_` prefix, | ||
- file names end in `xml` | ||
|
||
For example `LEMS_HH_Simulation.xml`. | ||
|
||
(userdocs:conventions:segments)= | ||
## Neuron segments | ||
|
||
When naming segments in multi-compartmental neuron models, we suggest the following prefixes: | ||
|
||
- `axon_` for axonal segments | ||
- `dend_` for dendritic segments | ||
- `soma_` for somatic segments | ||
|
||
There are 3 specific recommended names for segment groups which contain **ALL** of the somatic, dendritic or axonal segments | ||
|
||
- `axon_group` for the group of all axonal segments | ||
- `dend_group` for the group of all dendritic segments | ||
- `soma_group` for the group of all somatic segments | ||
|
||
Ideally every segment should be a member of one and only one of these groups. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
(userdocs:paths)= | ||
# Paths | ||
|
||
Since NeuroMLv2 and LEMS are both XML based, entities in models and simulations must be referred to using *paths*. | ||
This page documents how paths can be constructed, and how they can be used to refer to entities in NeuroML/LEMS based models and simulations. | ||
|
||
(userdocs:constructingpaths)= | ||
## Constructing paths | ||
Paths start from any element and ascend/descend to refer to the entity that is to be referenced. | ||
|
||
The `.` and `..` path constructs are special constructs that mean "the current node" and "the parent node" respectively. | ||
|
||
For example, in the {ref}`Izhikevich network example <userdocs:getting_started:single_example>`, the network is defined in NeuroML like this: | ||
```{code-block} xml | ||
<network id="IzNet"> | ||
<population id="IzPop0" component="iz2007RS0" size="5"> | ||
<property tag="color" value="0 0 .8"/> | ||
</population> | ||
<population id="IzPop1" component="iz2007RS0" size="5"> | ||
<property tag="color" value=".8 0 0"/> | ||
</population> | ||
<projection id="proj" presynapticPopulation="IzPop0" postsynapticPopulation="IzPop1" synapse="syn0"> | ||
<connection id="0" preCellId="../IzPop0[0]" postCellId="../IzPop1[0]"/> | ||
<connection id="1" preCellId="../IzPop0[0]" postCellId="../IzPop1[1]"/> | ||
<connection id="2" preCellId="../IzPop0[0]" postCellId="../IzPop1[2]"/> | ||
... | ||
</projection> | ||
<explicitInput target="IzPop0[0]" input="pg_0"/> | ||
<explicitInput target="IzPop0[1]" input="pg_1"/> | ||
<explicitInput target="IzPop0[2]" input="pg_2"/> | ||
<explicitInput target="IzPop0[3]" input="pg_3"/> | ||
<explicitInput target="IzPop0[4]" input="pg_4"/> | ||
</network> | ||
</neuroml> | ||
``` | ||
Here, in the `explicitInput` node, we need to refer to neurons of the `IzPop0` `population` node. | ||
Since `explicitInput` and `population` are *siblings* (both have the `IzNet` `network` as *parent*), they are at the same *level*. | ||
Therefore, in `explicitInput`, one can refer directly to `IzPop0`. | ||
|
||
The `projection` and `population` nodes are also *siblings* and therefore are at the same level. | ||
So, in the `projection` tag also, we can refer to the `population` nodes directly. | ||
The `connection` nodes, however, are *children* of the `projection` node. | ||
Therefore, for the `connection` nodes, the `population` nodes are at the *parent* level, and we must use `../IzPop0` to refer to them. | ||
|
||
`../IzPop0` means "go up one level to the parent level (to `projection`) and then refer to `IzPop0`". | ||
`../` can be used as many times as required and wherever required in the path. | ||
For example, `../../../` would mean "go up three levels". | ||
|
||
Additionally, when constructing the path: | ||
|
||
- for any `child` elements, the *name* of the element should be used in the path | ||
- for `children` elements, the *id* of the element should be used in the path | ||
- for elements that have a `size` attribute like {ref}`population <schema:population>`, individual elements should be referred to using the `[]` operator |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(userdocs:quantitiesandrecording)= | ||
# Quantities and recording | ||
|
||
```{note} | ||
TODO: document `list_exposures()` once https://github.com/NeuroML/pyNeuroML/pull/118 is merged. | ||
``` | ||
```{note} | ||
TODO: document `list_recording_paths()` once https://github.com/NeuroML/pyNeuroML/pull/118 is merged. | ||
``` | ||
|
||
In LEMS and NeuroML, `quantities` from all `exposures` and all `events` can be recorded by referring to them using {ref}`paths <userdocs:paths>`. | ||
For examples, please see the {ref}`Getting Started with NeuroML <userdocs:getting_started_neuroml>` section. | ||
|
||
(userdocs:quantitiesandrecording:events)= | ||
## Recording events | ||
|
||
In NeuroML, all `event`s can be recorded to files declared using the {ref}`EventOutputFile <schema:eventoutputfile>` component. | ||
Once an `EventOutputFile` has been declared, events to record can be selected using the {ref}`EventSelection <schema:eventselection>` component. | ||
|
||
{ref}`pyNeuroML <pyneuroml>` provides the [create_event_output_file](https://pyneuroml.readthedocs.io/en/development/pyneuroml.lems.html?highlight=add_selection_to_event_output_file#pyneuroml.lems.LEMSSimulation.LEMSSimulation.create_event_output_file) function to create a `EventOutputFile` to record `events` to, and the [add_selection_to_event_output_file](https://pyneuroml.readthedocs.io/en/development/pyneuroml.lems.html?highlight=add_selection_to_event_output_file#pyneuroml.lems.LEMSSimulation.LEMSSimulation.add_selection_to_event_output_file) function to record `events` to the declared data file(s). | ||
|
||
(userdocs:quantitiesandrecording:exposures)= | ||
## Recording quantities from exposures | ||
In NeuroML, all `quantities` can be recorded to files declared using the {ref}`OutputFile <schema:outputfile>` component. | ||
Once the `OutputFile` has been declared, `quantities` to record can be selected using the {ref}`OutputColumn <schema:outputcolumn>` component. | ||
|
||
{ref}`pyNeuroML <pyneuroml>` provides the [create_output_file](https://pyneuroml.readthedocs.io/en/development/pyneuroml.lems.html?highlight=add_selection_to_event_output_file#pyneuroml.lems.LEMSSimulation.LEMSSimulation.create_event_output_file) function to create a `OutputFile` to record `quantities` to, and the [add_column_to_output_file](https://pyneuroml.readthedocs.io/en/development/pyneuroml.lems.html?highlight=add_selection_to_event_output_file#pyneuroml.lems.LEMSSimulation.LEMSSimulation.create_event_output_file) function to select `quantities` to record to the declared data file(s). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
(userdocs:usingnml2lems)= | ||
# Using NeuroML 2 and jLEMS | ||
# Using NeuroML 2 and LEMS | ||
|
||
While the {ref}`tutorials <userdocs:getting_started_neuroml>` cover many of the key points of using LEMS with NeuroML, there are some points which require further explanation: | ||
|
||
- {ref}`What are the conventions/best practices to follow in naming NeuroML/LEMS files/elements? <userdocs:conventions>` | ||
- {ref}`How are units and dimensions handled in NeuroML and LEMS? <userdocs:unitsanddimensions>` | ||
- {ref}`How do I use a LEMS Simulation file to specify how to execute a NeuroML model? <userdocs:lemssimulation>` | ||
- {ref}`How can I extend NeuroML model to include new types using LEMS? <userdocs:extending>` | ||
- {ref}`What is the correct format/usage of paths and quantities in NeuroML and LEMS? <userdocs:quantitiesandpaths>` | ||
- {ref}`What is the correct format/usage of paths and quantities in NeuroML and LEMS? <userdocs:paths>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters