Changes between Version 6 and Version 7 of signals

Show
Ignore:
Author:
apdavison (IP: 157.136.60.154)
Timestamp:
11/10/08 10:47:48 (2 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • signals

    v6 v7  
    1515------------ 
    1616 
    17 A spike train is a sorted vector of spike times, which is the result of a simulation or aquired by measurement. 
     17A spike train is a sorted vector of spike times, which is the result of a simulation or acquired by measurement. 
    1818It has therefore some attributes, like ``t_start`` and ``t_stop``, which must in general 
    1919be specified by the user, as they can not be inferred from the data.   
    2121**Note:** the standard time unit used by NeuroTools is milliseconds. 
    2222 
    23 When several spike trains are gathered, they are collected in a ``SpikeList`` object, which is effectively a dictionnary 
     23When several spike trains are gathered, they are collected in a ``SpikeList`` object, which is effectively a dictionary 
    2424of spike trains, the id of the cells being used as a key. See the ``SpikeList`` class for more details. 
    2525 
    8888All the ``SpikeTrain`` objects within the ``SpikeList`` will share the same ``t_start`` and ``t_stop``. 
    8989 
    90 Rather than calling the ``SpikeList`` constructor,  a more commmon way to create a ``SpikeList`` in NeuroTools is to use the ``load_spikelist()`` or the ``load()`` functions. 
     90Rather than calling the ``SpikeList`` constructor,  a more common way to create a ``SpikeList`` in NeuroTools is to use the ``load_spikelist()`` or the ``load()`` functions. 
    9191If you have generated your data with PyNN_, you can use the loading functions made for this purpose. For example if  
    9292you have recorded the spikes of a population in a file "spikes.dat", then one can load it as a ``SpikeList`` as follows:: 
    9595 
    9696Using this syntax, the header information contained in the file is used to create the population, and ``t_start`` and ``t_stop`` are 
    97 infered automatically as the min and the max of all the ``SpikeTrains`` within the ``SpikeList``. 
     97inferred automatically as the min and the max of all the ``SpikeTrains`` within the ``SpikeList``. 
    9898If you want to keep the control on the parameters while creating the ``SpikeList``, do the following:: 
    9999     
    115115            print spktrain.isi() 
    116116 
    117 As you can see in the example, one can naviguate and iterate over a ``SpikeList`` object and have access to 
     117As you can see in the example, one can navigate and iterate over a ``SpikeList`` object and have access to 
    118118all the ``SpikeTrain``\s within the object. To have an explicit list of all the ids contained in the ``SpikeList``,  
    119119use the function ``id_list()``:: 
    133133 
    134134    >>> subspklist = spklist.time_slice(500,1500) 
    135     >>> subspklist = spklist.id_slice(50) # Will select 50 randoms id within spklist.id_list() 
     135    >>> subspklist = spklist.id_slice(50) # Will select 50 random id within spklist.id_list() 
    136136    >>> subspklist = spklist.id_slice([2,3,5,6]) 
    137137 
    138 If you want to select only cells mathcing a particular criteria within the ``SpikeList``, you can use the 
     138If you want to select only cells matching a particular criteria within the ``SpikeList``, you can use the 
    139139``select_ids`` method:: 
    140140 
    166166``NeuroTools.signals`` also handles analog signals. These are generally also 
    167167recorded during a simulation or experiment, such as for example a Vm trace, a conductance or a current. Such a signal is 
    168 definied by a number of values between ``t_start`` and ``t_stop`` with a time step ``dt``. 
     168defined by a number of values between ``t_start`` and ``t_stop`` with a time step ``dt``. 
    169169 
    170170The ``AnalogSignal`` class 
    210210and additional parameters like ``t_start``, ``t_stop``, and the list of all the recorded ids. The last three parameters 
    211211can't be inferred from the data safely, so it's better if they are specified by the user. Nevertheless, the most 
    212 commmon way to create ``AnalogSignal``\s in NeuroTools is to use the ``load_analogsignal()`` or ``load()`` functions, as 
     212common way to create ``AnalogSignal``\s in NeuroTools is to use the ``load_analogsignal()`` or ``load()`` functions, as 
    213213explained below. Currently, the constructor of the ``AnalogSignalList`` is mainly tuned to be used with these load functions,  
    214214and it is therefore not so simple to create one from a list of ``AnalogSignal``\s:: 
    256256    >>> vm = load(StandardPickleFile("vm.dat"),'v) # Read the pickle file 
    257257 
    258 Note that for the moment, there is a slight disinction for the conductance files, since the ``load`` function is 
     258Note that for the moment, there is a slight distinction for the conductance files, since the ``load`` function is 
    259259tuned for PyNN. Since PyNN saves exc/inh conductances in the same file, the ``load`` function, called on a file 
    260260generated by PyNN, will return two ``AnalogSignalList`` :: 
    264264.. _PyNN: http://neuralensemble.org/PyNN/ 
    265265 
     266 
    266267}}}