Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a library with supported shapes #192

Closed
DimitriPlotnikov opened this issue Jun 23, 2016 · 1 comment · Fixed by #879
Closed

Add a library with supported shapes #192

DimitriPlotnikov opened this issue Jun 23, 2016 · 1 comment · Fixed by #879

Comments

@DimitriPlotnikov
Copy link
Contributor

exp, alpha, delta

@Silmathoron
Copy link
Member

Silmathoron commented Dec 13, 2016

Thinking back on #330 and reading this issue again, I think this could be implemented easily using the apply_spikes proposal by overriding it with:

  • apply_spikes(I_syn_ex, spikes_ex, model="alpha", tau_syn=tau_syn_ex)
  • apply_spikes(I_syn_ex, spikes_ex, model="exp", tau_syn=tau_syn_ex)
  • apply_spikes(spikes_ex, model="delta")

Using this function, the user wouldn't have anything to declare except I_syn_ex in the state block.

EDIT: maybe it would therefore be better to have the spike buffer as 1st parameter, in order to get a function of the form (in the python syntax):

def apply_spikes(spike_buffer, state_variable=None, model=None, tau_syn=None,
                 normalization=None, shape=None):
    '''
    Apply the effect of the spikes on the state variables.
    
    Parameters
    ----------
    buffer : spike_buffer (real)
        Buffer storing the spikes that should be applied.
    state_variable : state variable, optional (default: None)
        State variable on which the spikes should be applied, e.g. `I_syn_ex`
        for a model with post-synaptic currents implementing excitatory
        synapses. If the state variable is computed through a differential
        equation, the user should pass the right time derivative on which
        the effect of the spikes is applied.
    model : str, optional (default: None)
        Name of the predefined model that should be used, among "alpha", "exp",
        and "delta".
    tau_syn : parameter (ms), optional (default: None)
        Synaptic time constant to be used by either the "exp" or "alpha"
        predefined model.
    normalization : float, optional, (default: None)
        Normalization constant to set the peak value of the current or
        conductance. E.g. for an implicitely defined alpha-shape current
        (declared through an ODE), the constant is ``1pA*e/tau_syn_ex``.
    shape : function, optional (default: None)
        Custom shape function which will be used to convolve the spike times.
    
    Notes
    -----
    The optional parameters can be combined in the following ways:
        * `model` alone for "delta"
        * `state_variable` + `model` + `tau_syn` (for "alpha" and "exp")
        * `state_variable` + `shape`
        * `state_variable` alone if no normalization factor is required
        (defaults to 1), e.g. for exponential synapses declared through an ODE.
        * a derivative of the `state_variable` + `normalization` (for synaptic
        state-variables declared through an ODE)
    '''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants