more peak annotation sin figure 4

This commit is contained in:
2026-01-30 11:12:48 +01:00
parent c825c783dc
commit 2a3e7ebd43
2 changed files with 29 additions and 13 deletions

View File

@@ -486,7 +486,7 @@ Both, the reduced intrinsic noise and the RAM stimulus, need to replace the orig
\begin{figure*}[t]
\includegraphics[width=\columnwidth]{twobeats}
\caption{\label{fig:twobeats} Nonlinearity in an electrophysiologically recorded P-unit of \lepto{} in a three-fish setting (cell identifier ``2021-08-03-ac"). Receiver with EOD frequency $f_{\rm EOD} =664$\,Hz encounters fish with EOD frequencies $f_{1}=631$\,Hz and $f_{2}=797$\,Hz. Both foreign signals have the same strength relative to the own field amplitude (10\,\% contrast). Top row: Sketch of signal processing in the nonlinear system (black box). Second row: Superposition of the receiver EOD with the EODs of other fish, colored line highlights the amplitude modulation. Third row: Three trials of spike trains of the recorded P-unit. Fourth row: Firing rate, estimated by convolution of the spike trains with a Gaussian kernel. Bottom row: Power spectrum of the spike trains. \figitem{A} Baseline condition: The cell is driven by the self-generated field alone. The baseline firing rate $r = 139$\,Hz dominates the power spectrum (blue circle). \figitem{B} The receiver's EOD and a single conspecific with an EOD frequency $f_{1}=631$\,Hz are present. Superposition of the two EODs induces a periodic amplitude modulation, referred to as beat, with beat frequeny $\Delta f_1=33$\,Hz. The P-unit strongly responds to this beat (purple). \figitem{C} The receiver and a fish with an EOD frequency $f_{2}=797$\,Hz are present. The resulting beat $\Delta f_2=133$\,Hz is faster as the difference between the EOD frequencies is larger. The P-unit repsonse to this faster beat is weaker (green). \figitem{D} All three fish with EOD frequencies $f_{\rm EOD}$, $f_1$, and $f_2$ are present. Additional peaks occur in the power spectrum of the spike response at the sum (orange) and difference (red) of the two beat frequencies, indicating non-linear interactions between the two frequencies in the P-unit. Remember, the spectrum of the raw signal (top row, gray) has power only at the three EOD frequencies $f_{EOD}$, $f_1$, and $f_2$.}
\caption{\label{fig:twobeats} Nonlinearity in an electrophysiologically recorded P-unit of \lepto{} in a three-fish setting (cell identifier ``2021-08-03-ac"). Receiver with EOD frequency $f_{\rm EOD} =664$\,Hz encounters fish with EOD frequencies $f_{1}=631$\,Hz and $f_{2}=797$\,Hz. Both foreign signals have the same strength relative to the own field amplitude (10\,\% contrast). Top row: Sketch of signal processing in the nonlinear system (black box). Second row: Superposition of the receiver EOD with the EODs of other fish, colored line highlights the amplitude modulation. Third row: Three trials of spike trains of the recorded P-unit. Fourth row: Firing rate, estimated by convolution of the spike trains with a Gaussian kernel. Bottom row: Power spectrum of the spike trains. \figitem{A} Baseline condition: The cell is driven by the self-generated field alone. The baseline firing rate $r = 139$\,Hz dominates the power spectrum (blue circle). \figitem{B} The receiver's EOD and a single conspecific with an EOD frequency $f_{1}=631$\,Hz are present. Superposition of the two EODs induces a periodic amplitude modulation, referred to as beat, with beat frequeny $\Delta f_1=33$\,Hz. The P-unit strongly responds to this beat (purple). \figitem{C} The receiver and a fish with an EOD frequency $f_{2}=797$\,Hz are present. The resulting beat $\Delta f_2=133$\,Hz is faster as the difference between the EOD frequencies is larger. The P-unit repsonse to this faster beat is weaker (green). \figitem{D} All three fish with EOD frequencies $f_{\rm EOD}$, $f_1$, and $f_2$ are present. Additional peaks occur in the power spectrum of the spike response at the sum (orange) and difference (red) of the two beat frequencies, indicating non-linear interactions between the two frequencies in the P-unit. Note, the spectrum of the raw signal (top row, gray) has power only at the three EOD frequencies $f_{EOD}$, $f_1$, and $f_2$.}
\end{figure*}
We explored a large set of electrophysiological data from primary afferents of the active and passive electrosensory system, P-units and ampullary cells \citep{Grewe2017, Hladnik2023}, that were recorded in the brown ghost knifefish \textit{Apteronotus leptorhynchus}. We re-analyzed this dataset to search for weakly nonlinear responses that have been predicted in previous theoretical work \citep{Voronenko2017}. Additional simulations of LIF-based models of P-unit spiking help to interpret the experimental findings in this theoretical framework. We start with demonstrating the basic concepts using example P-units and respective models and then compare the population of recordings in both cell types.
@@ -501,7 +501,7 @@ When stimulating with both foreign signals simultaneously, additional peaks appe
\begin{figure*}[p]
\includegraphics[width=\columnwidth]{regimes}
\caption{\label{fig:regimes} Linear and nonlinear responses of a model P-unit in a three-fish setting in dependence on stimulus amplitudes. The model P-unit (identifier ``2018-05-08-ad'') was stimulated with two sine waves of equal amplitude (contrast) at difference frequencies $\Delta f_1=40$\,Hz and $\Delta f_2=228$\,Hz relative the receiver's EOD frequency $f_{EOD}=656$\,Hz. $\Delta f_2$ was set to match the baseline firing rate $r$ of the P-unit. \figitem{A--D} Top row: the stimulus, an amplitude modulation of the receiver's EOD resulting from the stimulation with the two sine waves. The contrasts of both beats increase from \panel{A} to \panel{D} as indicated. Second row: Spike raster of the model P-unit response. Third row: average firing rate and, bottom row: power spectrum estimated from 1000 trials of spike trains in response to a 26.2\,s long stimulus. \figitem{A} At low stimulus contrasts the response is linear. The only peaks in the response spectrum are at the two stimulating beat frequencies (green and purple circles), the latter enhancing the peak at baseline firig rate (blue). The largest peak, however, is always the one at the EOD frequency of the receiver (black), reflecting the locking of P-unit spikes to the receiver's own EOD. The peak at $f_{EOD}$ is also flanked by harmonics of $\Delta f_1$ (gray triangles). \figitem{B} At moderately higher stimulus contrast, the peaks in the response spectrum at the two beat frequencies become larger. In addition, a peak at $f_{EOD} - \Delta f_2 $ appears (blue diamond). \figitem{C} At intermediate stimulus contrasts, nonlinear responses start to appear at the sum and the difference of the stimulus frequencies (orange and red). Additional peaks appear at harmonics of $\Delta f_1$ (small green circles) and at $f_{EOD} - \Delta f_2 \pm \Delta f_1$ (purple squares). \figitem{D} At higher stimulus contrasts many more peaks appear in the power spectrum. Most of them are interactions of $f_{EOD}$ and $\Delta f_2$ with harmonics of $\Delta f_1$ ($k=1, 2, ...$). \figitem{E} Amplitude of the linear (at $\Delta f_1$ and $\Delta f_2$) and nonlinear (at $\Delta f_2 - \Delta f_1$ and $\Delta f_1 + \Delta f_2$) responses of the model P-unit as a function of beat contrast (thick lines). Thin lines indicate the initial linear and quadratic dependence on stimulus amplitude for the linear and nonlinear responses, respectively. In the linear regime, below a stimulus contrast of about 1.2\,\% (left vertical line), the only peaks in the response spectrum are at the stimulus frequencies. In the weakly nonlinear regime up to a contrast of about 3.5\,\% peaks arise at the sum and the difference of the two stimulus frequencies. At stronger stimulation the amplitudes of these nonlinear responses deviate from the quadratic dependency on stimulus contrast.}
\caption{\label{fig:regimes} Linear and nonlinear responses of a model P-unit in a three-fish setting in dependence on stimulus amplitudes. The model P-unit (identifier ``2018-05-08-ad'') was stimulated with two sine waves of equal amplitude (contrast) at difference frequencies $\Delta f_1=40$\,Hz and $\Delta f_2=228$\,Hz relative the receiver's EOD frequency $f_{EOD}=656$\,Hz. $\Delta f_2$ was set to match the baseline firing rate $r$ of the P-unit. \figitem{A--D} Top row: the stimulus, an amplitude modulation of the receiver's EOD resulting from the stimulation with the two sine waves. The contrasts of both beats increase from \panel{A} to \panel{D} as indicated. Second row: Spike raster of the model P-unit response. Third row: average firing rate and, bottom row: power spectrum estimated from 1000 trials of spike trains in response to a 26.2\,s long stimulus. \figitem{A} At low stimulus contrasts the response is linear. The main peaks in the response spectrum are at the two stimulating beat frequencies (green and purple circles), the latter enhancing the peak at baseline firig rate (blue). The largest peak, however, is always the one at the EOD frequency of the receiver (black), reflecting the locking of P-unit spikes to the receiver's own EOD. The peak at $f_{EOD}$ is also flanked by harmonics of $\Delta f_1$ (gray triangles), where $f_{EOD} + \Delta f_1 = f_1$, the EOD frequency of the first fish. \figitem{B} At moderately higher stimulus contrast, the peaks in the response spectrum at the two beat frequencies become larger. In addition, two peaks at $f_{EOD} - \Delta f_2$ and $f_{EOD} + \Delta f_2$ appear (blue diamonds), the latter is the EOD frequency of the second fish, $f_2$. \figitem{C} At intermediate stimulus contrasts, nonlinear responses start to appear at the sum and the difference of the stimulus frequencies (orange and red). Additional peaks appear at harmonics of $\Delta f_1$ (small green circles) and at $f_{EOD} \pm \Delta f_2 \pm \Delta f_1$ (purple squares). \figitem{D} At higher stimulus contrasts many more peaks appear in the power spectrum. Most of them are interactions of $f_{EOD}$ and $\Delta f_2$ with harmonics of $\Delta f_1$ ($k=1, 2, ...$), since the cell responds strongest to $\Delta f_1$. \figitem{E} Amplitude of the linear (at $\Delta f_1$ and $\Delta f_2$) and nonlinear (at $\Delta f_2 - \Delta f_1$ and $\Delta f_1 + \Delta f_2$) responses of the model P-unit as a function of beat contrast (thick lines). Thin lines indicate the initial linear and quadratic dependence on stimulus amplitude for the linear and nonlinear responses, respectively. In the linear regime, below a stimulus contrast of about 1.2\,\% (left vertical line), the only peaks in the response spectrum are at the stimulus frequencies. In the weakly nonlinear regime up to a contrast of about 3.5\,\% peaks arise at the sum and the difference of the two stimulus frequencies. At stronger stimulation the amplitudes of these nonlinear responses deviate from the quadratic dependency on stimulus contrast.}
\end{figure*}
The stimuli used in \figref{fig:twobeats} had the same not-small amplitude resulting in AM contrasts of 10\,\% that evoke strong modulations in a P-unit's firing rate response. Whether this stimulus condition falls into the weakly nonlinear regime as in \citet{Voronenko2017} is not clear. In order to illustrate how the responses to two beat frequencies develop over a range of amplitudes we use a stochastic leaky-integrate-and-fire (LIF) based P-unit model fitted to a specific electrophysiologically measured cell \citep{Barayeu2023}.

View File

@@ -241,6 +241,12 @@ def plot_psd(ax, s, path, contrast, spikes, nfft, dt, beatf1, beatf2, eodf):
# mark frequencies:
ax.plot(eodf, decibel(peak_ampl(freqs, psd, eodf)) + offs,
label=r'$f_{EOD}$', clip_on=False, zorder=50, **s.psFEOD)
if contrast < alphas[1]:
ax.text(eodf + 40, -2, '$f_{EOD}$', va='center', color=s.psFEOD['color'])
ax.text(eodf + beatf1 + 30, -36, '$f_1$', color=s.psFEOD['color'])
#ax.text(beatf1 + 10, -30, r'$\Delta f_1$', ha='center', color=s.psF01['color'])
ax.text(beatf2 + 10, -24, '$r$', ha='center', color=s.psF0['color'])
#ax.text(beatf2 + 10, -16, r'$\Delta f_2$', ha='center', color=s.psF02['color'])
ax.plot(beatf2, decibel(peak_ampl(freqs, psd, beatf2)) + offs,
label=r'$r$', clip_on=False, zorder=50, **s.psF0)
ax.plot(beatf1, decibel(peak_ampl(freqs, psd, beatf1)) + offs,
@@ -256,14 +262,23 @@ def plot_psd(ax, s, path, contrast, spikes, nfft, dt, beatf1, beatf2, eodf):
ax.plot(eodf - beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf1)) + offsm, **s.psFEODm)
if contrast >= alphas[1]:
ax.plot(eodf - beatf2, decibel(peak_ampl(freqs, psd, eodf - beatf2)) + offsm,
label=r'$f_{EOD} - k \Delta f_2$', zorder=40, **s.psF0m)
label=r'$f_{EOD} \pm \Delta f_2$', zorder=40, **s.psF0m)
ax.plot(eodf + beatf2, decibel(peak_ampl(freqs, psd, eodf - beatf2)) + offsm,
zorder=40, **s.psF0m)
if contrast < alphas[2]:
ax.text(eodf + beatf2 + 10, -25, '$f_2$', ha='center', color=s.psF0['color'])
if contrast >= alphas[2]:
ax.plot(2*beatf1, decibel(peak_ampl(freqs, psd, 2*beatf1)) + offsm,
label=r'$k\Delta f_1$', zorder=40, **s.psF01m)
ax.plot(eodf + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf + 2*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - beatf2 + beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + beatf1)) + offsm,
label=r'$f_{EOD} - \Delta f_2 \pm k\Delta f_1$', zorder=40, **s.psF02m)
ax.plot(eodf - beatf2 - beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 - beatf1)) + offsm, zorder=40, **s.psF02m)
label=r'$f_{EOD} \pm \Delta f_2 \pm \Delta f_1$', zorder=40, **s.psF02m)
ax.plot(eodf - beatf2 - beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 - beatf1)) + offsm,
zorder=40, **s.psF02m)
ax.plot(eodf + beatf2 + beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 - beatf1)) + offsm,
zorder=40, **s.psF02m)
ax.plot(eodf + beatf2 - beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 - beatf1)) + offsm,
zorder=40, **s.psF02m)
if contrast >= alphas[3]:
ax.plot(beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 2*beatf1)) + offsm,
label=r'$\Delta f_2 \pm k\Delta f_1$', zorder=40, **s.psF012m)
@@ -274,13 +289,14 @@ def plot_psd(ax, s, path, contrast, spikes, nfft, dt, beatf1, beatf2, eodf):
ax.plot(4*beatf1, decibel(peak_ampl(freqs, psd, 4*beatf1)) + offsm, zorder=40, **s.psF01m)
ax.plot(eodf - 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - 2*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - 3*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - 4*beatf1, decibel(peak_ampl(freqs, psd, eodf - 4*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - 2*beatf2, decibel(peak_ampl(freqs, psd, eodf - 2*beatf2)) + offsm, zorder=40, **s.psF0m)
ax.plot(eodf - beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
zorder=40, **s.psF02m)
ax.plot(eodf - beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
zorder=40, **s.psF02m)
#ax.plot(eodf - 4*beatf1, decibel(peak_ampl(freqs, psd, eodf - 4*beatf1)) + offsm, zorder=40, **s.psFEODm)
#ax.plot(eodf - 2*beatf2, decibel(peak_ampl(freqs, psd, eodf - 2*beatf2)) + offsm, zorder=40, **s.psF0m)
#ax.plot(eodf - beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
# zorder=40, **s.psF02m)
#ax.plot(eodf - beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
# zorder=40, **s.psF02m)
ax.set_xlim(0, 750)
ax.set_xlim(0, 950)
ax.set_ylim(-60, 0)
ax.set_xticks_delta(200)
ax.set_yticks_delta(20)
@@ -392,8 +408,8 @@ if __name__ == '__main__':
print(f'Loaded data for cell {model_cell}: ')
print(f' baseline rate = {ratebase:.0f}Hz, CV = {cvbase:.2f}')
print(f' f1 = {beatf1:.0f}Hz, f2 = {beatf2:.0f}Hz')
print(f' eodf = {eodf:.0f}Hz')
print(f' f1 = {eodf + beatf1:.0f}Hz, f2 = {eodf + beatf2:.0f}Hz, eodf = {eodf:.0f}Hz')
print(f' Df1 = {beatf1:.0f}Hz, Df2 = {beatf2:.0f}Hz')
print()
s = plot_style()