This commit is contained in:
Jan Grewe 2024-03-04 14:18:10 +01:00
commit 143321cb5d
8 changed files with 65 additions and 97 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -140,8 +140,8 @@
\newcommand{\feod}{\ensuremath{f_{EOD}}}
\newcommand{\feodsolid}{\ensuremath{f_{\rm{EOD}}}}
\newcommand{\feodhalf}{\ensuremath{f_{EOD}/2}}
\newcommand{\fbase}{\ensuremath{f_{Base}}}
\newcommand{\fbasesolid}{\ensuremath{f_{\rm{Base}}}}
\newcommand{\fbase}{\ensuremath{f_{base}}}
\newcommand{\fbasesolid}{\ensuremath{f_{\rm{base}}}}
\newcommand{\fstimintro}{\ensuremath{\rm{EOD}_{2}}}
\newcommand{\feodintro}{\ensuremath{\rm{EOD}_{1}}}
\newcommand{\ffstimintro}{\ensuremath{f_{2}}}
@ -241,27 +241,6 @@
\newcommand{\fdiffe}{$\fdiff{}=f_{EOD}$}%diff of both
\newcommand{\fdiffehalf}{$\fdiff{}=f_{EOD}/2$}%diff of both
%%%%%%%%%%%%%%%%%%%%%%
%Cocktailparty combinations
%\newcommand{\bctwo}{$\Delta f_{Female}$}%sum
%\newcommand{\bcone}{$\Delta f_{Intruder}$}%sum
%\newcommand{\bcsum}{$|\Delta f_{Female} + \Delta f_{Intruder}|$}%sum
%\newcommand{\abcsum}{$A(|\Delta f_{Female} + \Delta f_{Intruder}|)$}%sum
%\newcommand{\bcdiff}{$|\Delta f_{Female} - \Delta f_{Intruder}|$}%diff of both beat frequencies
%\newcommand{\bcsumb}{$|\Delta f_{Female} + \Delta f_{Intruder}| =f_{Base}$}%su\right m
%\newcommand{\bctwob}{$\Delta f_{Female} =f_{Base}$}%sum
%\newcommand{\bconeb}{$\Delta f_{Intruder}=f_{Base}$}%sum
%\newcommand{\bcsumbtwo}{$|\Delta f_{Female} + \Delta f_{Intruder}|=2 f_{Base}$}%sum
%\newcommand{\bcsumbc}{$|\Delta f_{Female} + \Delta f_{Intruder}|=\fbasecorr{}$}%sum
%\newcommand{\bcsume}{$|\Delta f_{Female} + \Delta f_{Intruder}|=f_{EOD}$}%sum
%\newcommand{\bcsumehalf}{$|\Delta f_{Female} + \Delta f_{Intruder}|=f_{EOD}/2$}%sum
%\newcommand{\bcdiffb}{$|\Delta f_{Female} - \Delta f_{Intruder}|=f_{Base}$}%diff of both beat frequencies
%\newcommand{\bcdiffbc}{$|\Delta f_{Female} - \Delta f_{Intruder}|=\fbasecorr{}$}%diff of both beat frequencies
%\newcommand{\bcdiffe}{$|\Delta f_{Female} - \Delta f_{Intruder}|=f_{EOD}$}%diff of both
%\newcommand{\bcdiffehalf}{$|\Delta f_{Female} - \Delta f_{Intruder}|=f_{EOD}/2$}%diff of both
\newcommand{\fctwo}{\ensuremath{f_{\rm{Female}}}}%sum
\newcommand{\fcone}{\ensuremath{f_{\rm{Intruder}}}}%sum
@ -476,7 +455,7 @@ Second-order susceptibility is expected to be especially pronounced for low-CV c
\begin{figure*}[!h]
\includegraphics{cells_suscept}
\caption{\label{cells_suscept} \notejg{dashed lines still a little faint} Estimation of linear and nonlinear stimulus encoding in a low-CV P-unit. \textbf{A} Interspike-interval (ISI) distribution of the cell's baseline activity, i.e. the cell is driven only by the unperturbed own field. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} Random amplitude modulation stimulus (top) and responses (spike raster in the lower traces) of the same P-unit. The stimulus contrast reflects the strength of the AM. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 10\% (light purple) and 20\% contrast (dark purple) RAM stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.}
\caption{\label{cells_suscept} \notejg{dashed lines still a little faint} Estimation of linear and nonlinear stimulus encoding in a low-CV P-unit. Calculated based on the first frozen noise repeat. \textbf{A} Interspike interval (ISI) distribution of the cell's baseline activity, i.e. the cell is driven only by the unperturbed own field. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} Random amplitude modulation stimulus (top) and responses (spike raster in the lower traces) of the same P-unit. The stimulus contrast reflects the strength of the AM. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 10\% (light purple) and 20\% contrast (dark purple) RAM stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.}
\end{figure*}
Noise stimuli, the random amplitude modulations (RAM, \subfigref{cells_suscept}{C}, top trace, red line) of the EOD, are commonly used to characterize the stimulus driven responses of P-units by means of the transfer function (first-order susceptibility), the spike-triggered average, or the stimulus-response coherence. Here, we additionally estimate the second-order susceptibility to capture nonlinear encoding. Depending on the stimulus intensity which is given as the contrast, i.e. the amplitude of the noise stimulus in relation to the EOD amplitude (see methods), the spikes align more or less clearly to AMs of the stimulus (light and dark purple for low and high contrast stimuli, \subfigrefb{cells_suscept}{C}). The linear encoding (see \eqnref{linearencoding_methods}) is similar for the two RAM contrasts in this low-CV P-unit (\subfigrefb{cells_suscept}{D}). First-order susceptibility is low for low frequencies, peaks in the range below 100\,Hz and then falls off again.
@ -492,7 +471,7 @@ Irrespective of the CV, neither cell shows the complete proposed structure of no
\begin{figure*}[ht]%hp!
\includegraphics{ampullary}
\caption{\label{ampullary} Estimation of linear and nonlinear stimulus encoding in an ampullary afferent. \textbf{A} Interspike-interval (ISI) distribution of the cell's baseline activity. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} White noise stimulus (top) added to the fish's self-generated electric field and responses (spike raster in the lower traces). The stimulus contrast reflects the strength of the stimulus in relation to the own electric field amplitude. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 2\% (light green) and 20\% contrast (dark green) stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.
\caption{\label{ampullary} Estimation of linear and nonlinear stimulus encoding in an ampullary afferent. Calculated based on the first frozen noise repeat. \textbf{A} Interspike interval (ISI) distribution of the cell's baseline activity. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} White noise stimulus (top) added to the fish's self-generated electric field and responses (spike raster in the lower traces). The stimulus contrast reflects the strength of the stimulus in relation to the own electric field amplitude. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 2\% (light green) and 20\% contrast (dark green) stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.
}
\end{figure*}
@ -663,8 +642,7 @@ The neurons were classified into cell types during the recording by the experime
The electric field of the fish was recorded in two ways: 1. we measured the so-called \textit{global EOD} with two vertical carbon rods ($11\,\centi\meter$ long, 8\,mm diameter) in a head-tail configuration (\figrefb{Setup}, green bars). The electrodes were placed isopotential to the stimulus. This signal was differentially amplified with a factor between 100 and 500 (depending on the recorded animal) and band-pass filtered (3 to 1500\,Hz pass-band, DPA2-FX; npi electronics, Tamm, Germany). 2. The so-called \textit{local EOD} was measured with 1\,cm-spaced silver wires located next to the left gill of the fish and orthogonal to the fish's longitudinal body axis (amplification 100 to 500 times, band-pass filtered with 3 to 1\,500\,Hz pass-band, DPA2-FX; npi-electronics, Tamm, Germany, \figrefb{Setup}, red markers). This local measurement recorded the combination of the fish's own field and the applied stimulus and thus serves as a proxy of the transdermal potential that drives the electroreceptors.
\subsection{Stimulation}
The stimulus was isolated from the ground (ISO-02V, npi-electronics, Tamm, Germany) and delivered via two horizontal carbon rods (30 cm length, 8 mm diameter) located $15\,\centi\meter$ laterally to the fish (\figrefb{Setup}, gray bars). The stimulus was calibrated with respect t>>>>>>> Stashed changes
o the local EOD.
The stimulus was isolated from the ground (ISO-02V, npi-electronics, Tamm, Germany) and delivered via two horizontal carbon rods (30 cm length, 8 mm diameter) located $15\,\centi\meter$ laterally to the fish (\figrefb{Setup}, gray bars). The stimulus was calibrated with respect to the local EOD.
\begin{figure*}[h!]%(\subfigrefb{beat_amplitudes}{B}).
\includegraphics[width=\columnwidth]{Settup}
@ -672,7 +650,9 @@ o the local EOD.
\end{figure*}
\subsection{White noise stimulation}\label{rammethods}
The fish were stimulated with band-limited white noise stimuli with a cut-off frequency of 150, 300 or 400\,Hz. The stimulus intensity is given as the contrast, i.e. the standard deviation of the white noise stimulus in relation to the fish's EOD amplitude. The contrast varied between 1 and 20\,$\%$ for \lepto{} and between 2.5 and 40\,$\%$ for \eigen. Only cell recordings with at least 10\,s of white noise stimulation were included for the analysis. When ampullary cells were recorded, the white noise was directly applied as the stimulus. To create random amplitude modulations (RAM) for P-unit recordings, the EOD of the fish was multiplied with the desired random amplitude modulation profile (MXS-01M; npi electronics).
The fish were stimulated with band-limited white noise stimuli with a cut-off frequency of 150, 300 or 400\,Hz. The stimulus intensity is given as the contrast, i.e. the standard deviation of the white noise stimulus in relation to the fish's EOD amplitude. The contrast varied between 1 and 20\,$\%$. Only cell recordings with at least 10\,s of white noise stimulation were included for the analysis. When ampullary cells were recorded, the white noise was directly applied as the stimulus. To create random amplitude modulations (RAM) for P-unit recordings, the EOD of the fish was multiplied with the desired random amplitude modulation profile (MXS-01M; npi electronics).
% and between 2.5 and 40\,$\%$ for \eigen
\subsection{Data analysis} Data analysis was performed with Python 3 using the packages matplotlib\cite{Hunter2007}, numpy\cite{Walt2011}, scipy\cite{scipy2020}, pandas\cite{Mckinney2010}, nixio\cite{Stoewer2014}, and thunderfish (\url{https://github.com/bendalab/thunderfish}).
@ -710,7 +690,7 @@ The power spectrum was calculated as
S_{ss}(\omega) = \frac{\langle \tilde s(\omega) \tilde s^* (\omega)\rangle}{T}
\end{split}
\end{equation}
with $\tilde s^* $ being the complex conjugate and $\langle ... \rangle$ denotes averaging over the segments. The cross-spectrum $S_{rs}(\omega)$ was calculated according to
with $\tilde s^* $ being the complex conjugate and $\langle ... \rangle$ denoting averaging over the segments. The cross-spectrum $S_{rs}(\omega)$ was calculated according to
\begin{equation}
\label{cross}
\begin{split}
@ -748,16 +728,15 @@ The absolute value of a second-order susceptibility matrix is visualized in \fig
\paragraph{Nonlinearity index}\label{projected_method}
\notejg{use of $f_{Base}$ or $f_{base}$ or $f_0$ should be consistent throughout the manuscript.}
We expect to see nonlinear susceptibility when $\omega_1 + \omega_2 = f_{Base}$. To characterize this we calculated the nonlinearity index (NLI) as
We expect to see nonlinear susceptibility when $\omega_1 + \omega_2 = \fbase{}$. To characterize this we calculated the nonlinearity index (NLI) as
\begin{equation}
\label{eq:nli_equation}
NLI(f_{Base}) = \frac{\max_{f_{Base}-5\,\rm{Hz} \leq f \leq f_{Base}+5\,\rm{Hz}} D(f)}{\mathrm{med}(D(f))}
NLI(\fbase{}) = \frac{\max_{\fbase{}-5\,\rm{Hz} \leq f \leq \fbase{}+5\,\rm{Hz}} D(f)}{\mathrm{med}(D(f))}
\end{equation}
\notejg{sollte es $D(\omega)$ sein?}
For this index, the second-order susceptibility matrix was projected onto the diagonal $D(f)$, by taking the mean of the anti-diagonals. The peakedness at the frequency $f_{Base}$ in $D(f)$ was quantified by finding the maximum of $D(f)$ in the range $f_{Base} \pm 5$\,Hz (\subfigrefb{cells_suscept}{G}, gray area) and dividing it by the median of $D(f)$.
For this index, the second-order susceptibility matrix was projected onto the diagonal $D(f)$, by taking the mean of the anti-diagonals. The peakedness at the frequency $\fbase{}$ in $D(f)$ was quantified by finding the maximum of $D(f)$ in the range $\fbase{} \pm 5$\,Hz (\subfigrefb{cells_suscept}{G}) and dividing it by the median of $D(f)$.
If the same frozen noise was recorded several times in a cell, each noise repetition resulted in a separate second-order susceptibility matrix. The mean of the corresponding \nli{} values was used for the population statistics in \figref{data_overview_mod}.
\notejg{should go to the legend: calculated based on the first frozen noise repeat.}
\subsection{Leaky integrate-and-fire models}\label{lifmethods}
@ -773,9 +752,9 @@ In the model, the input $x(t)$ was then first thresholded to model the synapse b
\label{eq:threshold2}
\lfloor x(t) \rfloor_0 = \left\{ \begin{array}{rcl} x(t) & ; & x(t) \ge 0 \\ 0 & ; & x(t) < 0 \end{array} \right.
\end{equation}
$\lfloor x(t) \rfloor_{0}$ denotes the threshold operation that sets negative values to zero (box left to \subfigrefb{flowchart}\,\panel[i]{A}).
$\lfloor x(t) \rfloor_{0}$ denotes the threshold operation that sets negative values to zero (\subfigrefb{flowchart}{A}).
The resulting receptor signal was then low-pass filtered to approximate passive signal conduction in the afferent's dendrite (box left to \subfigrefb{flowchart}\,\panel[ii]{A}).
The resulting receptor signal was then low-pass filtered to approximate passive signal conduction in the afferent's dendrite (\subfigrefb{flowchart}{B})
\begin{equation}
\label{eq:dendrite}
\tau_{d} \frac{d V_{d}}{d t} = -V_{d}+ \lfloor x(t) \rfloor_{0}
@ -796,7 +775,7 @@ The adaptation current $A$ followed
\end{equation}
with adaptation time constant $\tau_A$.
Whenever the membrane voltage $V_m(t)$ crossed the spiking threshold $\theta=1$ a spike was generated, $V_{m}(t)$ was reset to $0$, the adaptation current was incremented by $\Delta A$, and integration of $V_m(t)$ was paused for the duration of a refractory period $t_{ref}$ (\subfigrefb{flowchart}\,\panel[iv]{A}).
Whenever the membrane voltage $V_m(t)$ crossed the spiking threshold $\theta=1$ a spike was generated, $V_{m}(t)$ was reset to $0$, the adaptation current was incremented by $\Delta A$, and integration of $V_m(t)$ was paused for the duration of a refractory period $t_{ref}$ (\subfigrefb{flowchart}{D}).
\begin{equation}
\label{spikethresh}
V_m(t) \ge \theta \; : \left\{ \begin{array}{rcl} V_m & \mapsto & 0 \\ A & \mapsto & A + \Delta A/\tau_A \end{array} \right.
@ -813,11 +792,11 @@ Whenever the membrane voltage $V_m(t)$ crossed the spiking threshold $\theta=1$
\begin{figure*}[hb!]
\includegraphics[width=\columnwidth]{flowchart}
\caption{\label{flowchart}
Flowchart of a LIF P-unit model with EOD carrier. The main steps of the model are depicted in the left model column. The three columns show the relevant signals in three different settings. (i) the baseline situation, no external stimulus, only the animal's self-generated EOD (i.e. the carrier) is present (ii) RAM stimulation, the carrier is amplitude modulated with a weak (2\% contrast) stimulus, (iii) Noise split condition in which 90\% of the internal noise is used as a driving stimulus scaled with the correction factor $\rho$ (see text). Note: that the firing rate and the CV of the ISI distribution is the same in this and the baseline condition. (Model cell identifier 2012-07-03-ak, see table~\ref{modelparams} for model parameters. \textbf{A} Thresholding: a simple linear threshold was applied to the EOD carrier (eq,\,\ref{eq:eod}) The red line on top depicts the amplitude modulation (AM). \textbf{B} Dendritic low-pass filtering attenuates the carrier. \textbf{C} An Gaussian noise is added to the signal in B. Note the reduced internal noise amplitude in the split (iii) condition. \textbf{D} Spiking output of the LIF model in response to the addition of B and C. \textbf{E} Power spectra of the LIF neuron's spiking activity. Under the baseline condition (D$_i$) there are several peaks at, from left to right, the baseline firing rate $f_{base}$, $f_{EOD} - f_{base}$ $f_{EOD}$, and $f_{EOD} + f_{base}$, in the stimulus driven regime, there is only a peak at $f_{eod}$, while under the noise split condition (D$_iii$) again all peaks are present.}
Flowchart of a LIF P-unit model with EOD carrier. The main steps of the model are depicted in the left model column (Model cell identifier 2012-07-03-ak, see table~\ref{modelparams} for model parameters). The three other columns show the relevant signals in three different settings. (i) the baseline situation, no external stimulus, only the animal's self-generated EOD (i.e. the carrier) is present (ii) RAM stimulation, the carrier is amplitude modulated with a weak (2\% contrast) stimulus, (iii) Noise split condition in which 90\% of the internal noise is used as a driving stimulus scaled with the correction factor $\rho$ (see text). Note: that the firing rate and the CV of the ISI distribution is the same in this and the baseline condition. \textbf{A} Thresholding: a simple linear threshold was applied to the EOD carrier, \eqnref{eq:eod}. The red line on top depicts the amplitude modulation (AM). \textbf{B} Dendritic low-pass filtering attenuates the carrier. \textbf{C} A Gaussian noise is added to the signal in B. Note the reduced internal noise amplitude in the noise split (iii) condition. \textbf{D} Spiking output of the LIF model in response to the addition of B and C. \textbf{E} Power spectra of the LIF neuron's spiking activity. Under the baseline condition (\panel[i]{D}) there are several peaks, from left to right, at the baseline firing rate $\fbase{}$, $f_{EOD} - \fbase{}$ $f_{EOD}$, and $f_{EOD} + \fbase{}$. In the stimulus driven regime (\panel[ii]{D}), there is only a peak at $f_{eod}$, while under the noise split condition (\panel[iii]{D}) again all peaks are present.}
\end{figure*}
\subsection{Numerical implementation}
The model's ODEs were integrated by the Euler forward method with a time-step of $\Delta t = 0.05$\,ms. The intrinsic noise $\xi(t)$ (\eqnref{eq:LIF}, \subfigrefb{flowchart}\,\panel[iii]{A}) was added by drawing a random number from a normal distribution $\mathcal{N}(0,\,1)$ with zero mean and standard deviation of one in each time step $i$. This number was multiplied with $\sqrt{2D}$ and divided by $\sqrt{\Delta t}$:
The model's ODEs were integrated by the Euler forward method with a time-step of $\Delta t = 0.05$\,ms. The intrinsic noise $\xi(t)$ (\eqnref{eq:LIF}, \subfigrefb{flowchart}{C}) was added by drawing a random number from a normal distribution $\mathcal{N}(0,\,1)$ with zero mean and standard deviation of one in each time step $i$. This number was multiplied with $\sqrt{2D}$ and divided by $\sqrt{\Delta t}$:
\begin{equation}
\label{eq:LIFintegration}
V_{m_{i+1}} = V_{m_i} + \left(-V_{m_i} + \mu + \alpha V_{d_i} - A_i + \sqrt{\frac{2D}{\Delta t}}\mathcal{N}(0,\,1)_i\right) \frac{\Delta t}{\tau_m}
@ -827,9 +806,9 @@ The model's ODEs were integrated by the Euler forward method with a time-step of
The eight free parameters of the P-unit model $\beta$, $\tau_m$, $\mu$, $D$, $\tau_A$, $\Delta_A$, $\tau_d$, and $t_{ref}$, were fitted to both the baseline activity (baseline firing rate, CV of ISIs, serial correlation of ISIs at lag one, and vector strength of spike coupling to EOD) and the responses to step-like increases and decreases in EOD amplitude (onset-state and steady-state responses, effective adaptation time constant). For each simulation, the start parameters $A$, $V_{d}$ and $V_{m}$ were drawn from a random starting value distribution, estimated from a 100\,s baseline simulation after an initial 100\,s of simulation that was discarded as a transient.
\subsection{Stimuli for the model}
The model neurons were driven with similar stimuli as the real neurons in the original experiments. To mimic the interaction with one or two foreign animals the receiving fish's EOD (eq.\,\ref{eq:eod}) was normalized to an amplitude of one and the respective EODs of a second or third fish were added.
The model neurons were driven with similar stimuli as the real neurons in the original experiments. To mimic the interaction with one or two foreign animals the receiving fish's EOD (\eqnref{eq:eod}) was normalized to an amplitude of one and the respective EODs of a second or third fish were added.%\eqnref{ eq.\,\ref{eq:eod}
The random amplitude modulation (RAM) input to the model was created by drawing random amplitude and phases from Gaussian distributions for each frequency component in the range $0-300$ Hz. An inverse Fourier transform was applied to get the final amplitude RAM time-course. The input to the model was then
The random amplitude modulation (RAM) input to the model was created by drawing random amplitude and phases from Gaussian distributions for each frequency component in the range 0--300 Hz. An inverse Fourier transform was applied to get the final amplitude RAM time-course. The input to the model was then
\begin{equation}
\label{eq:ram_equation}
x(t) = (1+ RAM(t)) \cdot \cos(2\pi f_{EOD} t)
@ -842,7 +821,7 @@ From each simulation run, the first second was discarded and the analysis was ba
% The second-order susceptibility in the model was calculated with \eqnref{eq:susceptibility}, resulting in matrices as in \figrefb{model_and_data} and \figrefb{model_full}. For this, the model neuron was presented the input $x(t)$ for 2\,s, with the first second being dismissed as the transient. The second-order susceptibility calculation was performed on the last second, resulting in a frequency resolution of 1\,Hz.
\subsection{Model noise split into a noise and a stimulus component}\label{intrinsicsplit_methods}
According to the Novikov-Furutsu Theorem \citealp{Novikov1965, Furutsu1963} the total noise of a LIF ($\xi$) model can be split up into several independent noise processes with the same correlation function. Here we split the internal noise into two parts: (i) One part is treated as a driving input signal ($\xi_{signal} = c_{signal} \cdot \xi$) and used to calculate the cross-spectra \eqnref{eq:crosshigh} and (ii) the remaining noise ($\xi_{noise} = (1-c_{signal})\cdot\xi$) that is treated as pure noise. In this way the effective signal-to-noise ratio can be increased while maintaining the total noise in the system. In our case the model has a carrier (the fish's self-generated EOD) and we thus want to drive the model with an amplitude modulation stimulus.
According to the Novikov-Furutsu Theorem \citealp{Novikov1965, Furutsu1963} the total noise of a LIF model ($\xi$) can be split up into several independent noise processes with the same correlation function. Here we split the internal noise into two parts: (i) One part is treated as a driving input signal ($\xi_{signal} = c_{signal} \cdot \xi$) and used to calculate the cross-spectra in \eqnref{eq:crosshigh} and (ii) the remaining noise ($\xi_{noise} = (1-c_{signal})\cdot\xi$) that is treated as pure noise. In this way the effective signal-to-noise ratio can be increased while maintaining the total noise in the system. In our case the model has a carrier (the fish's self-generated EOD) and we thus want to drive the model with an amplitude modulation stimulus.
\begin{equation}
\label{eq:ram_split}
@ -866,7 +845,7 @@ with $\rho$ a scaling factor that compensates (see below) for the signal transfo
\end{equation}
% das stimmt so, das c kommt unter die Wurzel!
A big portion of the total noise was assigned to the signal component ($c_{signal} = 0.9$) and the remaining part to the noise component ($c_{noise} = 0.1$, \subfigrefb{flowchart}\,\panel[iii]{D}). For the application of the Novikov-Furutsu Theorem \citealp{Novikov1965, Furutsu1963} it is critical that both components add up to the initial 100\,$\%$ of the total noise. This is easily achieved in a model without a carrier if the condition $c_{signal}+c_{noise}=1$ is satisfied. The situation here is more complicated. To compensate for the transformations the signal undergoes before it enters the LIF core, $\xi_{signal}(t)$ was scaled up by the factor $\rho$ (\eqnref{eq:ram_split}, red in \subfigrefb{flowchart}\,\panel[i]{D}). $\rho$ was found by bisecting the space of possible $\rho$ scaling factors by minimizing the error between the baseline CV (only carrier) and the CV during stimulation with noise split.
A big portion of the total noise was assigned to the signal component ($c_{signal} = 0.9$) and the remaining part to the noise component ($c_{noise} = 0.1$, \subfigrefb{flowchart}\,\panel[iii]{C}). For the application of the Novikov-Furutsu Theorem \citealp{Novikov1965, Furutsu1963} it is critical that both components add up to the initial 100\,$\%$ of the total noise. This is easily achieved in a model without a carrier if the condition $c_{signal}+c_{noise}=1$ is satisfied. The situation here is more complicated. To compensate for the transformations the signal undergoes before it enters the LIF core, $\xi_{signal}(t)$ was scaled up by the factor $\rho$ (\eqnref{eq:ram_split}, red in \subfigrefb{flowchart}\,\panel[i]{D}). $\rho$ was found by bisecting the space of possible $\rho$ scaling factors by minimizing the error between the baseline CV (only carrier) and the CV during stimulation with noise split.
\notejg{Etwas kurz, die Tabelle. Oder benutzen wir hier tatsaechlich nur die zwei Modelle?}
@ -921,7 +900,7 @@ A big portion of the total noise was assigned to the signal component ($c_{signa
\begin{figure*}[hp]%hp!
\includegraphics{cells_suscept_high_CV}
\caption{\label{cells_suscept_high_CV} Response of experimentally measured P-units to RAM stimuli. Light purple -- low RAM contrast. Dark purple -- high RAM contrast. Noisy high-CV P-Unit. \figitem{A} Interspike intervals (ISI) distribution during baseline. \figitem{B} Baseline power spectrum of the firing rate. \figitem{C} Top: EOD carrier (gray) with RAM (red). Middle: Spike trains in response to a low RAM contrast. Bottom: Spike trains in response to a high RAM contrast. \figitem{D} First-order susceptibility (see \eqnref{linearencoding_methods}). \figitem{E} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low RAM contrast.
Pink lines -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. Orange line -- part of the structure when \fsum{} is equal to half \feod. \figitem{F} Absolute value of the second-order susceptibility for the higher RAM contrast. \figitem{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E--F}. Gray dots: \fbase{}. Gray area: $\fbase{} \pm 5$\,Hz. Dashed lines: Medians of the projected diagonals.
Pink lines -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \figitem{F} Absolute value of the second-order susceptibility for the higher RAM contrast. \figitem{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E--F}. Gray dots: \fbase{}. Dashed lines: Medians of the projected diagonals.
}
\end{figure*}

View File

@ -140,8 +140,8 @@
\newcommand{\feod}{\ensuremath{f_{EOD}}}
\newcommand{\feodsolid}{\ensuremath{f_{\rm{EOD}}}}
\newcommand{\feodhalf}{\ensuremath{f_{EOD}/2}}
\newcommand{\fbase}{\ensuremath{f_{Base}}}
\newcommand{\fbasesolid}{\ensuremath{f_{\rm{Base}}}}
\newcommand{\fbase}{\ensuremath{f_{base}}}
\newcommand{\fbasesolid}{\ensuremath{f_{\rm{base}}}}
\newcommand{\fstimintro}{\ensuremath{\rm{EOD}_{2}}}
\newcommand{\feodintro}{\ensuremath{\rm{EOD}_{1}}}
\newcommand{\ffstimintro}{\ensuremath{f_{2}}}
@ -241,27 +241,6 @@
\newcommand{\fdiffe}{$\fdiff{}=f_{EOD}$}%diff of both
\newcommand{\fdiffehalf}{$\fdiff{}=f_{EOD}/2$}%diff of both
%%%%%%%%%%%%%%%%%%%%%%
%Cocktailparty combinations
%\newcommand{\bctwo}{$\Delta f_{Female}$}%sum
%\newcommand{\bcone}{$\Delta f_{Intruder}$}%sum
%\newcommand{\bcsum}{$|\Delta f_{Female} + \Delta f_{Intruder}|$}%sum
%\newcommand{\abcsum}{$A(|\Delta f_{Female} + \Delta f_{Intruder}|)$}%sum
%\newcommand{\bcdiff}{$|\Delta f_{Female} - \Delta f_{Intruder}|$}%diff of both beat frequencies
%\newcommand{\bcsumb}{$|\Delta f_{Female} + \Delta f_{Intruder}| =f_{Base}$}%su\right m
%\newcommand{\bctwob}{$\Delta f_{Female} =f_{Base}$}%sum
%\newcommand{\bconeb}{$\Delta f_{Intruder}=f_{Base}$}%sum
%\newcommand{\bcsumbtwo}{$|\Delta f_{Female} + \Delta f_{Intruder}|=2 f_{Base}$}%sum
%\newcommand{\bcsumbc}{$|\Delta f_{Female} + \Delta f_{Intruder}|=\fbasecorr{}$}%sum
%\newcommand{\bcsume}{$|\Delta f_{Female} + \Delta f_{Intruder}|=f_{EOD}$}%sum
%\newcommand{\bcsumehalf}{$|\Delta f_{Female} + \Delta f_{Intruder}|=f_{EOD}/2$}%sum
%\newcommand{\bcdiffb}{$|\Delta f_{Female} - \Delta f_{Intruder}|=f_{Base}$}%diff of both beat frequencies
%\newcommand{\bcdiffbc}{$|\Delta f_{Female} - \Delta f_{Intruder}|=\fbasecorr{}$}%diff of both beat frequencies
%\newcommand{\bcdiffe}{$|\Delta f_{Female} - \Delta f_{Intruder}|=f_{EOD}$}%diff of both
%\newcommand{\bcdiffehalf}{$|\Delta f_{Female} - \Delta f_{Intruder}|=f_{EOD}/2$}%diff of both
\newcommand{\fctwo}{\ensuremath{f_{\rm{Female}}}}%sum
\newcommand{\fcone}{\ensuremath{f_{\rm{Intruder}}}}%sum
@ -476,7 +455,7 @@ Second-order susceptibility is expected to be especially pronounced for low-CV c
\begin{figure*}[!h]
\includegraphics{cells_suscept}
\caption{\label{cells_suscept} \notejg{dashed lines still a little faint} Estimation of linear and nonlinear stimulus encoding in a low-CV P-unit. \textbf{A} Interspike-interval (ISI) distribution of the cell's baseline activity, i.e. the cell is driven only by the unperturbed own field. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} Random amplitude modulation stimulus (top) and responses (spike raster in the lower traces) of the same P-unit. The stimulus contrast reflects the strength of the AM. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 10\% (light purple) and 20\% contrast (dark purple) RAM stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.}
\caption{\label{cells_suscept} \notejg{dashed lines still a little faint} Estimation of linear and nonlinear stimulus encoding in a low-CV P-unit. Calculated based on the first frozen noise repeat. \textbf{A} Interspike interval (ISI) distribution of the cell's baseline activity, i.e. the cell is driven only by the unperturbed own field. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} Random amplitude modulation stimulus (top) and responses (spike raster in the lower traces) of the same P-unit. The stimulus contrast reflects the strength of the AM. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 10\% (light purple) and 20\% contrast (dark purple) RAM stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.}
\end{figure*}
Noise stimuli, the random amplitude modulations (RAM, \subfigref{cells_suscept}{C}, top trace, red line) of the EOD, are commonly used to characterize the stimulus driven responses of P-units by means of the transfer function (first-order susceptibility), the spike-triggered average, or the stimulus-response coherence. Here, we additionally estimate the second-order susceptibility to capture nonlinear encoding. Depending on the stimulus intensity which is given as the contrast, i.e. the amplitude of the noise stimulus in relation to the EOD amplitude (see methods), the spikes align more or less clearly to AMs of the stimulus (light and dark purple for low and high contrast stimuli, \subfigrefb{cells_suscept}{C}). The linear encoding (see \eqnref{linearencoding_methods}) is similar for the two RAM contrasts in this low-CV P-unit (\subfigrefb{cells_suscept}{D}). First-order susceptibility is low for low frequencies, peaks in the range below 100\,Hz and then falls off again.
@ -492,7 +471,7 @@ Irrespective of the CV, neither cell shows the complete proposed structure of no
\begin{figure*}[ht]%hp!
\includegraphics{ampullary}
\caption{\label{ampullary} Estimation of linear and nonlinear stimulus encoding in an ampullary afferent. \textbf{A} Interspike-interval (ISI) distribution of the cell's baseline activity. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} White noise stimulus (top) added to the fish's self-generated electric field and responses (spike raster in the lower traces). The stimulus contrast reflects the strength of the stimulus in relation to the own electric field amplitude. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 2\% (light green) and 20\% contrast (dark green) stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.
\caption{\label{ampullary} Estimation of linear and nonlinear stimulus encoding in an ampullary afferent. Calculated based on the first frozen noise repeat. \textbf{A} Interspike interval (ISI) distribution of the cell's baseline activity. The CV of the ISIs is a dimensionless measure quantifying the response regularity. Zero CV would indicate perfect regularity. \textbf{B} Power-spectrum of the baseline response. \textbf{C} White noise stimulus (top) added to the fish's self-generated electric field and responses (spike raster in the lower traces). The stimulus contrast reflects the strength of the stimulus in relation to the own electric field amplitude. \textbf{D} Transfer function (first-order susceptibility, \eqnref{linearencoding_methods}) of the responses to 2\% (light green) and 20\% contrast (dark green) stimulation. \textbf{E, F} Absolute value of the second-order susceptibility, \eqnref{eq:susceptibility}, for the low, and high stimulus contrasts. Pink angles -- edges of the structure when \fone, \ftwo{} or \fsum{} are equal to \fbase{}. \textbf{G} Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in \panel{E, F}. Gray dots mark \fbase{}. Horizontal dashed lines: medians of the projected diagonals.
}
\end{figure*}
@ -663,8 +642,7 @@ The neurons were classified into cell types during the recording by the experime
The electric field of the fish was recorded in two ways: 1. we measured the so-called \textit{global EOD} with two vertical carbon rods ($11\,\centi\meter$ long, 8\,mm diameter) in a head-tail configuration (\figrefb{Setup}, green bars). The electrodes were placed isopotential to the stimulus. This signal was differentially amplified with a factor between 100 and 500 (depending on the recorded animal) and band-pass filtered (3 to 1500\,Hz pass-band, DPA2-FX; npi electronics, Tamm, Germany). 2. The so-called \textit{local EOD} was measured with 1\,cm-spaced silver wires located next to the left gill of the fish and orthogonal to the fish's longitudinal body axis (amplification 100 to 500 times, band-pass filtered with 3 to 1\,500\,Hz pass-band, DPA2-FX; npi-electronics, Tamm, Germany, \figrefb{Setup}, red markers). This local measurement recorded the combination of the fish's own field and the applied stimulus and thus serves as a proxy of the transdermal potential that drives the electroreceptors.
\subsection{Stimulation}
The stimulus was isolated from the ground (ISO-02V, npi-electronics, Tamm, Germany) and delivered via two horizontal carbon rods (30 cm length, 8 mm diameter) located $15\,\centi\meter$ laterally to the fish (\figrefb{Setup}, gray bars). The stimulus was calibrated with respect t>>>>>>> Stashed changes
o the local EOD.
The stimulus was isolated from the ground (ISO-02V, npi-electronics, Tamm, Germany) and delivered via two horizontal carbon rods (30 cm length, 8 mm diameter) located $15\,\centi\meter$ laterally to the fish (\figrefb{Setup}, gray bars). The stimulus was calibrated with respect to the local EOD.
\begin{figure*}[h!]%(\subfigrefb{beat_amplitudes}{B}).
\includegraphics[width=\columnwidth]{Settup}
@ -672,7 +650,9 @@ o the local EOD.
\end{figure*}
\subsection{White noise stimulation}\label{rammethods}
The fish were stimulated with band-limited white noise stimuli with a cut-off frequency of 150, 300 or 400\,Hz. The stimulus intensity is given as the contrast, i.e. the standard deviation of the white noise stimulus in relation to the fish's EOD amplitude. The contrast varied between 1 and 20\,$\%$ for \lepto{} and between 2.5 and 40\,$\%$ for \eigen. Only cell recordings with at least 10\,s of white noise stimulation were included for the analysis. When ampullary cells were recorded, the white noise was directly applied as the stimulus. To create random amplitude modulations (RAM) for P-unit recordings, the EOD of the fish was multiplied with the desired random amplitude modulation profile (MXS-01M; npi electronics).
The fish were stimulated with band-limited white noise stimuli with a cut-off frequency of 150, 300 or 400\,Hz. The stimulus intensity is given as the contrast, i.e. the standard deviation of the white noise stimulus in relation to the fish's EOD amplitude. The contrast varied between 1 and 20\,$\%$. Only cell recordings with at least 10\,s of white noise stimulation were included for the analysis. When ampullary cells were recorded, the white noise was directly applied as the stimulus. To create random amplitude modulations (RAM) for P-unit recordings, the EOD of the fish was multiplied with the desired random amplitude modulation profile (MXS-01M; npi electronics).
% and between 2.5 and 40\,$\%$ for \eigen
\subsection{Data analysis} Data analysis was performed with Python 3 using the packages matplotlib\cite{Hunter2007}, numpy\cite{Walt2011}, scipy\cite{scipy2020}, pandas\cite{Mckinney2010}, nixio\cite{Stoewer2014}, and thunderfish (\url{https://github.com/bendalab/thunderfish}).
@ -710,7 +690,7 @@ The power spectrum was calculated as
S_{ss}(\omega) = \frac{\langle \tilde s(\omega) \tilde s^* (\omega)\rangle}{T}
\end{split}
\end{equation}
with $\tilde s^* $ being the complex conjugate and $\langle ... \rangle$ denotes averaging over the segments. The cross-spectrum $S_{rs}(\omega)$ was calculated according to
with $\tilde s^* $ being the complex conjugate and $\langle ... \rangle$ denoting averaging over the segments. The cross-spectrum $S_{rs}(\omega)$ was calculated according to
\begin{equation}
\label{cross}
\begin{split}
@ -748,16 +728,15 @@ The absolute value of a second-order susceptibility matrix is visualized in \fig
\paragraph{Nonlinearity index}\label{projected_method}
\notejg{use of $f_{Base}$ or $f_{base}$ or $f_0$ should be consistent throughout the manuscript.}
We expect to see nonlinear susceptibility when $\omega_1 + \omega_2 = f_{Base}$. To characterize this we calculated the nonlinearity index (NLI) as
We expect to see nonlinear susceptibility when $\omega_1 + \omega_2 = \fbase{}$. To characterize this we calculated the nonlinearity index (NLI) as
\begin{equation}
\label{eq:nli_equation}
NLI(f_{Base}) = \frac{\max_{f_{Base}-5\,\rm{Hz} \leq f \leq f_{Base}+5\,\rm{Hz}} D(f)}{\mathrm{med}(D(f))}
NLI(\fbase{}) = \frac{\max_{\fbase{}-5\,\rm{Hz} \leq f \leq \fbase{}+5\,\rm{Hz}} D(f)}{\mathrm{med}(D(f))}
\end{equation}
\notejg{sollte es $D(\omega)$ sein?}
For this index, the second-order susceptibility matrix was projected onto the diagonal $D(f)$, by taking the mean of the anti-diagonals. The peakedness at the frequency $f_{Base}$ in $D(f)$ was quantified by finding the maximum of $D(f)$ in the range $f_{Base} \pm 5$\,Hz (\subfigrefb{cells_suscept}{G}, gray area) and dividing it by the median of $D(f)$.
For this index, the second-order susceptibility matrix was projected onto the diagonal $D(f)$, by taking the mean of the anti-diagonals. The peakedness at the frequency $\fbase{}$ in $D(f)$ was quantified by finding the maximum of $D(f)$ in the range $\fbase{} \pm 5$\,Hz (\subfigrefb{cells_suscept}{G}) and dividing it by the median of $D(f)$.
If the same frozen noise was recorded several times in a cell, each noise repetition resulted in a separate second-order susceptibility matrix. The mean of the corresponding \nli{} values was used for the population statistics in \figref{data_overview_mod}.
\notejg{should go to the legend: calculated based on the first frozen noise repeat.}
\subsection{Leaky integrate-and-fire models}\label{lifmethods}
@ -773,9 +752,9 @@ In the model, the input $x(t)$ was then first thresholded to model the synapse b
\label{eq:threshold2}
\lfloor x(t) \rfloor_0 = \left\{ \begin{array}{rcl} x(t) & ; & x(t) \ge 0 \\ 0 & ; & x(t) < 0 \end{array} \right.
\end{equation}
$\lfloor x(t) \rfloor_{0}$ denotes the threshold operation that sets negative values to zero (box left to \subfigrefb{flowchart}\,\panel[i]{A}).
$\lfloor x(t) \rfloor_{0}$ denotes the threshold operation that sets negative values to zero (\subfigrefb{flowchart}{A}).
The resulting receptor signal was then low-pass filtered to approximate passive signal conduction in the afferent's dendrite (box left to \subfigrefb{flowchart}\,\panel[ii]{A}).
The resulting receptor signal was then low-pass filtered to approximate passive signal conduction in the afferent's dendrite (\subfigrefb{flowchart}{B})
\begin{equation}
\label{eq:dendrite}
\tau_{d} \frac{d V_{d}}{d t} = -V_{d}+ \lfloor x(t) \rfloor_{0}
@ -796,7 +775,7 @@ The adaptation current $A$ followed
\end{equation}
with adaptation time constant $\tau_A$.
Whenever the membrane voltage $V_m(t)$ crossed the spiking threshold $\theta=1$ a spike was generated, $V_{m}(t)$ was reset to $0$, the adaptation current was incremented by $\Delta A$, and integration of $V_m(t)$ was paused for the duration of a refractory period $t_{ref}$ (\subfigrefb{flowchart}\,\panel[iv]{A}).
Whenever the membrane voltage $V_m(t)$ crossed the spiking threshold $\theta=1$ a spike was generated, $V_{m}(t)$ was reset to $0$, the adaptation current was incremented by $\Delta A$, and integration of $V_m(t)$ was paused for the duration of a refractory period $t_{ref}$ (\subfigrefb{flowchart}{D}).
\begin{equation}
\label{spikethresh}
V_m(t) \ge \theta \; : \left\{ \begin{array}{rcl} V_m & \mapsto & 0 \\ A & \mapsto & A + \Delta A/\tau_A \end{array} \right.
@ -813,11 +792,11 @@ Whenever the membrane voltage $V_m(t)$ crossed the spiking threshold $\theta=1$
\begin{figure*}[hb!]
\includegraphics[width=\columnwidth]{flowchart}
\caption{\label{flowchart}
Flowchart of a LIF P-unit model with EOD carrier. The main steps of the model are depicted in the left model column. The three columns show the relevant signals in three different settings. (i) the baseline situation, no external stimulus, only the animal's self-generated EOD (i.e. the carrier) is present (ii) RAM stimulation, the carrier is amplitude modulated with a weak (2\% contrast) stimulus, (iii) Noise split condition in which 90\% of the internal noise is used as a driving stimulus scaled with the correction factor $\rho$ (see text). Note: that the firing rate and the CV of the ISI distribution is the same in this and the baseline condition. (Model cell identifier 2012-07-03-ak, see table~\ref{modelparams} for model parameters. \textbf{A} Thresholding: a simple linear threshold was applied to the EOD carrier (eq,\,\ref{eq:eod}) The red line on top depicts the amplitude modulation (AM). \textbf{B} Dendritic low-pass filtering attenuates the carrier. \textbf{C} An Gaussian noise is added to the signal in B. Note the reduced internal noise amplitude in the split (iii) condition. \textbf{D} Spiking output of the LIF model in response to the addition of B and C. \textbf{E} Power spectra of the LIF neuron's spiking activity. Under the baseline condition (D$_i$) there are several peaks at, from left to right, the baseline firing rate $f_{base}$, $f_{EOD} - f_{base}$ $f_{EOD}$, and $f_{EOD} + f_{base}$, in the stimulus driven regime, there is only a peak at $f_{eod}$, while under the noise split condition (D$_iii$) again all peaks are present.}
Flowchart of a LIF P-unit model with EOD carrier. The main steps of the model are depicted in the left model column (Model cell identifier 2012-07-03-ak, see table~\ref{modelparams} for model parameters). The three other columns show the relevant signals in three different settings. (i) the baseline situation, no external stimulus, only the animal's self-generated EOD (i.e. the carrier) is present (ii) RAM stimulation, the carrier is amplitude modulated with a weak (2\% contrast) stimulus, (iii) Noise split condition in which 90\% of the internal noise is used as a driving stimulus scaled with the correction factor $\rho$ (see text). Note: that the firing rate and the CV of the ISI distribution is the same in this and the baseline condition. \textbf{A} Thresholding: a simple linear threshold was applied to the EOD carrier, \eqnref{eq:eod}. The red line on top depicts the amplitude modulation (AM). \textbf{B} Dendritic low-pass filtering attenuates the carrier. \textbf{C} A Gaussian noise is added to the signal in B. Note the reduced internal noise amplitude in the noise split (iii) condition. \textbf{D} Spiking output of the LIF model in response to the addition of B and C. \textbf{E} Power spectra of the LIF neuron's spiking activity. Under the baseline condition (\panel[i]{D}) there are several peaks, from left to right, at the baseline firing rate $\fbase{}$, $f_{EOD} - \fbase{}$ $f_{EOD}$, and $f_{EOD} + \fbase{}$. In the stimulus driven regime (\panel[ii]{D}), there is only a peak at $f_{eod}$, while under the noise split condition (\panel[iii]{D}) again all peaks are present.}
\end{figure*}
\subsection{Numerical implementation}
The model's ODEs were integrated by the Euler forward method with a time-step of $\Delta t = 0.05$\,ms. The intrinsic noise $\xi(t)$ (\eqnref{eq:LIF}, \subfigrefb{flowchart}\,\panel[iii]{A}) was added by drawing a random number from a normal distribution $\mathcal{N}(0,\,1)$ with zero mean and standard deviation of one in each time step $i$. This number was multiplied with $\sqrt{2D}$ and divided by $\sqrt{\Delta t}$:
The model's ODEs were integrated by the Euler forward method with a time-step of $\Delta t = 0.05$\,ms. The intrinsic noise $\xi(t)$ (\eqnref{eq:LIF}, \subfigrefb{flowchart}{C}) was added by drawing a random number from a normal distribution $\mathcal{N}(0,\,1)$ with zero mean and standard deviation of one in each time step $i$. This number was multiplied with $\sqrt{2D}$ and divided by $\sqrt{\Delta t}$:
\begin{equation}
\label{eq:LIFintegration}
V_{m_{i+1}} = V_{m_i} + \left(-V_{m_i} + \mu + \alpha V_{d_i} - A_i + \sqrt{\frac{2D}{\Delta t}}\mathcal{N}(0,\,1)_i\right) \frac{\Delta t}{\tau_m}

View File

@ -1349,8 +1349,9 @@ def plot_sheme_lowpass(axsheme):
axsheme.show_spines('lbrt')
axsheme.set_spines_outward('lbrt', 0)
axsheme.xaxis.set_ticks_position('bottom')
axsheme.plot(f, gauss, color='grey')
axsheme.text(0, 1.1, 'Dendritic Filter', transform=axsheme.transAxes)#-0.1
axsheme.plot(f, gauss, color='grey')## va = 'bottom', va='bottom',
axsheme.text(0.96, 0.8, 'Dendritic',ha ='right', transform=axsheme.transAxes)#-0.1
axsheme.text(0.96, 0.6, 'Filter', ha='right', transform=axsheme.transAxes) # -0.1
axsheme.text(-0.1, 0.5, 'Gain', transform=axsheme.transAxes, rotation=90, ha='right', va='center')
axsheme.set_xlim(0, 550)
axsheme.set_xticks_fixed([0, 550], ['0', 'f']) # '$\omega$'
@ -1374,7 +1375,8 @@ def plot_sheme_nonlinearity(axsheme, color_power3, color_power1, color_diagonal=
axsheme.plot(xaxis, power1, color=color_power1) # +0.06
# axsheme.plot(xaxis, power3-0.05, color = color_power3)
axsheme.text(0, 1.1, 'Threshold', transform=axsheme.transAxes)
#0.5, 1.1, 'Dendritic Filter',
axsheme.text(0.5, 1.1, 'Threshold',ha = 'center', transform=axsheme.transAxes)
axsheme.set_xticks_fixed([0, 1.5], ['0', '$x$'])
axsheme.set_yticks_fixed([0])
axsheme.axhline(0, color='black', linestyle='--', lw=0.5, zorder=1)
@ -2144,13 +2146,14 @@ def model_sheme_split2(grid_sheme_orig, time_transform=1000, ws=0.1, nfft=4096 *
#########################################################################################
# first row for the stimulus, and then three cols for the sheme, and the power 1 and power 3
grid0 = gridspec.GridSpecFromSubplotSpec(1, len(a_fes) + 1, subplot_spec=grid_sheme_orig,
width_ratios=[1, 2, 2, 2], wspace=0.45)
width_ratios=[0.84, 2, 2, 2], wspace=0.45)
#####################################################
# Grid for the sheme
hs = 0.6#0.45
try:
grid_sheme = gridspec.GridSpecFromSubplotSpec(6, 1,
subplot_spec=grid0[0], wspace=0.2, hspace=0.9,
subplot_spec=grid0[0], wspace=0.2, hspace=hs,
height_ratios=[1, 1, 1, 1, 0, 1]) # 0.95
except:
print('grid thing1')
@ -2205,7 +2208,7 @@ def model_sheme_split2(grid_sheme_orig, time_transform=1000, ws=0.1, nfft=4096 *
# embed()
grid_power_col = gridspec.GridSpecFromSubplotSpec(6, 1,
subplot_spec=grid0[nrs[counter_here]], wspace=0.45,
hspace=0.5, height_ratios=[1, 1, 1, 1, 0, 1])
hspace=hs, height_ratios=[1, 1, 1, 1, 0, 1])
noise_final_c, spike_times, stimulus, stimulus_here, time, v_dent_output, v_mem_output,frame = get_flowchart_params(
a_fes, a_fr, c, c_sig, cell, deltat, eod_fr, model_params, stimulus_length, v_offset, var_types, eod_fe,
@ -2263,7 +2266,7 @@ def model_sheme_split2(grid_sheme_orig, time_transform=1000, ws=0.1, nfft=4096 *
# else:#add_pos[g]
#embed()
ax_rec[counter_here].text(0, 1, titles[c] + '\n'+r'$\rm{CV}=%s$' %(
np.round(np.std(np.diff(spike_times)) / np.mean(np.diff(spike_times)), 2)) + '\n$f_{Base}=%s$' %(
np.round(np.std(np.diff(spike_times)) / np.mean(np.diff(spike_times)), 2)) + '\n$f_{base}=%s$' %(
int(np.round(1 / np.mean(np.diff(spike_times))))) + '\,Hz', transform=ax_rec[counter_here].transAxes,
va='bottom') # verticalalignment='right',#0.935
# And plot correspoding sheme
@ -2313,7 +2316,7 @@ def model_sheme_split2(grid_sheme_orig, time_transform=1000, ws=0.1, nfft=4096 *
# embed()
axt_spikes, axp_IF, ff, pp, axp_s, pp_s = plot_spikes(grid_lowpass, time_transform, v_mem_output, time, color,
spike_times, shift, deltat, fft_type, nfft, eod_fr,
xlim=xlim,
xlim=xlim, labelpad = 1,
counter_here=counter_here, psd=False) # , add = add
grid_lowpass_p = gridspec.GridSpecFromSubplotSpec(1, 1,
@ -2465,9 +2468,11 @@ def model_sheme_split2(grid_sheme_orig, time_transform=1000, ws=0.1, nfft=4096 *
#embed()
fig.tag(np.transpose(ax), xoffs=-3.5, yoffs = 1.5)
yoffs = 1#1.1
xoffs = -3
fig.tag(np.transpose(ax), xoffs=xoffs, yoffs = yoffs)
#tag2(fig, np.transpose(ax), xoffs=-3.5, yoffs=1-5, major_index=0)
tag2(fig, axshemes, xoffs=-3.5, yoffs=1.5, major_index=0)#[5.5,nr,nr,nr]#[5.5,nr,nr,nr,nr-0.2]
tag2(fig, axshemes, xoffs=xoffs, yoffs=yoffs, major_index=0)#[5.5,nr,nr,nr]#[5.5,nr,nr,nr,nr-0.2]
#tag2(fig, np.transpose(ax), xoffs=-3.5)#yoffs = [5.5,nr,nr,nr,nr-0.2]
# get_ylim_same
@ -2854,12 +2859,12 @@ def cut_first_parts(ff, pps_stimulus, pps_lowpass, pps, ll=40):
def plot_spikes(g_p_t, transform_fact, v_mem_output, time, color1, spike_times, shift, deltat, fft_type, nfft, eod_fr,
xlim=0.05, exponential='', counter_here=0, psd=True):
xlim=0.05, exponential='', labelpad = 0, counter_here=0, psd=True):
axt = plt.subplot(g_p_t[0])
plot_time(axt, transform_fact, v_mem_output, time, color1, exponential, spike_times,
lw=0.5, shift=shift, xlim=xlim, counter_here=counter_here)
# if (exponential == exponentials[-1]):
axt.set_xlabel('Time [ms]')
axt.set_xlabel('Time [ms]', labelpad = labelpad)
# else:
# axt.set_xticks_blank()
@ -13813,7 +13818,7 @@ def tag2(fig=None, axes=None, xoffs=None, yoffs=None,
else:
xoffs = xo
xoffs = [xoffs]*len(axes_list)
elif type(xoffs) != float:
elif (type(xoffs) != float) & (type(xoffs) != int):
xoffs = np.array(xoffs)
try:
xoffs *= 0.6 * fs / w
@ -13833,7 +13838,7 @@ def tag2(fig=None, axes=None, xoffs=None, yoffs=None,
else:
yoffs = yo - 1.0 / h # minus one pixel
yoffs = [yoffs]*len(axes_list)
elif type(yoffs) != float:
elif (type(yoffs) != float) & (type(yoffs) != int):
yoffs = np.array(yoffs)
try:
yoffs *= 0.6 * fs / w

View File

@ -5275,7 +5275,9 @@ def plt_cellbody_singlecell(grid1, frame, amps_desired, save_names, cells_plot,
if isi_delta:
ax_isi.set_xticks_delta(isi_delta)
# tags.insert(0, ax_p)
tags.insert(0, ax_p)
if tags_individual:
tags.insert(0, ax_p)
tags.insert(0, ax_isi)
# ax_psds.extend([ax_p])
@ -5286,7 +5288,10 @@ def plt_cellbody_singlecell(grid1, frame, amps_desired, save_names, cells_plot,
axe = plt.subplot(grid_upper[0, -2::])
# embed()
plt_stimulus(eod_fr, axe, stack_final1, xlim_e, RAM=RAM, file_name=files[0])
tags.insert(2, axe)
if tags_individual:
tags.insert(2, axe)
else:
tags.insert(1, axe)
tags_cell.append(tags)
#plt.show()