Changeset 1040 for trunk

Show
Ignore:
Timestamp:
12/20/11 12:22:03 (5 months ago)
Author:
pierre
Message:

Simplification of the individual cells.py files and unification of the docstrings, that will have to be written only once in the common cell.py files.

Location:
trunk/src
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/brian/standardmodels/cells.py

    r957 r1040  
    1919 
    2020class IF_curr_alpha(cells.IF_curr_alpha): 
    21     """Leaky integrate and fire model with fixed threshold and alpha-function- 
    22     shaped post-synaptic current.""" 
     21 
     22    __doc__ = cells.IF_curr_alpha.__doc__         
     23     
    2324    translations = build_translations( 
    2425        ('v_rest',     'v_rest',     mV), 
     
    5859 
    5960class IF_curr_exp(cells.IF_curr_exp): 
    60     """Leaky integrate and fire model with fixed threshold and 
    61     decaying-exponential post-synaptic current. (Separate synaptic currents for 
    62     excitatory and inhibitory synapses.""" 
     61     
     62    __doc__ = cells.IF_curr_exp.__doc__     
    6363     
    6464    translations = build_translations( 
     
    9999 
    100100class IF_cond_alpha(cells.IF_cond_alpha): 
     101 
     102    __doc__ = cells.IF_cond_alpha.__doc__     
     103 
    101104    translations = build_translations( 
    102105        ('v_rest',     'v_rest',     mV), 
     
    141144 
    142145class IF_cond_exp(cells.IF_cond_exp): 
    143     """Leaky integrate and fire model with fixed threshold and  
    144     exponentially-decaying post-synaptic conductance.""" 
     146     
     147    __doc__ = cells.IF_cond_exp.__doc__     
     148 
    145149    translations = build_translations( 
    146150        ('v_rest',     'v_rest',     mV), 
     
    192196 
    193197class SpikeSourcePoisson(cells.SpikeSourcePoisson): 
    194     """Spike source, generating spikes according to a Poisson process.""" 
     198 
     199    __doc__ = cells.SpikeSourcePoisson.__doc__      
     200 
    195201    translations = build_translations( 
    196202        ('rate',     'rate'), 
     
    220226     
    221227class SpikeSourceArray(cells.SpikeSourceArray): 
    222     """Spike source generating spikes at the times given in the spike_times array.""" 
     228 
     229    __doc__ = cells.SpikeSourceArray.__doc__     
     230 
    223231    translations = build_translations( 
    224232        ('spike_times', 'spiketimes', ms), 
     
    236244 
    237245class EIF_cond_alpha_isfa_ista(cells.EIF_cond_alpha_isfa_ista): 
    238     """ 
    239     Exponential integrate and fire neuron with spike triggered and 
    240     sub-threshold adaptation currents (isfa, ista reps.) according to: 
    241      
    242     Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model 
    243     as an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642 
    244  
    245     See also: IF_cond_exp_gsfa_grr, EIF_cond_exp_isfa_ista 
    246     """ 
     246 
     247    __doc__ = cells.EIF_cond_alpha_isfa_ista.__doc__  
    247248     
    248249    translations = build_translations( 
     
    302303 
    303304class EIF_cond_exp_isfa_ista(cells.EIF_cond_exp_isfa_ista): 
    304     """ 
    305     Exponential integrate and fire neuron with spike triggered and 
    306     sub-threshold adaptation currents (isfa, ista reps.) according to: 
    307      
    308     Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model 
    309     as an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642 
    310  
    311     See also: IF_cond_exp_gsfa_grr, EIF_cond_exp_isfa_ista 
    312     """ 
     305 
     306    __doc__ = cells.EIF_cond_exp_isfa_ista.__doc__     
    313307     
    314308    translations = build_translations( 
     
    367361 
    368362class HH_cond_exp(cells.HH_cond_exp): 
     363 
     364   __doc__ = cells.HH_cond_exp.__doc__     
    369365    
    370366   translations = build_translations( 
  • trunk/src/moose/standardmodels/cells.py

    r957 r1040  
    1414 
    1515class IF_cond_exp(cells.IF_cond_exp): 
    16     """Leaky integrate and fire model with fixed threshold and  
    17     exponentially-decaying post-synaptic conductance.""" 
     16     
     17    __doc__ = cells.IF_cond_exp.__doc__     
    1818     
    1919    translations = build_translations( 
     
    4141    """Leaky integrate and fire model with fixed threshold and alpha-function- 
    4242    shaped post-synaptic conductance.""" 
    43      
     43 
     44    __doc__ = cells.IF_cond_alpha.__doc__         
     45 
    4446    translations = IF_cond_exp.translations 
    4547    model = StandardIF 
     
    5153 
    5254class HH_cond_exp(cells.HH_cond_exp): 
    53     """Single compartment cell with an Na channel and a K channel""" 
     55     
     56    __doc__ = cells.HH_cond_exp.__doc__     
     57 
    5458    translations = build_translations( 
    5559        ('gbar_Na',    'GbarNa', 1e-9),    
     
    7276 
    7377class SpikeSourcePoisson(cells.SpikeSourcePoisson): 
    74     """Spike source, generating spikes according to a Poisson process.""" 
     78     
     79    __doc__ = cells.SpikeSourcePoisson.__doc__      
    7580 
    7681    translations = build_translations( 
     
    8388 
    8489class SpikeSourceArray(cells.SpikeSourceArray): 
    85     """Spike source generating spikes at the times given in the spike_times array.""" 
     90     
     91    __doc__ = cells.SpikeSourceArray.__doc__     
    8692 
    8793    translations = build_translations( 
  • trunk/src/nest/standardmodels/cells.py

    r957 r1040  
    1111  
    1212class IF_curr_alpha(cells.IF_curr_alpha): 
    13     """ 
    14     Leaky integrate and fire model with fixed threshold and alpha-function- 
    15     shaped post-synaptic current. 
    16     """ 
     13 
     14    __doc__ = cells.IF_curr_alpha.__doc__     
    1715 
    1816    translations = build_translations( 
     
    3331 
    3432class IF_curr_exp(cells.IF_curr_exp): 
    35     """ 
    36     Leaky integrate and fire model with fixed threshold and 
    37     decaying-exponential post-synaptic current. (Separate synaptic currents for 
    38     excitatory and inhibitory synapses. 
    39     """ 
     33     
     34    __doc__ = cells.IF_curr_exp.__doc__     
    4035     
    4136    translations = build_translations( 
     
    5651 
    5752class IF_cond_alpha(cells.IF_cond_alpha): 
    58     """ 
    59     Leaky integrate and fire model with fixed threshold and alpha-function- 
    60     shaped post-synaptic conductance. 
    61     """ 
     53 
     54    __doc__ = cells.IF_cond_alpha.__doc__     
    6255 
    6356    translations = build_translations( 
     
    8073 
    8174class IF_cond_exp(cells.IF_cond_exp): 
    82     """ 
    83     Leaky integrate and fire model with fixed threshold and  
    84     exponentially-decaying post-synaptic conductance. 
    85     """ 
     75 
     76    __doc__ = cells.IF_cond_exp.__doc__     
    8677     
    8778    translations = build_translations( 
     
    10495 
    10596class IF_cond_exp_gsfa_grr(cells.IF_cond_exp_gsfa_grr): 
    106     """ 
    107     Linear leaky integrate and fire model with fixed threshold, 
    108     decaying-exponential post-synaptic conductance, conductance based 
    109     spike-frequency adaptation, and a conductance-based relative refractory 
    110     mechanism. 
    111  
    112     See: Muller et al (2007) Spike-frequency adapting neural ensembles: Beyond 
    113     mean-adaptation and renewal theories. Neural Computation 19: 2958-3010. 
    114  
    115     See also: EIF_cond_alpha_isfa_ista 
    116     """ 
     97 
     98    __doc__ = cells.IF_cond_exp_gsfa_grr.__doc__     
     99 
    117100    translations = build_translations( 
    118101        ('v_rest',     'E_L'), 
     
    140123 
    141124class IF_facets_hardware1(cells.IF_facets_hardware1): 
    142     """ 
    143     Leaky integrate and fire model with conductance-based synapses and fixed  
    144     threshold as it is resembled by the FACETS Hardware Stage 1. For further  
    145     details regarding the hardware model see the FACETS-internal Wiki: 
    146     https://facets.kip.uni-heidelberg.de/private/wiki/index.php/WP7_NNM 
    147     """ 
     125     
     126    __doc__ = cells.IF_facets_hardware1.__doc__         
     127 
    148128    # in 'iaf_cond_exp', the dimension of C_m is pF,  
    149129    # while in the pyNN context, cm is given in nF 
     
    169149 
    170150class HH_cond_exp(cells.HH_cond_exp): 
    171     """Single-compartment Hodgkin-Huxley model.""" 
     151     
     152    __doc__ = cells.HH_cond_exp.__doc__     
    172153     
    173154    translations = build_translations( 
     
    192173    
    193174class EIF_cond_alpha_isfa_ista(cells.EIF_cond_alpha_isfa_ista): 
    194     """ 
    195     Exponential integrate and fire neuron with spike triggered and sub-threshold 
    196     adaptation currents (isfa, ista reps.) according to: 
    197      
    198     Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model as 
    199     an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642 
    200  
    201     See also: IF_cond_exp_gsfa_grr 
    202     """ 
     175 
     176    __doc__ = cells.EIF_cond_alpha_isfa_ista.__doc__  
    203177 
    204178    translations = build_translations( 
     
    226200 
    227201class SpikeSourcePoisson(cells.SpikeSourcePoisson): 
    228     """Spike source, generating spikes according to a Poisson process.""" 
     202 
     203    __doc__ = cells.SpikeSourcePoisson.__doc__  
    229204 
    230205    translations = build_translations( 
     
    244219 
    245220class SpikeSourceInhGamma(cells.SpikeSourceInhGamma): 
    246     """ 
    247     Spike source, generating realizations of an inhomogeneous gamma process, 
    248     employing the thinning method. 
    249  
    250     See: Muller et al (2007) Spike-frequency adapting neural ensembles: Beyond 
    251     mean-adaptation and renewal theories. Neural Computation 19: 2958-3010. 
    252     """ 
     221     
     222    __doc__ = cells.SpikeSourceInhGamma.__doc__  
    253223 
    254224    translations = build_translations( 
     
    269239 
    270240class SpikeSourceArray(cells.SpikeSourceArray): 
    271     """Spike source generating spikes at the times given in the spike_times array.""" 
     241     
     242    __doc__ = cells.SpikeSourceArray.__doc__ 
    272243 
    273244    translations = build_translations( 
     
    279250 
    280251class EIF_cond_exp_isfa_ista(cells.EIF_cond_exp_isfa_ista): 
    281     """ 
    282     Exponential integrate and fire neuron with spike triggered and sub-threshold 
    283     adaptation currents (isfa, ista reps.) according to: 
    284      
    285     Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model as 
    286     an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642 
    287  
    288     See also: IF_cond_exp_gsfa_grr 
    289     """ 
     252     
     253    __doc__ = cells.EIF_cond_exp_isfa_ista.__doc__ 
    290254 
    291255    translations = build_translations( 
  • trunk/src/neuron/standardmodels/cells.py

    r957 r1040  
    1919 
    2020class IF_curr_alpha(cells.IF_curr_alpha): 
    21     """Leaky integrate and fire model with fixed threshold and alpha-function- 
    22     shaped post-synaptic current.""" 
     21     
     22    __doc__ = cells.IF_curr_alpha.__doc__       
    2323     
    2424    translations = build_translations( 
     
    4242 
    4343class IF_curr_exp(cells.IF_curr_exp): 
    44     """Leaky integrate and fire model with fixed threshold and 
    45     decaying-exponential post-synaptic current. (Separate synaptic currents for 
    46     excitatory and inhibitory synapses.""" 
     44     
     45    __doc__ = cells.IF_curr_exp.__doc__     
    4746     
    4847    translations = build_translations( 
     
    6665 
    6766class IF_cond_alpha(cells.IF_cond_alpha): 
    68     """Leaky integrate and fire model with fixed threshold and alpha-function- 
    69     shaped post-synaptic conductance.""" 
     67     
     68    __doc__ = cells.IF_cond_alpha.__doc__     
    7069     
    7170    translations = build_translations( 
     
    9291 
    9392class IF_cond_exp(cells.IF_cond_exp): 
    94     """Leaky integrate and fire model with fixed threshold and  
    95     exponentially-decaying post-synaptic conductance.""" 
     93     
     94    __doc__ = cells.IF_cond_exp.__doc__     
    9695     
    9796    translations = build_translations( 
     
    118117 
    119118class IF_facets_hardware1(cells.IF_facets_hardware1): 
    120     """Leaky integrate and fire model with conductance-based synapses and fixed 
    121     threshold as it is resembled by the FACETS Hardware Stage 1. For further 
    122     details regarding the hardware model see the FACETS-internal Wiki: 
    123     https://facets.kip.uni-heidelberg.de/private/wiki/index.php/WP7_NNM 
    124     """ 
     119     
     120    __doc__ = cells.IF_facets_hardware1.__doc__         
    125121 
    126122    translations = build_translations( 
     
    147143class HH_cond_exp(cells.HH_cond_exp): 
    148144     
     145    __doc__ = cells.HH_cond_exp.__doc__     
     146 
    149147    translations = build_translations( 
    150148        ('gbar_Na',    'gbar_Na',   1e-3),   # uS -> mS 
     
    172170 
    173171class IF_cond_exp_gsfa_grr(cells.IF_cond_exp_gsfa_grr): 
    174     """ 
    175     Linear leaky integrate and fire model with fixed threshold, 
    176     decaying-exponential post-synaptic conductance, conductance based 
    177     spike-frequency adaptation, and a conductance-based relative refractory 
    178     mechanism. 
    179  
    180     See: Muller et al (2007) Spike-frequency adapting neural ensembles: Beyond 
    181     mean-adaptation and renewal theories. Neural Computation 19: 2958-3010. 
    182  
    183     See also: EIF_cond_alpha_isfa_ista 
    184     """ 
     172 
     173    __doc__ = cells.IF_cond_exp_gsfa_grr.__doc__         
     174 
    185175    translations = build_translations( 
    186176        ('v_rest',     'v_reset'), 
     
    213203 
    214204class SpikeSourcePoisson(cells.SpikeSourcePoisson): 
    215     """Spike source, generating spikes according to a Poisson process.""" 
     205 
     206    __doc__ = cells.SpikeSourcePoisson.__doc__      
    216207 
    217208    translations = build_translations( 
     
    224215 
    225216class SpikeSourceArray(cells.SpikeSourceArray): 
    226     """Spike source generating spikes at the times given in the spike_times array.""" 
     217     
     218    __doc__ = cells.SpikeSourceArray.__doc__     
    227219 
    228220    translations = build_translations( 
     
    233225         
    234226class EIF_cond_alpha_isfa_ista(cells.EIF_cond_alpha_isfa_ista): 
    235     """ 
    236     Exponential integrate and fire neuron with spike triggered and sub-threshold 
    237     adaptation currents (isfa, ista reps.) according to: 
    238      
    239     Brette R and Gerstner W (2005) Adaptive Exponential Integrate-and-Fire Model as 
    240     an Effective Description of Neuronal Activity. J Neurophysiol 94:3637-3642 
    241  
    242     See also: IF_cond_exp_gsfa_grr 
    243     """ 
     227     
     228    __doc__ = cells.EIF_cond_alpha_isfa_ista.__doc__  
    244229     
    245230    translations = build_translations( 
     
    269254 
    270255class EIF_cond_exp_isfa_ista(cells.EIF_cond_exp_isfa_ista): 
    271     """Like EIF_cond_alpha_isfa_ista, but with single-exponential synapses.""" 
     256     
     257    __doc__ = cells.EIF_cond_exp_isfa_ista.__doc__     
    272258     
    273259    translations = EIF_cond_alpha_isfa_ista.translations 
  • trunk/src/nineml/cells.py

    r1010 r1040  
    5959 
    6060class IF_curr_exp(cells.IF_curr_exp, CellTypeMixin): 
    61     """Leaky integrate and fire model with fixed threshold and 
    62     decaying-exponential post-synaptic current. (Separate synaptic currents for 
    63     excitatory and inhibitory synapses.""" 
     61     
     62    __doc__ = cells.IF_curr_exp.__doc__       
    6463     
    6564    translations = standardmodels.build_translations( 
     
    9089class IF_cond_exp(cells.IF_cond_exp, CellTypeMixin): 
    9190    
     91    __doc__ = cells.IF_cond_exp.__doc__     
     92 
    9293    translations = standardmodels.build_translations( 
    9394        ('tau_m',      'membraneTimeConstant'), 
     
    118119 
    119120class IF_cond_alpha(cells.IF_cond_exp, CellTypeMixin): 
     121 
     122    __doc__ = cells.IF_cond_alpha.__doc__     
    120123    
    121124    translations = standardmodels.build_translations( 
     
    147150 
    148151class SpikeSourcePoisson(cells.SpikeSourcePoisson, CellTypeMixin): 
     152 
     153    __doc__ = cells.SpikeSourcePoisson.__doc__      
    149154     
    150155    translations = standardmodels.build_translations( 
  • trunk/src/pcsim/standardmodels/cells.py

    r957 r1040  
    1717 
    1818class IF_curr_alpha(cells.IF_curr_alpha): 
    19     """Leaky integrate and fire model with fixed threshold and alpha-function- 
    20     shaped post-synaptic current.""" 
     19     
     20    __doc__ = cells.IF_curr_alpha.__doc__    
    2121     
    2222    translations = build_translations( 
     
    4242 
    4343class IF_curr_exp(cells.IF_curr_exp): 
    44     """Leaky integrate and fire model with fixed threshold and 
    45        decaying-exponential post-synaptic current. (Separate synaptic currents for 
    46        excitatory and inhibitory synapses.""" 
     44     
     45    __doc__ = cells.IF_curr_exp.__doc__     
    4746     
    4847    translations = build_translations( 
     
    6867 
    6968class IF_cond_alpha(cells.IF_cond_alpha): 
    70     """Leaky integrate and fire model with fixed threshold and alpha-function- 
    71     shaped post-synaptic conductance.""" 
     69     
     70    __doc__ = cells.IF_cond_alpha.__doc__     
    7271     
    7372    translations = build_translations( 
     
    9695 
    9796class IF_cond_exp(cells.IF_cond_exp): 
    98     """Leaky integrate and fire model with fixed threshold and  
    99     exponentially-decaying post-synaptic conductance.""" 
     97     
     98    __doc__ = cells.IF_cond_exp.__doc__     
    10099     
    101100    translations = build_translations( 
     
    125124""" Implemented not tested """ 
    126125class SpikeSourcePoisson(cells.SpikeSourcePoisson): 
    127     """Spike source, generating spikes according to a Poisson process.""" 
     126     
     127    __doc__ = cells.SpikeSourcePoisson.__doc__      
    128128 
    129129    translations = build_translations( 
     
    164164 
    165165class SpikeSourceArray(cells.SpikeSourceArray): 
    166     """Spike source generating spikes at the times given in the spike_times array.""" 
     166 
     167    __doc__ = cells.SpikeSourceArray.__doc__     
     168 
    167169    translations = build_translations( 
    168170        ('spike_times', 'spikeTimes'), # 1e-3),