I've been attempting to develop a mod file to re-create an input current similar to what was used in Pozzorini et al (2015). Unfortunately, I'm finding that this task is a bit outside of my wheelhouse as I have not yet needed to make mod files. As it stands, I'm not sure if I have mistakes in the main ODE or somewhere in the structure of the mod file code, or both (probably both). According to Pozzorini et al (2015), the input current should be as follows:

i(t+dt) = i(t) + ((io-i(t))*(dt/tau)) + sqrt(2*(sigma^2)*(dt/tau))*N(0,1)

sigma(t) = sigmao*(1+dsigma*sin(2*PI*freq*t))

...Where...

dt = 0.05 ms

tau = 3 ms

io = 520 pA

freq = 0.2 Hz

N(0,1) = Random sampling from a normal distribution of mean 0 and standard deviation 1.

sigmao = 320 pA

dsigma = 0.5 (dimensionless)

Here is what I have so far:

Code: Select all

```
COMMENT
Written according to equations and parameter values taken from:
Pozzorini C, Mensi S, Hagens O, Naud R, Koch C, Gerstner W. (2015). Automated High-Throughput Characterization of Single Neurons by Means of Simplified Spiking Models. PLoS. Comput. Biol. 11(6):e1004275.
ENDCOMMENT
NEURON {
POINT_PROCESS InputCurrentPoz
RANGE del, dur, tau, io, freq, sigmao, dsigma, sigma
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
}
PARAMETER {
del=0 (ms)
dur=0 (ms)
tau=3 (ms)
io=0.52 (nA)
freq=0.0002 (/ms)
sigmao=0.32 (nA)
dsigma=0.5
PI=3.14159265358979323846
dt (ms)
}
ASSIGNED {
i (nA)
sigma (nA)
}
BREAKPOINT {
at_time(del)
at_time(del + dur)
if (t < del) {
i=0
}else{
if (t < del+dur) {
i = i + ((io-i)*(dt/tau)) + sqrt(2*(sigma^2)*(dt/tau))*urand()
: sigma(t) = sigmao*(1+dsigma*sin(2*PI*freq*t))
sigma = sigma + 2*PI*sigmao*dsigma*(freq*dt)*cos(2*PI*(freq*t))
}else{
i = 0
}
}
}
FUNCTION urand() {
urand = scop_random()
}
```

Code: Select all

```
Checking units of /Users/alexgm/Desktop/SkinnerLab/Usages/InputSimsForRedux/InputCurrentPoz.mod
1-18 coul2/sec2
The previous expression is not dimensionless at line 41 in file /InputCurrentPoz.mod
i = i + ((io-i)*(dt/tau)) + sqrt(2*(sigma^2)*(dt/tau)<<ERROR>>)*urand()
Press 'return' key to close
```

Code: Select all

```
oc>run()
exp(700.188) out of range, returning exp(700)
exp(712.415) out of range, returning exp(700)
exp(709.561) out of range, returning exp(700)
exp(752.101) out of range, returning exp(700)
No more errno warnings during this execution
errno set 2033 times on last execution
```

References:

Pozzorini C, Mensi S, Hagens O, Naud R, Koch C, Gerstner W. (2015). Automated High-Throughput Characterization of Single Neurons by Means of Simplified Spiking Models. PLoS Comput Biol. 11(6):e1004275.