improved figures and captions

This commit is contained in:
Jan Benda 2026-01-29 00:24:26 +01:00
parent 481f11368c
commit 195f419a90
3 changed files with 23 additions and 12 deletions

View File

@ -486,7 +486,7 @@ Both, the reduced intrinsic noise and the RAM stimulus, need to replace the orig
\begin{figure*}[t] \begin{figure*}[t]
\includegraphics[width=\columnwidth]{twobeats} \includegraphics[width=\columnwidth]{twobeats}
\caption{\label{fig:motivation} 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. \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 an amplitude modulation, referred to as beat, with beat frequeny $\Delta f_1=33$\,Hz. \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. \figitem{D} All three fish with EOD frequencies $f_{\rm EOD}$, $f_1$, and $f_2$ are present. A second-order amplitude modulation occurs, commonly referred to as envelope. Additional peaks occur in the power spectrum of the spike response at the sum and difference of the two beat frequencies, indicating non-linear interactions between the tow frequencies in the P-unit.} \caption{\label{fig:motivation} 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). \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 an amplitude modulation, referred to as beat, with beat frequeny $\Delta f_1=33$\,Hz (purple). The P-unit strongly responds to this beat. \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 (green) is faster as the difference between the EOD frequencies is larger. The P-unit repsonse to this faster beat is weaker. \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.}
\end{figure*} \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. 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] \begin{figure*}[p]
\includegraphics[width=\columnwidth]{regimes} \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. $\Delta f_2$ was set to match the baseline firing rate $r$ of the P-unit. \figitem{A--D} Top: 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. Middle: Spike raster of the model P-unit response. Bottom: power spectrum of the firing rate estimated from the spike raster. \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 marker), the latter enhancing the peak at baseline firig rate (blue). The largest peak, however, is always the one atthe EOD frequency of the receiver (black), reflecting the locking of P-unit spikes to the own EOD. The peak at $f_{EOD}$ is also flanked by harmonics of $\Delta f_1$ (small black markers). \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. \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 markers) and at $f_{EOD} \Delta f_2 \pm \Delta f_1$ (small purple marker). \figitem{D} At higher stimulus contrasts further peaks appear in the power spectrum. \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. $\Delta f_2$ was set to match the baseline firing rate $r$ of the P-unit. \figitem{A--D} Top: 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. Middle: Spike raster of the model P-unit response. Bottom: power spectrum of the firing rate estimated from the spike raster. \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 marker), the latter enhancing the peak at baseline firig rate (blue). The largest peak, however, is always the one atthe EOD frequency of the receiver (black), reflecting the locking of P-unit spikes to the own EOD. The peak at $f_{EOD}$ is also flanked by harmonics of $\Delta f_1$ (small black markers). \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. \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 markers) and at $f_{EOD} \Delta f_2 \pm \Delta f_1$ (small purple marker). \figitem{D} At higher stimulus contrasts further peaks appear in the power spectrum at more complex combinations of $f_{EOD}$, $\Delta f_1$, and $\Delta f_2$ as indicated ($k$ is an integer). \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*} \end{figure*}
The stimuli used in \figref{fig:motivation} had the same not-small amplitude. 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}. The stimuli used in \figref{fig:motivation} had the same not-small amplitude. 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

@ -217,12 +217,15 @@ def plot_psd(ax, s, path, contrast, spikes, nfft, dt, beatf1, beatf2, eodf):
ax.plot(eodf - beatf2 - beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 - beatf1)) + offsm, **s.psF02m) ax.plot(eodf - beatf2 - beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 - beatf1)) + offsm, **s.psF02m)
if contrast > 0.05: if contrast > 0.05:
ax.plot(beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 2*beatf1)) + offsm, ax.plot(beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 2*beatf1)) + offsm,
label=r'$\Delta f_2 + k\Delta f_1$', **s.psF012m) label=r'$\Delta f_2 \pm k\Delta f_1$', **s.psF012m)
ax.plot(beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 3*beatf1)) + offsm, **s.psF012m) ax.plot(beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 3*beatf1)) + offsm, **s.psF012m)
ax.plot(beatf2 - 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 - 2*beatf1)) + offsm, **s.psF012m)
ax.plot(beatf2 - 3*beatf1, decibel(peak_ampl(freqs, psd, beatf2 - 3*beatf1)) + offsm, **s.psF012m)
ax.plot(3*beatf1, decibel(peak_ampl(freqs, psd, 3*beatf1)) + offsm, **s.psF01m) ax.plot(3*beatf1, decibel(peak_ampl(freqs, psd, 3*beatf1)) + offsm, **s.psF01m)
ax.plot(4*beatf1, decibel(peak_ampl(freqs, psd, 4*beatf1)) + offsm, **s.psF01m) ax.plot(4*beatf1, decibel(peak_ampl(freqs, psd, 4*beatf1)) + offsm, **s.psF01m)
ax.plot(eodf - 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - 2*beatf1)) + offsm, **s.psFEODm) ax.plot(eodf - 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - 2*beatf1)) + offsm, **s.psFEODm)
ax.plot(eodf - 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - 3*beatf1)) + offsm, **s.psFEODm) ax.plot(eodf - 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - 3*beatf1)) + offsm, **s.psFEODm)
ax.plot(eodf - 4*beatf1, decibel(peak_ampl(freqs, psd, eodf - 4*beatf1)) + offsm, **s.psFEODm)
ax.plot(eodf - 2*beatf2, decibel(peak_ampl(freqs, psd, eodf - 2*beatf2)) + offsm, **s.psF0m) ax.plot(eodf - 2*beatf2, decibel(peak_ampl(freqs, psd, eodf - 2*beatf2)) + offsm, **s.psF0m)
ax.plot(eodf - beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm, ax.plot(eodf - beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
**s.psF02m) **s.psF02m)

View File

@ -239,10 +239,12 @@ def plot_rate(ax, s, spikes, tmin, tmax, sigma=0.002):
mask = (time >= tmin) & (time <= tmax) mask = (time >= tmin) & (time <= tmax)
time = time[mask] - tmin time = time[mask] - tmin
r = r[mask] r = r[mask]
ax.show_spines('') ax.show_spines('l')
ax.plot(1000*time, r, **s.lsRate) ax.plot(1000*time, r, clip_on=False, **s.lsRate)
ax.set_xlim(0, 1000*(tmax - tmin)) ax.set_xlim(0, 1000*(tmax - tmin))
ax.set_ylim(-10, 550) ax.set_ylim(0, 550)
ax.set_ylabel('Rate', 'Hz')
ax.set_yticks_delta(200)
def plot_psd(ax, s, freqs, power, fmax, dt=0.0005, nfft=512): def plot_psd(ax, s, freqs, power, fmax, dt=0.0005, nfft=512):
@ -250,11 +252,13 @@ def plot_psd(ax, s, freqs, power, fmax, dt=0.0005, nfft=512):
mask = freqs <= fmax mask = freqs <= fmax
freqs = freqs[mask] freqs = freqs[mask]
power = power[mask] power = power[mask]
ax.show_spines('b') ax.show_spines('lb')
ax.plot(freqs, power, **s.lsPower) ax.plot(freqs, power, **s.lsPower)
ax.set_xlim(0, fmax) ax.set_xlim(0, fmax)
ax.set_ylim(-20, 0) ax.set_ylim(-20, 0)
ax.set_xlabel('Frequency', 'Hz') ax.set_xlabel('Frequency', 'Hz')
ax.set_ylabel('Power', 'dB')
ax.set_yticks_delta(10)
def mark_freq(ax, freqs, power, f, label, style, xoffs=10, yoffs=0, toffs=0, angle=0): def mark_freq(ax, freqs, power, f, label, style, xoffs=10, yoffs=0, toffs=0, angle=0):
@ -286,7 +290,8 @@ if __name__ == '__main__':
s = plot_style() s = plot_style()
fig, axs = plt.subplots(5, 4, cmsize=(s.plot_width, 0.6*s.plot_width), fig, axs = plt.subplots(5, 4, cmsize=(s.plot_width, 0.6*s.plot_width),
height_ratios=[1, 0, 2, 1.3, 3, 0.7, 5]) height_ratios=[1, 0, 2, 1.3, 3, 0.7, 5])
fig.subplots_adjust(leftm=3, rightm=4.5, topm=1.5, bottomm=4, wspace=0.4, hspace=0.4) fig.subplots_adjust(leftm=7.5, rightm=4.5, topm=1.5, bottomm=4,
wspace=0.4, hspace=0.4)
fmax = 250 fmax = 250
tmin = 0.106 tmin = 0.106
tmax = 0.206 tmax = 0.206
@ -318,11 +323,14 @@ if __name__ == '__main__':
mark_freq(axs[4, 3], freqs, powers[3], df1, '', s.psF0) mark_freq(axs[4, 3], freqs, powers[3], df1, '', s.psF0)
mark_freq(axs[4, 3], freqs, powers[3], df1, '', s.psF01, 130, 1.5) mark_freq(axs[4, 3], freqs, powers[3], df1, '', s.psF01, 130, 1.5)
mark_freq(axs[4, 3], freqs, powers[3], abs(df1) + abs(df2) - 2, mark_freq(axs[4, 3], freqs, powers[3], abs(df1) + abs(df2) - 2,
f'$\\Delta f_1 + \\Delta f_2={abs(df1) + abs(df2):.0f}$\\,Hz', s.psF012, 20, angle=40) f'$\\Delta f_2 + \\Delta f_1={abs(df1) + abs(df2):.0f}$\\,Hz', s.psF012, 20, angle=40)
mark_freq(axs[4, 3], freqs, powers[3], abs(df1) - abs(df2), mark_freq(axs[4, 3], freqs, powers[3], abs(df1) - abs(df2),
f'$\\Delta f_1 + \\Delta f_2={abs(df1) - abs(df2):.0f}$\\,Hz', s.psF01_2, 50, toffs=5, angle=40) f'$\\Delta f_2 - \\Delta f_1={abs(df1) - abs(df2):.0f}$\\,Hz', s.psF01_2, 50, toffs=5, angle=40)
axs[3, 0].scalebars(-0.03, 0, 20, 500, 'ms', 'Hz') fig.common_yticks(axs[3, :])
axs[4, 0].yscalebar(-0.03, 0.5, 10, 'dB', va='center') fig.common_yticks(axs[4, :])
axs[3, 0].xscalebar(1, 0, 20, 'ms', ha='right')
#axs[3, 0].scalebars(-0.03, 0, 20, 500, 'ms', 'Hz')
#axs[4, 0].yscalebar(-0.03, 0.5, 10, 'dB', va='center')
#fig.tag(axs.T) #fig.tag(axs.T)
fig.tag(axs[0]) fig.tag(axs[0])
fig.savefig() fig.savefig()