Implementing Superposition to "custom" waveforms in NMODL
Posted: Fri Oct 30, 2020 10:08 pm
Hello,
I am wondering if there is a way to implement superposition for waveforms that are "saved" in the form of a constant, predetermined array.
For example, the basic exp2syn.mod mechanism defines conductance waveforms that are governed by a double exponential function with respective DERIVATIVE state blocks. In an example situation where two NET_RECEIVE events occur somewhat close in time (let's say at t1 and t2), the output of the exp2syn conductance is presumably the sum/superposition of two waveforms. The key feature that I am trying to capture from this example is that the effects of the first waveform can be "felt" on the overall output even after t2. I am unsure exactly how NEURON maintains this superposition of waveforms. I assume it is something that happens "behind the scenes" and is hidden from the NMODL level. I am also wondering if this superposition feature is exclusive to variables defined as state variables/have a differential equation associated with them.
What I am ideally trying to achieve is this. Assume I have an array in my NMODL mechanism that stores a prerecorded, finite, and decaying waveform (where each index of the array represents subsequent timesteps--which admittedly will only work for fixed timestep NEURON simulations). I can already successfully output this saved waveform by incrementing some indexing variable at each timestep and outputting the contents of the array. I would like my NMODL mechanism to, just like exp2syn, be able to output superpositions of this saved waveform in the event of NET_RECEIVE inputs which result in overlapping waveforms. Again, the crucial feature that I am trying to achieve is the effects of waveform1 continuing AFTER t2 (after waveform 2 occurs). Since these waveforms are fixed and finite, I wasn't sure if this is achievable since there is no differential equation governing the waveforms.
I appreciate any help on this issue! Thanks :)
I am wondering if there is a way to implement superposition for waveforms that are "saved" in the form of a constant, predetermined array.
For example, the basic exp2syn.mod mechanism defines conductance waveforms that are governed by a double exponential function with respective DERIVATIVE state blocks. In an example situation where two NET_RECEIVE events occur somewhat close in time (let's say at t1 and t2), the output of the exp2syn conductance is presumably the sum/superposition of two waveforms. The key feature that I am trying to capture from this example is that the effects of the first waveform can be "felt" on the overall output even after t2. I am unsure exactly how NEURON maintains this superposition of waveforms. I assume it is something that happens "behind the scenes" and is hidden from the NMODL level. I am also wondering if this superposition feature is exclusive to variables defined as state variables/have a differential equation associated with them.
What I am ideally trying to achieve is this. Assume I have an array in my NMODL mechanism that stores a prerecorded, finite, and decaying waveform (where each index of the array represents subsequent timesteps--which admittedly will only work for fixed timestep NEURON simulations). I can already successfully output this saved waveform by incrementing some indexing variable at each timestep and outputting the contents of the array. I would like my NMODL mechanism to, just like exp2syn, be able to output superpositions of this saved waveform in the event of NET_RECEIVE inputs which result in overlapping waveforms. Again, the crucial feature that I am trying to achieve is the effects of waveform1 continuing AFTER t2 (after waveform 2 occurs). Since these waveforms are fixed and finite, I wasn't sure if this is achievable since there is no differential equation governing the waveforms.
I appreciate any help on this issue! Thanks :)