From d05cbf381832fc531d4b6434e9b09c5d41affa78 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Thu, 26 Jun 2025 18:51:50 +0200 Subject: [PATCH] methods 1 --- dataoverview.py | 2 ++ nonlinearbaseline.tex | 18 ++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dataoverview.py b/dataoverview.py index e163e0f..9657b7d 100644 --- a/dataoverview.py +++ b/dataoverview.py @@ -264,6 +264,8 @@ def si_stats(title, data, sicol, si_thresh, nsegscol): print(f' duration: {np.min(duration):.1f}s - {np.max(duration):.1f}s, median={np.median(duration):.1f}s, mean={np.mean(duration):.1f}s, std={np.std(duration):.1f}s') duration *= trials print(f' total duration: {np.min(duration):.1f}s - {np.max(duration):.1f}s, median={np.median(duration):.1f}s, mean={np.mean(duration):.1f}s, std={np.std(duration):.1f}s') + duration = data['durationbase'] + print(f' baseline duration: {np.min(duration):.1f}s - {np.max(duration):.1f}s, median={np.median(duration):.1f}s, mean={np.mean(duration):.1f}s, std={np.std(duration):.1f}s') cols = ['cvbase', 'respmod2', 'ratebase', 'vsbase', 'serialcorr1', 'burstfrac', 'ratestim', 'cvstim'] for i in range(len(cols)): for j in range(i + 1, len(cols)): diff --git a/nonlinearbaseline.tex b/nonlinearbaseline.tex index f986754..15fb2da 100644 --- a/nonlinearbaseline.tex +++ b/nonlinearbaseline.tex @@ -672,16 +672,16 @@ Tim Hladnik, Henriette Walz, Franziska Kuempfbeck, Fabian Sinz, Laura Seidler, E \subsection{Experimental subjects and procedures} Within this project, we re-evaluated datasets that were recorded between 2010 and 2023 at the Ludwig Maximilian University (LMU) M\"unchen and the Eberhard-Karls University T\"ubingen. All experimental protocols complied with national and European law and were approved by the respective Ethics Committees of the Ludwig-Maximilians Universität München (permit no. 55.2-1-54-2531-135-09) and the Eberhard-Karls Unversität Tübingen (permit no. ZP 1/13 and ZP 1/16). -The final sample consisted of 221 P-units and 47 ampullary electroreceptor afferents recorded in 71 weakly electric fish of the species \lepto{}. Electrophysiological recordings were performed on male and female weakly electric fish of the species \lepto{}. Fish were obtained from a commercial supplier for tropical fish (Aquarium Glaser GmbH, Rodgau, Germany) and kept in tanks with a water temperature of $25\pm1\,^\circ$C and a conductivity of around $270\,\micro\siemens\per\centi\meter$ under a 12\,h:12\,h light-dark cycle. +The final sample consisted of 172 P-units and 30 ampullary electroreceptor afferents recorded in 80 weakly electric fish of both sexes of the species \lepto{}. Fish were obtained from a commercial supplier for tropical fish (Aquarium Glaser GmbH, Rodgau, Germany) and kept in tanks with a water temperature of $25\pm1\,^\circ$C and a conductivity of around $270\,\micro\siemens\per\centi\meter$ under a 12\,h:12\,h light-dark cycle. Before surgery, the animals were deeply anesthetized via bath application of a solution of MS222 (120\,mg/l, PharmaQ, Fordingbridge, UK) buffered with Sodium Bicarbonate (120\,mg/l). The posterior anterior lateral line nerve (pALLN) was exposed by making a small cut into the skin covering the nerve. The cut was placed dorsal of the operculum just before the nerve descends towards the anterior lateral line ganglion (ALLNG). Those parts of the skin that were to be cut were locally anesthetized by cutaneous application of liquid lidocaine hydrochloride (20\,mg/ml, bela-pharm GmbH). During the surgery, water supply was ensured by a mouthpiece to maintain anesthesia with a solution of MS222 (100\,mg/l) buffered with Sodium Bicarbonate (100\,mg/l). After surgery, fish were immobilized by intramuscular injection of from 25\,$\micro$l to 50\,$\micro$l of tubocurarine (5\,mg/ml dissolved in fish saline; Sigma-Aldrich). Respiration was then switched to normal tank water and the fish was transferred to the experimental tank. -\subsection{Experimental setup} +\subsection{Electrophysiological recordings} For the recordings fish were positioned centrally in the experimental tank, with the major parts of their body submerged into the water. Those body parts that were above the water surface were covered with paper tissue to avoid drying of the skin. Local analgesia was refreshed in intervals of two hours by cutaneous application of Lidocaine (2\,\%; bela-pharm, Vechta, Germany) around the surgical wounds. Electrodes (borosilicate; 1.5\,mm outer diameter; GB150F-8P; Science Products, Hofheim, Germany) were pulled to a resistance of 50--100\,\mega\ohm{} (model P-97; Sutter Instrument, Novato, CA) and filled with 1\,M KCl solution. Electrodes were fixed in a microdrive (Luigs-Neumann, Ratingen, Germany) and lowered into the nerve. Recordings of electroreceptor afferents were amplified and lowpass filtered at 10\,kHz (SEC-05, npi-electronics, Tamm, Germany, operated in bridge mode). All signals, neuronal recordings, recorded EOD, and the generated stimulus, were digitized with sampling rates of 20 or 40\,kHz (PCI-6229, National Instruments, Austin, TX). RELACS (\url{www.relacs.net}) running on a Linux computer was used for online spike and EOD detection, stimulus generation, and calibration. Recorded data was then stored on the hard drive for offline analysis. \subsection{Identification of P-units and ampullary cells} -The neurons were classified into cell types during the recording by the experimenter. P-units were classified based on baseline firing rates of 50--450\,Hz, a clear phase-locking to the EOD, and by their responses to amplitude modulations of their own EOD \citep{Grewe2017, Hladnik2023}. Ampullary cells were classified based on firing rates of 80--200\,Hz, absent phase-locking to the EOD, and responses to low-frequency sinusoidal stimuli \citep{Grewe2017}. We here selected only those cells of which the neuron's baseline activity as well as the responses to frozen noise stimuli were recorded. +Recordings were classified as P-units if baseline action potentials phase locked to the EOD with vectors strengths between 0.7 and 0.95, a baseline firing rate larger than 30\,Hz, a serial correlation of subsequent interspike intervals below zero, a coefficient of variation of baseline interspike intervals below 1.5 und during stimulation below 2. As ampullary cells we classified recordings with vector strengths below 0.15, baseline firing rate above 10\,Hz, baseline CV below 0.18, CV during stimulation below 1.0, and a response modulation during stimulation below 80\,Hz \citep{Grewe2017}. We here selected only those cells of which the neuron's baseline activity as well as the responses to band-limited white noise stimuli were recorded. \subsection{Electric field recordings} For monitoring the EOD without the stimulus, two vertical carbon rods ($11\,\centi\meter$ long, 8\,mm diameter) in a head-tail configuration were placed isopotential to the stimulus. Their signal was differentially amplified with a gain 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). For an estimate of the transdermal potential that drives the electroreceptors, two silver wires spaced by 1\,cm were 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). This local EOD measurement recorded the combination of the fish's own EOD and the applied stimulus. @@ -689,17 +689,14 @@ For monitoring the EOD without the stimulus, two vertical carbon rods ($11\,\cen \subsection{Stimulation}\label{rammethods} Electric stimuli were attenuated (ATN-01M, npi-electronics, Tamm, Germany), isolated from 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. - -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 cells 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\,Hz (ampullary), 300 or 400\,Hz (P-units). The stimulus intensity is given as a contrast, i.e. the standard deviation of the noise stimulus relative to the fish's EOD amplitude. The contrast varied between 1 and 20\,\% (median 5\,\%) for P-units and 2.5 and 20\,\% (median 5\,\%) for ampullary cells. Only noise stimuli with a duration of at least 2\,s (maximum of 50\,s, median 10\,s) and enough repetitions to results in at least 100 FFT segments (see below, P-units: 100--1520, median 313, ampullary cells: 105 -- 3648, median 722) were included into 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 noise stimulus was first multiplied with the EOD of the fish (MXS-01M; npi electronics). % and between 2.5 and 40\,\% for \eigen \subsection{Data analysis} Data analysis was done in Python 3 using the packages matplotlib \citep{Hunter2007}, numpy \citep{Walt2011}, scipy \citep{scipy2020}, pandas \citep{Mckinney2010}, nixio \citep{Stoewer2014}, and thunderlab (\url{https://github.com/bendalab/thunderlab}). -%sklearn \citep{scikitlearn2011}, - \paragraph{Baseline analysis}\label{baselinemethods} -The baseline firing rate \fbase{} was calculated as the number of spikes divided by the duration of the baseline recording (on average 18\,s). The coefficient of variation (CV) of the interspike intervals (ISI) is their standard deviation relative to the average ISI: $\rm{CV} = \sqrt{\langle (ISI- \langle ISI \rangle) ^2 \rangle} / \langle ISI \rangle$. If the baseline was recorded several times in a recording, the average \fbase{} and CV were calculated. +The baseline firing rate \fbase{} was calculated as the number of spikes divided by the duration of the baseline recording (median 32\,s). The coefficient of variation (CV) of the interspike intervals (ISI) is their standard deviation relative to their mean: $\rm{CV}_{\rm base} = \sqrt{\langle (ISI- \langle ISI \rangle) ^2 \rangle} / \langle ISI \rangle$. If the baseline was recorded several times in a recording, the measures from the longest recording were taken. \paragraph{White noise analysis} \label{response_modulation} In the stimulus-driven case, the neuronal activity of the recorded cell is modulated around the average firing rate that is similar to \fbase{} and in that way encodes the time-course of the stimulus. Spiking activity @@ -707,7 +704,8 @@ In the stimulus-driven case, the neuronal activity of the recorded cell is modul \label{eq:spikes} x_k(t) = \sum_i\delta(t-t_{k,i}) \end{equation} -is recorded for each stimulus presentation $k$, as a train of times $t_{k,i}$ where action potentials occured. If only a single trial was recorded or is used for the analysis, we drop the trial index $k$. +is recorded for each stimulus presentation $k$, as a train of times $t_{k,i}$ where action potentials occured. +%If only a single trial was recorded or is used for the analysis, we drop the trial index $k$. The single-trial firing rate \begin{equation} @@ -717,7 +715,7 @@ was estimated by convolving the spike train with a kernel. We used a Gaussian ke \begin{equation} K(t) = {\scriptstyle \frac{1}{\sigma\sqrt{2\pi}}} e^{-\frac{t^2}{2\sigma^2}} \end{equation} -with standard deviation $\sigma$ set to 2.5\,ms if not stated otherwise. Averaging over $n$ repeated stimulus presentations results in the trial averaged firing rate +with standard deviation $\sigma$ set to 2\,ms. Averaging over $n$ repeated stimulus presentations results in the trial averaged firing rate \begin{equation} \label{eq:rate} r(t) = \left\langle r_k(t) \right\rangle _k = \frac{1}{n} \sum_{k=1}^n r_k(t)