updated figure comments

This commit is contained in:
saschuta 2024-06-13 16:40:31 +02:00
parent 8c5cbceb0d
commit a373a3ca32
11 changed files with 24 additions and 30 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View File

@ -5,6 +5,7 @@ import numpy as np
from IPython import embed
from matplotlib import gridspec, pyplot as plt
from threefish.plot.tags import tag2
from threefish.RAM.calc_fft import create_full_matrix2
from threefish.reformat import chose_mat_max_value, get_axis_on_full_matrix, get_psds_ROC, \
load_b_public
@ -164,7 +165,7 @@ def model_full():
markers = ['o', 'o', 'o', 'o', ]
#0.16666666666666666
grid0 = gridspec.GridSpecFromSubplotSpec(2, 2, wspace=0.15, hspace=0.4,
grid0 = gridspec.GridSpecFromSubplotSpec(2, 2, wspace=0.35, hspace=0.4,
subplot_spec=grid[:,1])
@ -207,7 +208,9 @@ def model_full():
transferletters(DF1_frmult, DF2_frmult, array_len, axc, color01, color02, f_same, fr_noise, transfer)
fig = plt.gcf()#[axes[0], axes[3], axes[4]]
fig.tag([axes[0], axes2[0], axes2[1], axes2[2], axes2[3]], xoffs=-4.5, yoffs=1.35) # ax_ams[3],
tag2(fig, [axes[0], axes2[0], axes2[1], axes2[2], axes2[3]], xoffs=np.array([-4.2, -2.5, -2.5, -2.5, -2.5]),
yoffs=np.array([4.55, 4.35, 4.35, 4.35, 4.35])) # ax_ams[3],4.5
#tag2(fig, [axes[0], axes2[0], axes2[1], axes2[2], axes2[3]], xoffs=np.array([-4.5, -2.5, -2.5, -2.5, -2.5]), yoffs=1.35) # ax_ams[3],4.5
#plt.show()
save_visualization()

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -102,7 +102,7 @@ def nonlin_regime(yposs=[450, 450, 450], freqs=[(39.5, -210.5)], printing=False,
full_names = ['calc_model_amp_freqs-_F1_0.22833333333333333Fr_F2_1Fr_af_coupled__C1Len_50_FirstC1_0.0001_LastC1_1.0_FRrelavtiv__start_0.0001_end_1_StimLen_100_nfft_20000_trialsnr_1_mult_minimum_1_power_1_minamps__dev_original_05_point_1temporal',
'calc_model_amp_freqs-_F1_0.22833333333333333Fr_F2_1Fr_af_coupled__C1Len_50_FirstC1_0.0001_LastC1_1.0_FRrelavtiv__start_0.0001_end_1_StimLen_100_nfft_20000_trialsnr_1_mult_minimum_1_power_1_minamps__dev_original_05_point_1_old_fit_temporal']
full_names = ['calc_model_amp_freqs-_F1_0.22833333333333333Fr_F2_1Fr_af_coupled__C1Len_50_FirstC1_0.0001_LastC1_1.0_FRrelavtiv__start_0.0001_end_1_StimLen_100_nfft_20000_trialsnr_1_mult_minimum_1_power_1_minamps__dev_original_05_point_1_fft2_temporal']
full_names = ['calc_model_amp_freqs-_F1_0.22833333333333333Fr_F2_1Fr_af_coupled__C1Len_100_FirstC1_0.0001_LastC1_0.3_FRrelavtiv__start_0.0001_end_0.3_StimLen_100_nfft_20000_trialsnr_1_mult_minimum_1_power_1_minamps__dev_original_05_not_log__point_1_fft2_temporal']
c_grouped = ['c1'] # , 'c2']
c_nrs_orig = [0.01,0.04, 0.1, 0.2] # 0.0002, 0.05, 0.5
@ -228,16 +228,17 @@ def nonlin_regime(yposs=[450, 450, 450], freqs=[(39.5, -210.5)], printing=False,
# frame_cell[np.array(scores)[index][1]], color='grey',
# alpha=0.1)
ax_u1.scatter(c_nrs, (np.array(yposs[i]) - 35) * np.ones(len(c_nrs)), color='black',
ax_u1.scatter(c_nrs, (np.array(yposs[i]) - 0) * np.ones(len(c_nrs)), color='black',
marker='v',
clip_on=False)
#
for c_nn, c_nr in enumerate(c_nrs):
ax_u1.text(c_nr, yposs[i][c_nn] + 15, letters[c_nn], color='black', ha='center',
ax_u1.text(c_nr, yposs[i][c_nn] + 30, letters[c_nn], color='black', ha='center',
va='top')
# ax_u1.plot([c_nr, c_nr], [0, 435], color='black', linewidth=0.8, clip_on=False)
ylim = ax_u1.get_ylim()
ax_u1.set_ylim(0, ylim[-1])
start = 200 # 1000
mults_period = 3
@ -385,7 +386,7 @@ def nonlin_regime(yposs=[450, 450, 450], freqs=[(39.5, -210.5)], printing=False,
int(np.round(c_nrs[c_nn]))) + '$\%$' + ',\,$c_{2}=%s$' % (
int(np.round(a_f2_cm[0]))) + '$\%$' # +'$'
plt.suptitle(f_vary_name(freq=int(freq1), delta=True)+' '+f_stable_name(freq=int(freq2), delta=True))
plt.suptitle(f_vary_name(freq=int(freq1), delta=True)+', '+f_stable_name(freq=int(freq2), delta=True))
title_name = beat_here # fish + '\n' + +c1+c2#twobeat_cond(big=True, double=True,cond=False)
@ -503,4 +504,4 @@ def nonlin_regime(yposs=[450, 450, 450], freqs=[(39.5, -210.5)], printing=False,
if __name__ == '__main__':
#embed()
sys.excepthook = info
nonlin_regime(yposs = [[270,270, 270, 270]],)#, [430,470], [200,200], [200,200, 200, 200], [200,200, 200, 200], [200,200, 200, 200]
nonlin_regime(yposs = [[220, 220, 220, 220]],)#, [430,470], [200,200], [200,200, 200, 200], [200,200, 200, 200], [200,200, 200, 200]

View File

@ -422,7 +422,7 @@ Field observations have shown that courting males were able to react to distant
\notejb{in Voronenko they talk about second-order response functions and not of susceptibilities}
\notejb{in Voronenko they talk about second-order response functions and not of susceptibilities}\notesr{Ja das ist wahr, aber so wie ich das verstehe sind das synonyme, oder etwa nicht?}
@ -504,8 +504,6 @@ We estimated the second-order susceptibility of P-unit responses using RAM stimu
\begin{figure*}[t]
\includegraphics[width=\columnwidth]{model_full}
\notejb{add tick at 100Hz in D \& E}
\notejb{D\&E tags closer to yaxis}
\caption{\label{fig:model_full} Using second-order susceptibility to predict responses to sine-wave stimuli. \figitem[]{A} Absolute value of the second-order susceptibility, \Eqnref{eq:susceptibility}, for both positive and negative frequencies. \susceptf{} was estimated from $N=10^6$ trials of model simulations in the noise-split condition (cell 2013-01-08-aa, see table~\ref{modelparams} for model parameters). White lines indicate zero frequencies. Nonlinear responses at \fsum{} are quantified in the upper right and lower left quadrants. Nonlinear responses at \fdiff{} are quantified in the upper left and lower right quadrants. Baseline firing rate of this cell was at $\fbase=120$\,Hz. The position of the orange/red letters correspond to the beat frequencies used for the stimulation with pure sine-waves in the subsequent panels and indicate the sum/difference of those beat frequencies. \figitem[]{B} Absolute value of the first-order susceptibility. \figitem{C--F} Black line -- power spectral density of model simulations in response to stimulation with two pure sine waves, \fone{} and \ftwo, in addition to the receiving fish's own EOD (three fish scenario). The contrasts of beat beats is 0.0065. Colored circles highlight the height of selected peaks in the power spectrum. Black circles highlight the peak height that can be predicted from \panel{A, B}. Grey line -- power spectral density of model in the baseline condition. \figitem{B} The sum of the two beat frequencies match \fbase{}. \figitem{C} The difference of \fone{} and \ftwo{} match \fbase{}. \figitem{D} Only the first beat frequency matches \fbase{}. \figitem{C} None of the two beat frequencies matches \fbase{}.}
\end{figure*}
@ -887,10 +885,6 @@ CVs in P-units can range up to 1.5 \citep{Grewe2017, Hladnik2023}. We show the s
\begin{figure*}[t]
\includegraphics[width=\columnwidth]{trialnr}
\notejb{ylabel: absolute value of $chi_2$!}
\notejb{sort the legend labels!}
\notejb{one of the 99.99\% percentiles is enough}
\notejb{add $10^7$ tick on x-axis}
\caption{\label{fig:trialnr} Dependence of the estimate of the second-order susceptibility on the number of trials $\n$. While the estimate of the noise floor (10th and 90th percentile) of the $|\chi_2(f_1, f_2)|$ matrix does not saturate yet, the estimates of the high values in the matrix that make up the characteristic ridges saturate for $N>10^6$. The model used has the identifier 2013-01-08-aa.
}
\end{figure*}

View File

@ -218,11 +218,12 @@
%%%%% notes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\note}[2][]{\textbf{[#1: #2]}}
%\newcommand{\note}[2][]{}
\newcommand{\noteab}[1]{\note[AB]{#1}}
\newcommand{\notejb}[1]{\note[JB]{#1}}
\newcommand{\notejg}[1]{\note[JG]{#1}}
\newcommand{\notems}[1]{\note[MS]{#1}}
\newcommand{\notesr}[1]{\note[SR]{#1}}
\newcommand{\noteab}[1]{\note[AB]{#1}}
\newcommand{\notebl}[1]{\note[BL]{#1}}
\newcommand{\notems}[1]{\note[MS]{#1}}
%%%%% new commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\fstim}{\ensuremath{f_{\rm{stim}}}}
@ -421,7 +422,7 @@ Field observations have shown that courting males were able to react to distant
\notejb{in Voronenko they talk about second-order response functions and not of susceptibilities}
\notejb{in Voronenko they talk about second-order response functions and not of susceptibilities}\notesr{Ja das ist wahr, aber so wie ich das verstehe sind das synonyme, oder etwa nicht?}
@ -472,8 +473,7 @@ In contrast, a high-CV P-unit (CV$_{\text{base}}=0.4$) does not exhibit pronounc
\begin{figure*}[t]
\includegraphics[width=\columnwidth]{ampullary}
\caption{\label{fig:ampullary} Linear and nonlinear stimulus encoding in an ampullary afferent (cell identifier ``2012-04-26-ae"). \figitem{A} Interspike interval (ISI) distribution of the cell's baseline activity. The very low CV of the ISIs indicates almost perfect periodic spiking. \figitem{B} Power spectral density of baseline activity with peaks at the cell's baseline firing rate and its harmonics. \figitem{C} Bad-limited white noise stimulus (top, with cutoff frequency of 150\,Hz) added to the fish's self-generated electric field and spike raster of the evoked responses (bottom) for two stimulus contrasts as indicated (right). \figitem{D} Gain of the transfer function, \Eqnref{linearencoding_methods}, of the responses to stimulation with 2\,\% (light green) and 20\,\% contrast (dark green). \figitem{E, F} Absolute value of the second-order susceptibility, \Eqnref{eq:susceptibility}, for both stimulus contrasts as indicated. Pink triangles indicate baseline firing rate. \figitem{G} Projections of the second-order susceptibilities in \panel{E, F} onto the diagonal. \notejb{`` Wurden die ampullaeren auch auf 10s ausgewertet?.''}\notesr{ja}
}
\caption{\label{fig:ampullary} Linear and nonlinear stimulus encoding in an ampullary afferent (cell identifier ``2012-04-26-ae"). \figitem{A} Interspike interval (ISI) distribution of the cell's baseline activity. The very low CV of the ISIs indicates almost perfect periodic spiking. \figitem{B} Power spectral density of baseline activity with peaks at the cell's baseline firing rate and its harmonics. \figitem{C} Bad-limited white noise stimulus (top, with cutoff frequency of 150\,Hz) added to the fish's self-generated electric field and spike raster of the evoked responses (bottom) for two stimulus contrasts as indicated (right). \figitem{D} Gain of the transfer function, \Eqnref{linearencoding_methods}, of the responses to stimulation with 2\,\% (light green) and 20\,\% contrast (dark green) of 10\,s duration. \figitem{E, F} Absolute value of the second-order susceptibility, \Eqnref{eq:susceptibility}, for both stimulus contrasts as indicated. Pink triangles indicate baseline firing rate. \figitem{G} Projections of the second-order susceptibilities in \panel{E, F} onto the diagonal. }
\end{figure*}
Irrespective of the CV, neither of the two example P-units shows the complete expected structure of nonlinear interactions. Electric fish posses an additional electrosensory system, the passive or ampullary electrosensory system, that responds to low-frequency exogeneous electric stimuli. The population of ampullary afferents is much less heterogeneous, and known for the much lower CVs of their baseline ISIs (CV$_{\text{base}}=0.06$--$0.22$) \citep{Grewe2017}. Ampullary cells do not phase-lock to the EOD and the ISIs are unimodally distributed (\subfigrefb{fig:ampullary}{A}). As a consequence of the high regularity of their baseline spiking activity, the corresponding power spectrum shows distinct peaks at the baseline firing rate \fbase{} and harmonics of it. Since the cells do not fire phase locked to the EOD, there is no peak at \feod{} (\subfigrefb{fig:ampullary}{B}). When driven by a low-contrast noise stimulus (note: this is not an AM but a stimulus that is added to the self-generated EOD, \subfigref{fig:ampullary}{C}), ampullary cells exhibit very pronounced bands in the second-order susceptibility, where \fsum{} is equal to \fbase{} or its harmonic (yellow diagonals in \subfigrefb{fig:ampullary}{E}), implying strong nonlinear response components at these frequency combinations (\subfigrefb{fig:ampullary}{G}, top). With higher stimulus contrasts these bands disappear (\subfigrefb{fig:ampullary}{F}), the projection onto the diagonal looses its distinct peak at \fsum{} and its overal level is reduced (\subfigrefb{fig:ampullary}{G}, bottom).
@ -485,7 +485,7 @@ In the example recordings shown above (\figsrefb{fig:cells_suscept} and \fref{fi
\begin{figure*}[t]
\includegraphics[width=\columnwidth]{model_and_data}
\caption{\label{model_and_data} Estimation of second-order susceptibilities in the limit of weak stimuli. \figitem{A} \suscept{} estimated from $N=11$ trials \notejb{of duration XXX?} \notesr{0.5\,s} of an electrophysiological recording of another low-CV P-unit (cell 2012-07-03-ak, $\fbase=120$\,Hz, CV=0.20) driven with a weak RAM stimulus with contrast 2.5\,\%. Pink edges mark baseline firing rate where enhanced nonlinear responses are expected. \figitem[i]{B} \textit{Standard condition} of model simulations with intrinsic noise (bottom) and a RAM stimulus (top). \notejb{Since the model overestimated the sensitivity of the real P-unit, we adjusted the RAM contrast to 0.009\,\%, such that the resulting spike trains had the same CV as the electrophysiolgical recorded P-unit during the 2.5\,\% contrast stimulation (see table~\ref{modelparams} for model parameters).} \figitem[ii]{B} \suscept{} estimated from simulations of the cell's LIF model counterpart (cell 2012-07-03-ak, table~\ref{modelparams}) based on the same number of trials as in the electrophysiological recording. \figitem[iii]{B} Same as \panel[ii]{B} but using $10^6$ stimulus repetitions. \figitem[i-iii]{C} Same as in \panel[i-iii]{B} but in the \textit{noise split} condition: there is no external RAM signal driving the model. Instead, a large part (90\,\%) of the total intrinsic noise is treated as signal and is presented as an equivalent amplitude modulation (\signalnoise, center), while the intrinsic noise is reduced to 10\,\% of its original strength (see methods for details). In addition to one million trials, this reveals the full expected structure of the second-order susceptibility.}
\caption{\label{model_and_data} Estimation of second-order susceptibilities in the limit of weak stimuli. \figitem{A} \suscept{} estimated from $N=11$ 0.5\,slong trials of an electrophysiological recording of another low-CV P-unit (cell 2012-07-03-ak, $\fbase=120$\,Hz, CV=0.20) driven with a weak RAM stimulus with contrast 2.5\,\%. Pink edges mark baseline firing rate where enhanced nonlinear responses are expected. \figitem[i]{B} \textit{Standard condition} of model simulations with intrinsic noise (bottom) and a RAM stimulus (top). \notejb{Since the model overestimated the sensitivity of the real P-unit, we adjusted the RAM contrast to 0.009\,\%, such that the resulting spike trains had the same CV as the electrophysiolgical recorded P-unit during the 2.5\,\% contrast stimulation (see table~\ref{modelparams} for model parameters).} \figitem[ii]{B} \suscept{} estimated from simulations of the cell's LIF model counterpart (cell 2012-07-03-ak, table~\ref{modelparams}) based on the same number of trials as in the electrophysiological recording. \figitem[iii]{B} Same as \panel[ii]{B} but using $10^6$ stimulus repetitions. \figitem[i-iii]{C} Same as in \panel[i-iii]{B} but in the \textit{noise split} condition: there is no external RAM signal driving the model. Instead, a large part (90\,\%) of the total intrinsic noise is treated as signal and is presented as an equivalent amplitude modulation (\signalnoise, center), while the intrinsic noise is reduced to 10\,\% of its original strength (see methods for details). In addition to one million trials, this reveals the full expected structure of the second-order susceptibility.}
\end{figure*}
One reason could be simply too little data for a good estimate of the second-order susceptibility. Electrophysiological recordings are limited in time, and therefore responses to only a limited number of trials, i.e. repetitions of the same RAM stimulus, are available. As a consequence, the cross-spectra, \Eqnref{eq:crosshigh}, are insufficiently averaged and the full structure of the second-order susceptibility might be hidden in finite-data noise. This experimental limitation can be overcome by using a computational model for the P-unit, a stochastic leaky integrate-and-fire model with adaptation current and dendritic preprocessing, and parameters fitted to the experimentally recorded P-unit (\figrefb{flowchart}) \citep{Barayeu2023}. The model faithfully reproduces the second-order susceptibility of a low-CV cell estimated from the same low number of trials as in the experiment ($\n{}=11$, compare \panel{A} and \panel[ii]{B} in \figrefb{model_and_data}).
@ -504,11 +504,7 @@ We estimated the second-order susceptibility of P-unit responses using RAM stimu
\begin{figure*}[t]
\includegraphics[width=\columnwidth]{model_full}
\notejb{zero missing on y-axis in B}
\notejb{add tick at 100Hz in E \& F}
\notejb{C-F tags a bit lower, D\&F tag closer to yaxis}
\notejb{What do we want in B? square or linear or dB, noise split as in A, or stimulus as in C-F }
\caption{\label{fig:model_full} Using second-order susceptibility to predict responses to sine-wave stimuli. \figitem[]{A} Absolute value of the second-order susceptibility, \Eqnref{eq:susceptibility}, for both positive and negative frequencies. \susceptf{} was estimated from $N=10^6$ trials of model simulations in the noise-split condition (cell 2013-01-08-aa, see table~\ref{modelparams} for model parameters). White lines indicate zero frequencies. Nonlinear responses at \fsum{} are quantified in the upper right and lower left quadrants. Nonlinear responses at \fdiff{} are quantified in the upper left and lower right quadrants. Baseline firing rate of this cell was at $\fbase=120$\,Hz. The position of the orange/red letters correspond to the beat frequencies used for the stimulation with pure sine-waves in the subsequent panels and indicate the sum/difference of those beat frequencies. \figitem[]{B} Absolute value of the first-order susceptibility. \figitem{C--F} Black line -- power spectral density of model simulations in response to stimulation with two pure sine waves, \fone{} and \ftwo, in addition to the receiving fish's own EOD (three fish scenario). The contrasts of beat beats is 0.0065. Colored circles highlight the height of selected peaks in the power spectrum. Black circles highlight the peak height that can be predicted from \panel{A, B}. Grey line -- power spectral density of model in the baseline condition. \figitem{B} The sum of the two beat frequencies match \fbase{}. \figitem{C} The difference of \fone{} and \ftwo{} match \fbase{}. \figitem{D} Only the first beat frequency matches \fbase{}. \figitem{C} None of the two beat frequencies matches \fbase{}. \noteab{Für die Transfer Funktion habe ich jetzt einen Faktor 1, für die Nichtlinearität einen Faktor 30, aber vielleicht wenn ich über mehrere Punkte mitteln muss und das alles so noisy ist das eben noch keine Gute Abschätzung in der Stauration?}}
\caption{\label{fig:model_full} Using second-order susceptibility to predict responses to sine-wave stimuli. \figitem[]{A} Absolute value of the second-order susceptibility, \Eqnref{eq:susceptibility}, for both positive and negative frequencies. \susceptf{} was estimated from $N=10^6$ trials of model simulations in the noise-split condition (cell 2013-01-08-aa, see table~\ref{modelparams} for model parameters). White lines indicate zero frequencies. Nonlinear responses at \fsum{} are quantified in the upper right and lower left quadrants. Nonlinear responses at \fdiff{} are quantified in the upper left and lower right quadrants. Baseline firing rate of this cell was at $\fbase=120$\,Hz. The position of the orange/red letters correspond to the beat frequencies used for the stimulation with pure sine-waves in the subsequent panels and indicate the sum/difference of those beat frequencies. \figitem[]{B} Absolute value of the first-order susceptibility. \figitem{C--F} Black line -- power spectral density of model simulations in response to stimulation with two pure sine waves, \fone{} and \ftwo, in addition to the receiving fish's own EOD (three fish scenario). The contrasts of beat beats is 0.0065. Colored circles highlight the height of selected peaks in the power spectrum. Black circles highlight the peak height that can be predicted from \panel{A, B}. Grey line -- power spectral density of model in the baseline condition. \figitem{B} The sum of the two beat frequencies match \fbase{}. \figitem{C} The difference of \fone{} and \ftwo{} match \fbase{}. \figitem{D} Only the first beat frequency matches \fbase{}. \figitem{C} None of the two beat frequencies matches \fbase{}.}
\end{figure*}
However, the second-order susceptibility \Eqnref{eq:susceptibility} is a spectral measure that is based on Fourier transforms and thus is also defined for negative stimulus frequencies. The full \susceptf{} matrix is symmetric with respect to the origin. In the upper-right and lower-left quadrants of \susceptf{}, stimulus-evoked responses at \fsum{} are shown, whereas in the lower-right and upper-left quadrants nonlinear responses at the difference \fdiff{} are shown (\figref{fig:model_full}). The vertical and horizontal lines at \foneb{} and \ftwob{} are very pronounced in the upper-right quadrant of \subfigrefb{fig:model_full}{A} for nonlinear responses at \fsum{} and extend into the upper-left quadrant (representing \fdiff) where they fade out towards more negative $f_1$ frequencies. The peak in the response power-spectrum at \fdiff{} evoked by pure sine-wave stimulation (\subfigrefb{fig:motivation}{D}) is predicted by the horizontal line in the upper-left quadrant (\subfigrefb{fig:model_full}{A}, \citep{Schlungbaum2023}).

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -106,7 +106,7 @@ def trialnr(nffts=['whole'], powers=[1], contrasts=[0], noises_added=[''], D_ext
fig, ax = plt.subplots(1, 1)
ax = [ax]
alphas = [0.5]#, 1, 1]
alphas = [1]#, 1, 1]
colors = ['black']#, 'black','red']
for s in range(len(colors)):
stacks = []
@ -192,14 +192,14 @@ def trialnr(nffts=['whole'], powers=[1], contrasts=[0], noises_added=[''], D_ext
ax[0].set_xscale('log')#colors[s]
ax[0].set_yscale('log')
ax[0].set_xlabel('Trials [$N$]')
ax[0].set_ylabel('$\chi_{2}$\,[Hz]')
ax[0].set_ylabel('$|\chi_{2}|$\,[Hz]')
ax[0].set_xlim(0, 10000000)
############################################
if s == 0:
ax[0].plot(trial_nrs_here, perc90, color='grey', clip_on=False, label='90th percentile', alpha=alphas[s])
ax[0].plot(trial_nrs_here, perc05, color='lightgrey', clip_on=False, label = '10th percentile', alpha = alphas[s])
ax[0].scatter(trial_nrs_here, perc05, color='lightgrey', clip_on=False, alpha = alphas[s])
ax[0].plot(trial_nrs_here, perc90, color='grey', clip_on=False, label='90th percentile', alpha = alphas[s])
ax[0].scatter(trial_nrs_here, perc90, color='grey', clip_on=False, alpha = alphas[s])
ax[0].legend()