Skip to content

Commit

Permalink
remove _layer suffix from within files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Close committed Jun 4, 2015
1 parent c677be5 commit 275865f
Show file tree
Hide file tree
Showing 140 changed files with 506 additions and 506 deletions.
6 changes: 3 additions & 3 deletions doc/source/api_reference/abstraction_layer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Abstraction layer API
=====================

.. currentmodule:: nineml.abstraction_layer
.. currentmodule:: nineml.abstraction

The abstraction layer is intended to provide explicit mathematical descriptions of any components used in a
neuronal network model, where such components may be neuron models, synapse models, synaptic plasticity
Expand Down Expand Up @@ -37,7 +37,7 @@ A number of :class:`Dimension`\s and :class:`Unit`\ have been pre-defined, for e

.. code-block:: python
>>> from nineml.abstraction_layer.units import time, voltage, capacitance, nA, mol_per_cm3, Mohm
>>> from nineml.abstraction.units import time, voltage, capacitance, nA, mol_per_cm3, Mohm
>>> voltage
Dimension(name='voltage', i=-1, m=1, t=-3, l=2)
>>> nA
Expand All @@ -47,7 +47,7 @@ A number of :class:`Dimension`\s and :class:`Unit`\ have been pre-defined, for e
ComponentClass interface
------------------------

.. autoclass:: nineml.abstraction_layer.ComponentClass
.. autoclass:: nineml.abstraction.ComponentClass
:members:

.. autoclass:: Parameter
Expand Down
4 changes: 2 additions & 2 deletions doc/source/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ API reference
.. toctree::
:maxdepth: 2

user_layer
abstraction_layer
user
abstraction


12 changes: 6 additions & 6 deletions doc/source/api_reference/user_layer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
User layer API
==============

.. currentmodule:: nineml.user_layer
.. currentmodule:: nineml.user

A NineML model is made up of populations of cells, connected via synapses, which may exhibit plasticity. The models for the cells, synapses and plasticity mechanisms are all instances of :class:`Component`. Populations of cells are represented by :class:`Population`, the set of connections between two populations by :class:`Projection`. Finally, the entire model is encapsulated in :class:`Network`.

Expand All @@ -12,7 +12,7 @@ Components
.. autoclass:: Component
:show-inheritance:

.. autoclass:: nineml.user_layer.components.BaseComponent
.. autoclass:: nineml.user.components.BaseComponent
:members: component_class, properties, initial_values, diff

:class:`SpikingNodeType` and :class:`SynapseType` are subclasses of :class:`Component`. In the current version they
Expand All @@ -22,7 +22,7 @@ References
==========

NineML has three closely-related objects used to refer to other NineML objects. :class:`Definition` is used inside
:class:`Component`\s to refer to abstraction layer :class:`~nineml.abstraction_layer.ComponentClass` definitions.
:class:`Component`\s to refer to abstraction layer :class:`~nineml.abstraction.ComponentClass` definitions.
:class:`Prototype` is used inside :class:`Component`\s to refer to previously-defined :class:`Component`\s.
:class:`Reference` is used inside :class:`Selection`\s to refer to :class:`Population` objects, and inside
:class:`Projection`\s to refer to :class:`Population`\s and :class:`Selection`\s.
Expand All @@ -34,7 +34,7 @@ NineML has three closely-related objects used to refer to other NineML objects.
:members: component

.. autoclass:: Reference
:members: user_layer_object
:members: user_object


Properties and physical quantities
Expand All @@ -57,7 +57,7 @@ Properties and physical quantities

The value of the parameter (magnitude and units).

.. currentmodule:: nineml.user_layer.values
.. currentmodule:: nineml.user.values

.. autoclass:: SingleValue

Expand All @@ -70,7 +70,7 @@ Properties and physical quantities
.. autoclass:: ComponentValue


.. currentmodule:: nineml.user_layer
.. currentmodule:: nineml.user

.. autoclass:: RandomDistribution

Expand Down
72 changes: 36 additions & 36 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,42 +300,42 @@
.. |VISITATION| replace:: link to something about visitation.
.. |COMPONENTCLASS| replace:: :class:`~nineml.abstraction_layer.ComponentClass`
.. |Alias| replace:: :class:`~nineml.abstraction_layer.Alias`
.. |TimeDerivative| replace:: :class:`~nineml.abstraction_layer.TimeDerivative`
.. |AnalogPort| replace:: :class:`~nineml.abstraction_layer.AnalogPort`
.. |StateAssignment| replace:: :class:`~nineml.abstraction_layer.StateAssignment`
.. |Condition| replace:: :class:`~nineml.abstraction_layer.Condition`
.. |OnCondition| replace:: :class:`~nineml.abstraction_layer.OnCondition`
.. |OnEvent| replace:: :class:`~nineml.abstraction_layer.OnEvent`
.. |StateVariable| replace:: :class:`~nineml.abstraction_layer.StateVariable`
.. |EventPort| replace:: :class:`~nineml.abstraction_layer.EventPort`
.. |Parameter| replace:: :class:`~nineml.abstraction_layer.Parameter`
.. |NamespaceAddress| replace:: :class:`~nineml.abstraction_layer.NamespaceAddress`
.. |DynamicsBlock| replace:: :class:`~nineml.abstraction_layer.DynamicsBlock`
.. |Transition| replace:: :class:`~nineml.abstraction_layer.Transition`
.. |AnalogReceivePort| replace:: :class:`~nineml.abstraction_layer.AnalogReceivePort`
.. |AnalogSendPort| replace:: :class:`~nineml.abstraction_layer.AnalogSendPort`
.. |AnalogReducePort| replace:: :class:`~nineml.abstraction_layer.AnalogReducePort`
.. |EventSendPort| replace:: :class:`~nineml.abstraction_layer.EventSendPort`
.. |EventReceivePort| replace:: :class:`~nineml.abstraction_layer.EventReceivePort`
.. |ComponentFlattener| replace:: :class:`~nineml.abstraction_layer.flattening.ComponentFlattener`
.. |Aliases| replace:: :class:`Aliases <nineml.abstraction_layer.Alias>`
.. |TimeDerivatives| replace:: :class:`TimeDerivatives <nineml.abstraction_layer.TimeDerivative>`
.. |AnalogPorts| replace:: :class:`AnalogPorts <nineml.abstraction_layer.AnalogPort>`
.. |StateAssignments| replace:: :class:`StateAssignments <nineml.abstraction_layer.StateAssignment>`
.. |Conditions| replace:: :class:`Conditions <nineml.abstraction_layer.Condition>`
.. |StateVariables| replace:: :class:`StateVariables <nineml.abstraction_layer.StateVariable>`
.. |EventPorts| replace:: :class:`EventPorts <nineml.abstraction_layer.EventPort>`
.. |Parameters| replace:: :class:`Parameters <nineml.abstraction_layer.Parameter>`
.. |NamespaceAddresses| replace:: :class:`NamespaceAddresses <nineml.abstraction_layer.NamespaceAddress>`
.. |Transitions| replace:: :class:`Transitions <nineml.abstraction_layer.Transition>`
.. |AnalogSendPorts| replace:: :class:`AnalogSendPorts <nineml.abstraction_layer.AnalogSendPort>`
.. |EventSendPorts| replace:: :class:`EventSendPorts <nineml.abstraction_layer.EventSendPort>`
.. |EventReceivePorts| replace:: :class:`EventReceivePorts <nineml.abstraction_layer.EventReceivePort>`
.. |COMPONENTCLASS| replace:: :class:`~nineml.abstraction.ComponentClass`
.. |Alias| replace:: :class:`~nineml.abstraction.Alias`
.. |TimeDerivative| replace:: :class:`~nineml.abstraction.TimeDerivative`
.. |AnalogPort| replace:: :class:`~nineml.abstraction.AnalogPort`
.. |StateAssignment| replace:: :class:`~nineml.abstraction.StateAssignment`
.. |Condition| replace:: :class:`~nineml.abstraction.Condition`
.. |OnCondition| replace:: :class:`~nineml.abstraction.OnCondition`
.. |OnEvent| replace:: :class:`~nineml.abstraction.OnEvent`
.. |StateVariable| replace:: :class:`~nineml.abstraction.StateVariable`
.. |EventPort| replace:: :class:`~nineml.abstraction.EventPort`
.. |Parameter| replace:: :class:`~nineml.abstraction.Parameter`
.. |NamespaceAddress| replace:: :class:`~nineml.abstraction.NamespaceAddress`
.. |DynamicsBlock| replace:: :class:`~nineml.abstraction.DynamicsBlock`
.. |Transition| replace:: :class:`~nineml.abstraction.Transition`
.. |AnalogReceivePort| replace:: :class:`~nineml.abstraction.AnalogReceivePort`
.. |AnalogSendPort| replace:: :class:`~nineml.abstraction.AnalogSendPort`
.. |AnalogReducePort| replace:: :class:`~nineml.abstraction.AnalogReducePort`
.. |EventSendPort| replace:: :class:`~nineml.abstraction.EventSendPort`
.. |EventReceivePort| replace:: :class:`~nineml.abstraction.EventReceivePort`
.. |ComponentFlattener| replace:: :class:`~nineml.abstraction.flattening.ComponentFlattener`
.. |Aliases| replace:: :class:`Aliases <nineml.abstraction.Alias>`
.. |TimeDerivatives| replace:: :class:`TimeDerivatives <nineml.abstraction.TimeDerivative>`
.. |AnalogPorts| replace:: :class:`AnalogPorts <nineml.abstraction.AnalogPort>`
.. |StateAssignments| replace:: :class:`StateAssignments <nineml.abstraction.StateAssignment>`
.. |Conditions| replace:: :class:`Conditions <nineml.abstraction.Condition>`
.. |StateVariables| replace:: :class:`StateVariables <nineml.abstraction.StateVariable>`
.. |EventPorts| replace:: :class:`EventPorts <nineml.abstraction.EventPort>`
.. |Parameters| replace:: :class:`Parameters <nineml.abstraction.Parameter>`
.. |NamespaceAddresses| replace:: :class:`NamespaceAddresses <nineml.abstraction.NamespaceAddress>`
.. |Transitions| replace:: :class:`Transitions <nineml.abstraction.Transition>`
.. |AnalogSendPorts| replace:: :class:`AnalogSendPorts <nineml.abstraction.AnalogSendPort>`
.. |EventSendPorts| replace:: :class:`EventSendPorts <nineml.abstraction.EventSendPort>`
.. |EventReceivePorts| replace:: :class:`EventReceivePorts <nineml.abstraction.EventReceivePort>`
"""

# Remove the copyright notice from docstrings:
Expand Down
36 changes: 18 additions & 18 deletions doc/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To read a file containing only abstraction layer elements:
'voltage': Dimension(name='voltage', i=-1, m=1, t=-3, l=2)}
This gives us a :class:`~nineml.Document` instance, a dictionary-like object containing a
:class:`~nineml.abstraction_layer.ComponentClass` definition of an integrate-and-fire
:class:`~nineml.abstraction.ComponentClass` definition of an integrate-and-fire
neuron model, together with the definitions of the physical dimensions of parameters
and state variables used in the model.

Expand All @@ -35,14 +35,14 @@ containing the abstraction layer definitions):
>>> all_items = nineml.read("brunel_network_alpha_AI.xml")
>>> from pprint import pprint
>>> pprint(all_items)
{'All neurons': <nineml.user_layer.containers.Selection object at 0x105c49cd0>,
{'All neurons': <nineml.user.containers.Selection object at 0x105c49cd0>,
'Exc': Population(name='Exc', number=4000, cell=nrn),
'Excitation': Projection(name="Excitation", source=Population(name='Exc', number=4000, cell=nrn), destination=<nineml.user_layer.containers.Selection object at 0x105c49cd0>, connectivity=BaseComponent(name="RandomExc", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExcitatoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Excitation': Projection(name="Excitation", source=Population(name='Exc', number=4000, cell=nrn), destination=<nineml.user.containers.Selection object at 0x105c49cd0>, connectivity=BaseComponent(name="RandomExc", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExcitatoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Ext': Population(name='Ext', number=5000, cell=stim),
'External': Projection(name="External", source=Population(name='Ext', number=5000, cell=stim), destination=<nineml.user_layer.containers.Selection object at 0x105c49cd0>, connectivity=BaseComponent(name="OneToOne", componentclass="OneToOne"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExternalPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'External': Projection(name="External", source=Population(name='Ext', number=5000, cell=stim), destination=<nineml.user.containers.Selection object at 0x105c49cd0>, connectivity=BaseComponent(name="OneToOne", componentclass="OneToOne"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExternalPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Hz': Unit(name='Hz', dimension='per_time', power=0),
'Inh': Population(name='Inh', number=1000, cell=nrn),
'Inhibition': Projection(name="Inhibition", source=Population(name='Inh', number=1000, cell=nrn), destination=<nineml.user_layer.containers.Selection object at 0x105c49cd0>, connectivity=BaseComponent(name="RandomInh", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="InhibitoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Inhibition': Projection(name="Inhibition", source=Population(name='Inh', number=1000, cell=nrn), destination=<nineml.user.containers.Selection object at 0x105c49cd0>, connectivity=BaseComponent(name="RandomInh", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="InhibitoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Mohm': Unit(name='Mohm', dimension='resistance', power=6),
'current': Dimension(name='current', i=1),
'mV': Unit(name='mV', dimension='voltage', power=-3),
Expand All @@ -54,16 +54,16 @@ containing the abstraction layer definitions):
'voltage': Dimension(name='voltage', i=-1, m=1, t=-3, l=2)}
Again we get a dictionary-like object containing all the NineML objects in the XML file. An alternative
representation can be obtained by reading the file as a :class:`~nineml.user_layer.Network` object:
representation can be obtained by reading the file as a :class:`~nineml.user.Network` object:

.. code-block:: python
>>> from nineml.user_layer import Network
>>> from nineml.user import Network
>>> net = Network.read("brunel_network_alpha_AI.xml")
>>> print(net)
<nineml.user_layer.containers.Network object at 0x106442690>
<nineml.user.containers.Network object at 0x106442690>
This gives a much more structured representation. For example, all the :class:`~nineml.user_layer.Population`\s within the model are
This gives a much more structured representation. For example, all the :class:`~nineml.user.Population`\s within the model are
available through the ``populations`` attribute:

.. code-block:: python
Expand Down Expand Up @@ -170,7 +170,7 @@ The refractory regime can be introspected in a similar way.
Introspecting user layer models
-------------------------------

As shown above, once a complete network model has been loaded as a :class:`~nineml.user_layer.Network` object, we
As shown above, once a complete network model has been loaded as a :class:`~nineml.user.Network` object, we
can look at its neuron populations and the connections between these populations ("projections"):

.. code-block:: python
Expand All @@ -181,9 +181,9 @@ can look at its neuron populations and the connections between these populations
'Inh': Population(name='Inh', number=1000, cell=nrn)}
>>> net.projections
{'Excitation': Projection(name="Excitation", source=Population(name='Exc', number=4000, cell=nrn), destination=<nineml.user_layer.containers.Selection object at 0x1097f39d0>, connectivity=BaseComponent(name="RandomExc", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExcitatoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'External': Projection(name="External", source=Population(name='Ext', number=5000, cell=stim), destination=<nineml.user_layer.containers.Selection object at 0x1097f39d0>, connectivity=BaseComponent(name="OneToOne", componentclass="OneToOne"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExternalPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Inhibition': Projection(name="Inhibition", source=Population(name='Inh', number=1000, cell=nrn), destination=<nineml.user_layer.containers.Selection object at 0x1097f39d0>, connectivity=BaseComponent(name="RandomInh", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="InhibitoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections)}
{'Excitation': Projection(name="Excitation", source=Population(name='Exc', number=4000, cell=nrn), destination=<nineml.user.containers.Selection object at 0x1097f39d0>, connectivity=BaseComponent(name="RandomExc", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExcitatoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'External': Projection(name="External", source=Population(name='Ext', number=5000, cell=stim), destination=<nineml.user.containers.Selection object at 0x1097f39d0>, connectivity=BaseComponent(name="OneToOne", componentclass="OneToOne"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="ExternalPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections),
'Inhibition': Projection(name="Inhibition", source=Population(name='Inh', number=1000, cell=nrn), destination=<nineml.user.containers.Selection object at 0x1097f39d0>, connectivity=BaseComponent(name="RandomInh", componentclass="RandomFanIn"), response=BaseComponent(name="syn", componentclass="AlphaPSR")plasticity=BaseComponent(name="InhibitoryPlasticity", componentclass="StaticConnection"), delay=Delay(value=1.5, unit=ms), with 2 port-connections)}
NineML also supports "selections", groupings of neurons which span populations:

Expand All @@ -196,7 +196,7 @@ NineML also supports "selections", groupings of neurons which span populations:
versions it will be possible to select and combine sub-populations.

Looking more closely at a population, we can see its name, the number of neurons it contains and
the neuron model used (:class:`~nineml.user_layer.Component`):
the neuron model used (:class:`~nineml.user.Component`):

.. code-block:: python
Expand All @@ -209,7 +209,7 @@ the neuron model used (:class:`~nineml.user_layer.Component`):
BaseComponent(name="nrn", componentclass="BrunelIaF")
In the neuron model component we can see its abstraction layer definition
(:class:`~nineml.abstraction_layer.dynamics.ComponentClass`), it's properties (parameter values), and the initial
(:class:`~nineml.abstraction.dynamics.ComponentClass`), it's properties (parameter values), and the initial
values of its state variables.

.. note:: the handling of initial values is likely to change in future versions of NineML.
Expand Down Expand Up @@ -244,9 +244,9 @@ Turning from a population to a projection:
[PortConnection('plasticity', 'response', 'weight', 'q'),
PortConnection('response', 'destination', 'Isyn', 'Isyn')]
Note that the :attr:`source` and :attr:`destination` attributes point to :class:`~nineml.user_layer.Population`\s or
:class:`~nineml.user_layer.Projection`\s, the :attr:`connectivity` rule, the post-synaptic :attr:`response` model and
the synaptic :attr:`plasticity` model are all :class:`~nineml.user_layer.Component`\s. The :attr:`port_connections`
Note that the :attr:`source` and :attr:`destination` attributes point to :class:`~nineml.user.Population`\s or
:class:`~nineml.user.Projection`\s, the :attr:`connectivity` rule, the post-synaptic :attr:`response` model and
the synaptic :attr:`plasticity` model are all :class:`~nineml.user.Component`\s. The :attr:`port_connections`
attribute indicates which ports in the different components should be connected together.


Expand Down
Loading

0 comments on commit 275865f

Please sign in to comment.