From 574a1b928857e87aa6d8c1928a04f8aa3e15f22f Mon Sep 17 00:00:00 2001 From: BrianNGitahi <102825698+BrianNGitahi@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:29:28 -0800 Subject: [PATCH] 01/12 --- Bleach_compare.py | 15 ++++++++------- Simulation.ipynb | 6 +++--- __pycache__/s_functions.cpython-311.pyc | Bin 10647 -> 10647 bytes f_rate2.py | 24 ------------------------ 4 files changed, 11 insertions(+), 34 deletions(-) diff --git a/Bleach_compare.py b/Bleach_compare.py index 530e518..102a716 100644 --- a/Bleach_compare.py +++ b/Bleach_compare.py @@ -26,12 +26,12 @@ # plot bleached signal for the bleach factor acting on different components of f # create timesteps array for the plot -t = np.linspace(0,nm_conc.size-1,nm_conc.size) +# t = np.linspace(0,nm_conc.size-1,nm_conc.size) -b1 = bleach_nm(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) -b2 = bleach_dnm(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) -b3 = bleach_t(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) -b4 = bleach_all(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) +# b1 = bleach_nm(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) +# b2 = bleach_dnm(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) +# b3 = bleach_t(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) +# b4 = bleach_all(K_D = 1000, tau=chosen_tau, F_max = 45, F_min = 10, nm_conc=nm_conc, bline_len=5000) @@ -52,9 +52,10 @@ # for different variances, get the heatmap plt.figure() -for i in range(len(var_v)): +for i in range(len(var_values)): plt.subplot(3,2,i+1) - bleach_dnm_heat(specific_taus,nm_conc_input=nm_conc, var = var_v[i]) + bleach_dnm_heat(specific_taus,nm_conc_input=nm_conc, var = var_values[i]) + print('Generated heatmap {}'.format(i)) plt.suptitle('SNR vs bleach strength at different variance for ftissue', size = 16) plt.tight_layout() diff --git a/Simulation.ipynb b/Simulation.ipynb index 8a50875..e402b9a 100644 --- a/Simulation.ipynb +++ b/Simulation.ipynb @@ -128,7 +128,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Ok, look's like the neuron is firing as we expect it to over number of timesteps. This section of code produced figure 1 on the interal note document.\n", + "Ok, look's like the neuron is firing as we expect it to over number of timesteps. (This section of code produced figure 1 on the interal note document.)\n", "\n", "Bonus: run this function several times and histogram the n_spikes to see if it's actually a poisson w mean of n_timesteps spikes.\n" ] @@ -423,11 +423,11 @@ "Now, let's simulate the flourescence signal produced by the changes in the neuromodulator concentration, $\\ \\Delta$ [NM]. This is described by eq. 3 in the paper by Neher/Augustine -- 1992: \n", "\n", "$\\begin{equation}\n", - " \\frac{\\Delta F(t)}{F(0)} = \\frac{(K'_D + [NM]_{i,t})/(K_D + [NM]_{i,t})}{(K'_D + [NM]_{i,0})/(K_D + [NM]_{i,0})} - 1\n", + " \\frac{\\Delta F(t)}{F(0)} = \\frac{(K'_D + [NM]_{t})/(K_D + [NM]_{t})}{(K'_D + [NM]_{0})/(K_D + [NM]_{0})} - 1\n", "\\end{equation}\n", "$\n", "\n", - "where $K_D$ is the dissociation constant for the NM binding to the sensor, $\\ [NM]_{i,0}\\ $ is the initial (resting) [NM], $\\ [NM]_{i,t}\\ $ is the [NM] for the current timestep, and $K'_D$ is defined as:\n", + "where $K_D$ is the dissociation constant for the NM binding to the sensor, $\\ [NM]_{0}\\ $ is the initial (resting) [NM], $\\ [NM]_{t}\\ $ is the [NM] for the current timestep, and $K'_D$ is defined as:\n", "\n", "$\\begin{equation} \\tag{2}\n", " K'_D = K_D\\ (F_{min}/F_{max})\n", diff --git a/__pycache__/s_functions.cpython-311.pyc b/__pycache__/s_functions.cpython-311.pyc index 35d6310fdce0e7f8bfd21796854ca842d0deab96..18bb7401b9dbad7d24743c5d755c5ab6a948b6c4 100644 GIT binary patch delta 19 ZcmbOpJUy6eIWI340}vQDZ{+IL1OPLp1knHh delta 19 YcmbOpJUy6eIWI340|=yU