Comments (1)
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)
'''
from nestml.
Related Issues (20)
- Replace occurrences of my fork ("clinssen") with upstream in docs
- Upgrade NEST version detection after NEST 3.4 release
- Add benchmarks to documentation HOT 1
- Ornstein-Uhlenbeck noise neuron fails to spike
- Remove outdated asserts from NEST templates HOT 2
- Separate NESTML model documentation HOT 1
- Replace model links in Jupyter notebooks
- Introduce an ``import`` or ``include`` statement
- Add erf/erfc as predefined functions?
- Fix units in documentation example
- Threshold crossing based on derivative of membrane potential
- Synapse trace value can return 0 in edge case
- Incorrect reference of spike input ports in the result of a numeric solver
- Divisions of integers not converted to divisions of doubles in generated C++ code of nestml functions HOT 5
- STDP window: Weight updates only when preSpikes are detected
- neuromodulated_stdp.nestml equations HOT 50
- third factor plasticity implementation
- ReadTheDocs build issue HOT 1
- Improve automatic model documentation generation HOT 1
- unit of Conductance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestml.