Changeset 311

Show
Ignore:
Timestamp:
11/10/08 11:21:06 (2 months ago)
Author:
apdavison
Message:

Added some module-level docstrings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/analysis.py

    r298 r311  
    1010from NeuroTools import check_dependency 
    1111 
     12 
     13def arrays_almost_equal(a, b, threshold): 
     14    return (abs(a-b) < threshold).all() 
    1215 
    1316def ccf(x, y, axis=None): 
  • trunk/src/parameters.py

    r298 r311  
    11""" 
    2 Module for dealing with model parameters. 
    3  
    4 Andrew Davison, UNIC, CNRS 
    5 Eilif Muller, EPFL, Switzerland 
    6 $Id:$ 
     2NeuroTools.parameters 
     3===================== 
     4 
     5A module for dealing with model parameters. 
     6 
     7Classes 
     8------- 
     9 
     10Parameter 
     11ParameterRange - for specifying a list of possible values for a given parameter. 
     12ParameterSet   - for representing/managing hierarchical parameter sets. 
     13ParameterTable - a sub-class of ParameterSet that can represent a table of parameters. 
     14ParameterSpace - a collection of ParameterSets, representing multiple points in 
     15                 parameter space. 
     16 
     17Functions 
     18--------- 
     19 
     20nesteddictwalk    - Walk a nested dict structure, using a generator. 
     21nesteddictflatten - Return a flattened version of a nested dict structure. 
     22string_table      - Convert a table written as a multi-line string into a dict of dicts. 
     23 
    724""" 
    825 
     
    7592class ParameterRange(Parameter): 
    7693    """ 
    77     A class for specifying a list of possible parameters for a given 
    78     parameter. 
     94    A class for specifying a list of possible values for a given parameter. 
    7995     
    8096    The value must be an iterable. It acts like a Parameter, but .next() can be 
  • trunk/src/random.py

    r298 r311  
    1 # Classes for specifiying a parameter by a statistical distribution 
     1""" 
     2NeuroTools.random 
     3===================== 
     4 
     5A set of classes representing statistical distributions, with an interface that 
     6is compatible with the ParameterSpace class in the parameters module. 
     7 
     8Classes 
     9------- 
     10 
     11GammaDist   - gamma.pdf(x,a,b) = x**(a-1)*exp(-x/b)/gamma(a)/b**a 
     12NormalDist  - normal distribution 
     13UniformDist - uniform distribution 
     14 
     15""" 
    216 
    317from NeuroTools import check_dependency 
  • trunk/src/signals.py

    r308 r311  
    99------- 
    1010 
    11 SpikeTrain       - An object representing a spike train, for one cells. Useful for plots,  
    12                    calculus like ISI, CV, mean rate(), ... 
    13 SpikeList        - An object representing the activity of a population of neurons. It's a 
    14                    dictionnary of SpikeTrain objects, and again, the SpikeList object have 
    15                    built-in methods to compute firing_rate, ISI, CV, cross-correlations, and 
    16                    so on.  
     11SpikeTrain       - An object representing a spike train, for one cell. Useful for plots,  
     12                   calculations such as ISI, CV, mean rate(), ... 
     13SpikeList        - An object representing the activity of a population of neurons. Functions as a 
     14                   dictionary of SpikeTrain objects, with methods to compute firing rate, 
     15                   ISI, CV, cross-correlations, and so on.  
    1716AnalogSignal     - An object representing an analog signal, with its data. Can be used to do  
    1817                   threshold detection, event triggered averages, ... 
    19 AnalogSignalList - A list of AnalogSignal objects, again with functions such as mean, std, plot,  
     18AnalogSignalList - A list of AnalogSignal objects, again with methods such as mean, std, plot,  
    2019                   and so on 
    2120VmList           - An AnalogSignalList object used for Vm traces 
    22 ConductanceList  - An AnalogSignalList object used for conductances traces 
     21ConductanceList  - An AnalogSignalList object used for conductance traces 
    2322CurrentList      - An AnalogSignalList object used for current traces 
    2423 
     
    2625--------- 
    2726 
    28 load_spikelist       - Function to load a SpikeList object from a file that have been generated by pyNN
    29                        Can also have been generated by your particular simulator/format, but then you have 
     27load_spikelist       - load a SpikeList object from a file. Expects a particular format
     28                       Can also load data in a different format, but then you have 
    3029                       to write your own File object that will know how to read the data (see io.py) 
    31 load_vmlist          - Function to load a VmList object (inherits from AnalogSignalList) from a file 
    32                        generated by pyNN. Same comments that previously. Note also that as load_conductancelist 
    33                        the function returns two CurrentList, one for the exc current and one for the inh current 
    34 load_currentlist     - Function to load a CurrentList object (inherits from AnalogSignalList) from a file 
    35                        generated by pyNN. Same comments that previously. Note also that as load_conductancelist 
    36                        the function returns two CurrentList, one for the exc current and one for the inh current 
    37 load_conductancelist - Function to load a ConductanceList object (inherits from AnalogSignalList) from a file 
    38                        generated by pyNN. Same comments that previously. load_conductancelist returns two  
    39                        ConductanceList, one for the exc conductance and one for the inh conductance 
    40 load                 - A generic loader for all those previous load method. 
     30load_vmlist          - Function to load a VmList object (inherits from AnalogSignalList) from a file. 
     31                       Same comments on format as previously. 
     32load_currentlist     - Function to load a CurrentList object (inherits from AnalogSignalList) from a file. 
     33                       Same comments on format as previously. 
     34load_conductancelist - Function to load a ConductanceList object (inherits from AnalogSignalList) from a file. 
     35                       Same comments on format as previously. load_conductancelist returns two  
     36                       ConductanceLists, one for the excitatory conductance and one for the inhibitory conductance 
     37load                 - A generic loader for all the previous load methods. 
    4138""" 
    4239 
     
    5855    import pylab 
    5956else: 
    60     MATPLOTLIB_ERROR = "No pylab package have been detected" 
     57    MATPLOTLIB_ERROR = "The pylab package was not detected" 
    6158 
    6259 
  • trunk/src/visual_logging.py

    r298 r311  
    11""" 
    2 Visual logging 
     2NeuroTools.visual_logging 
     3========================= 
    34 
    4 log graphs, rather than text 
     5Log graphs, rather than text. This is useful when dealing with large data 
     6structures, such as arrays. x-y data is plotted as a PNG file, which is stored 
     7inside a zip archive. 
     8 
     9You can specify a logging level such that only graphs with an importance above 
     10that level will be created. e.g., if the logging level is set to WARNING, 
     11log graphs with a level of DEBUG or INFO will not be created. 
     12 
     13The interface is a restricted version of that available in the standard 
     14library's logging module. 
     15 
     16Functions 
     17--------- 
     18 
     19basicConfig - specify the zipfile that will be used to store the graphs, and 
     20              the logging level (DEBUG, INFO, WARN, etc) 
     21debug       - plots data with level DEBUG 
     22info        - plots data with level INFO 
     23warning     - plots data with level WARNING 
     24error       - plots data with level ERROR 
     25critical    - plots data with level CRITICAL  
     26exception   - plots data with level ERROR 
     27log         - plots data with a user-specified level 
    528 
    629""" 
     30 
    731import zipfile, atexit, os 
    832from NeuroTools import check_dependency