Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frap Theory
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hubatsch
Frap Theory
Commits
b4bb2a7f
Commit
b4bb2a7f
authored
4 years ago
by
Lars Hubatsch
Browse files
Options
Downloads
Patches
Plain Diff
Figures as per biorxiv submission.
parent
24868c99
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Plots_Droplet_FRAP.ipynb
+134
-73
134 additions, 73 deletions
Plots_Droplet_FRAP.ipynb
with
134 additions
and
73 deletions
Plots_Droplet_FRAP.ipynb
+
134
−
73
View file @
b4bb2a7f
...
@@ -60,8 +60,8 @@
...
@@ -60,8 +60,8 @@
" plt.ylim(yli)\n",
" plt.ylim(yli)\n",
" plt.tick_params(axis='both', which='major', labelsize=fs)\n",
" plt.tick_params(axis='both', which='major', labelsize=fs)\n",
"\n",
"\n",
"def save_nice_fig(name, form='pdf'):\n",
"def save_nice_fig(name, form='pdf'
, dpi=300
):\n",
" plt.savefig(name, format=form, dpi=
300
, bbox_inches='tight',\n",
" plt.savefig(name, format=form, dpi=
dpi
, bbox_inches='tight',\n",
" transparent=True)"
" transparent=True)"
]
]
},
},
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"nice_fig('time $t$ [s]', 'intensity
(
a.u
)
', [0,4], [0,1.05], [1.5,2])\n",
"nice_fig('time $t$ [s]', 'intensity
[
a.u
.]
', [0,4], [0,1.05], [1.5,2])\n",
"plt.plot(np.linspace(0, (f_i[0].T-1)*f_i[0].dt, f_i[0].T), \n",
"plt.plot(np.linspace(0, (f_i[0].T-1)*f_i[0].dt, f_i[0].T), \n",
" [np.mean(x)/f_i[0].phi_tot_int for x in profs[0]],\n",
" [np.mean(x)/f_i[0].phi_tot_int for x in profs[0]],\n",
" lw=2, label='d=0.5', ls='-')\n",
" lw=2, label='d=0.5', ls='-')\n",
...
@@ -422,6 +422,7 @@
...
@@ -422,6 +422,7 @@
"fig, ax1 = plt.subplots()\n",
"fig, ax1 = plt.subplots()\n",
"ax2 = ax1.twinx()\n",
"ax2 = ax1.twinx()\n",
"plt.sca(ax1)\n",
"plt.sca(ax1)\n",
"nice_fig('c_\\mathrm{salt} [\\mathrm{mM}]', '$\\eta^{-1} \\;[Pa\\cdot s]^{-1}$', [40,190], [0,7.24], [2.3,2])\n",
"sns.lineplot(x=\"conc\", y=\"D\", data=lars, color=sns.color_palette()[1])\n",
"sns.lineplot(x=\"conc\", y=\"D\", data=lars, color=sns.color_palette()[1])\n",
"sns.scatterplot(x=\"conc\", y=\"D\", data=lars, color=sns.color_palette()[1], alpha=0.8)\n",
"sns.scatterplot(x=\"conc\", y=\"D\", data=lars, color=sns.color_palette()[1], alpha=0.8)\n",
"plt.xlabel('$c_\\mathrm{salt}\\; [\\mathrm{mM}]$')\n",
"plt.xlabel('$c_\\mathrm{salt}\\; [\\mathrm{mM}]$')\n",
...
@@ -432,11 +433,10 @@
...
@@ -432,11 +433,10 @@
"ax1.patch.set_visible(False)\n",
"ax1.patch.set_visible(False)\n",
"plt.sca(ax2)\n",
"plt.sca(ax2)\n",
"sns.lineplot(x=\"conc\", y=\"vis\", data=louise, color=grey, label='data from Jawerth \\net al. 2018')\n",
"sns.lineplot(x=\"conc\", y=\"vis\", data=louise, color=grey, label='data from Jawerth \\net al. 2018')\n",
"nice_fig('c_\\mathrm{salt} [\\mathrm{mM}]', '$\\eta^{-1} \\;[Pa\\cdot s]^{-1}$', [40,190], [0,7.24], [2.3,2])\n",
"plt.yticks(color = grey, fontsize=12)\n",
"plt.yticks(color = grey)\n",
"plt.ylabel('$\\eta^{-1} \\;[\\mathrm{Pa\\cdot s}]^{-1}$ ', color = grey, fontsize=12)\n",
"plt.ylabel('$\\eta^{-1} \\;[\\mathrm{Pa\\cdot s}]^{-1}$ ', color = grey)\n",
"plt.legend(frameon=False, fontsize=9)\n",
"plt.legend(frameon=False, fontsize=9)\n",
"save_nice_fig(fol+'Fig1/Lars_vs_Louise.pdf')"
"
#
save_nice_fig(fol+'Fig1/Lars_vs_Louise.pdf')"
]
]
},
},
{
{
...
@@ -493,13 +493,13 @@
...
@@ -493,13 +493,13 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"CMD = np.loadtxt(fol+'/Fig1/CMD_timecourse.csv', delimiter=',')\n",
"CMD = np.loadtxt(fol+'/Fig1/CMD_timecourse
_D
.csv', delimiter=',')\n",
"CMD_fit = np.loadtxt(fol+'/Fig1/CMD_fit_timecourse.csv', delimiter=',')\n",
"CMD_fit = np.loadtxt(fol+'/Fig1/CMD_fit_timecourse
_D
.csv', delimiter=',')\n",
"l_sim = plt.plot(CMD[:, 0], CMD[:, 1::
2
], '.', c=green)\n",
"l_sim = plt.plot(CMD[:, 0], CMD[:, 1::
40
], '.', c=green)\n",
"l_fit = plt.plot(CMD_fit[:, 0], CMD_fit[:, 1::
2
], '-', lw=1, c='k')\n",
"l_fit = plt.plot(CMD_fit[:, 0], CMD_fit[:, 1::
40
], '-', lw=1, c='k')\n",
"plt.plot(range(0, 10), np.ones(10)*np.min(CMD_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n",
"plt.plot(range(0, 10), np.ones(10)*np.min(CMD_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n",
"plt.legend([l_sim[0], l_fit[0]], ['data', 'fit'], ncol=2, loc=(0, 0.85), frameon=False)\n",
"plt.legend([l_sim[0], l_fit[0]], ['data', 'fit'], ncol=2, loc=(0, 0.85), frameon=False)\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity
(
a.u
)
', [0,np.max(CMD_fit[:, 0])], [0,0.65], [2.3,2])\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity
[
a.u
.]
', [0,np.max(CMD_fit[:, 0])], [0,0.65], [2.3,2])\n",
"save_nice_fig(fol+'Fig1/CMD_spat_recov.pdf')"
"save_nice_fig(fol+'Fig1/CMD_spat_recov.pdf')"
]
]
},
},
...
@@ -516,13 +516,13 @@
...
@@ -516,13 +516,13 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"PGL = np.loadtxt(fol+'/Fig1/PGL_timecourse.csv', delimiter=',')\n",
"PGL = np.loadtxt(fol+'/Fig1/PGL_timecourse
_D
.csv', delimiter=',')\n",
"PGL_fit = np.loadtxt(fol+'/Fig1/PGL_fit_timecourse.csv', delimiter=',')\n",
"PGL_fit = np.loadtxt(fol+'/Fig1/PGL_fit_timecourse
_D
.csv', delimiter=',')\n",
"l_sim = plt.plot(PGL[:, 0], PGL[:, 1::
2
], '.', c=red)\n",
"l_sim = plt.plot(PGL[:, 0], PGL[:, 1::
130
], '.', c=red)\n",
"l_fit = plt.plot(PGL_fit[:, 0], PGL_fit[:, 1::
2
], '-', lw=1, c='k')\n",
"l_fit = plt.plot(PGL_fit[:, 0], PGL_fit[:, 1::
130
], '-', lw=1, c='k')\n",
"plt.plot(range(0, 10), np.ones(10)*np.min(PGL_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n",
"plt.plot(range(0, 10), np.ones(10)*np.min(PGL_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n",
"plt.legend([l_sim[0], l_fit[0]], ['data', 'fit'], ncol=2, loc=(0.015, 0.865), frameon=False)\n",
"plt.legend([l_sim[0], l_fit[0]], ['data', 'fit'], ncol=2, loc=(0.015, 0.865), frameon=False)\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity
(
a.u
)
', [0,np.max(PGL_fit[:, 0])], [0, 0.
7
], [2.3,2])\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity
[
a.u
.]
', [0,np.max(PGL_fit[:, 0])], [0, 0.
65
], [2.3,2])\n",
"save_nice_fig(fol+'Fig1/PGL_spat_recov.pdf')"
"save_nice_fig(fol+'Fig1/PGL_spat_recov.pdf')"
]
]
},
},
...
@@ -546,7 +546,7 @@
...
@@ -546,7 +546,7 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"l_sim = plt.plot(PGL[:, 0], PGL[:, 4], '-', c=red)\n",
"l_sim = plt.plot(PGL[:, 0], PGL[:, 4
*80
], '-', c=red)\n",
"nice_fig('', '', [0,np.max(PGL_fit[:, 0])], [0, 0.55], [0.7,0.7], fs=5)\n",
"nice_fig('', '', [0,np.max(PGL_fit[:, 0])], [0, 0.55], [0.7,0.7], fs=5)\n",
"plt.yticks([0, 0.5], ['', ''])\n",
"plt.yticks([0, 0.5], ['', ''])\n",
"plt.xticks([0, 3], ['', ''])\n",
"plt.xticks([0, 3], ['', ''])\n",
...
@@ -560,7 +560,7 @@
...
@@ -560,7 +560,7 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"l_sim = plt.plot(PGL[:, 0], PGL[:, 7], '-', c=red)\n",
"l_sim = plt.plot(PGL[:, 0], PGL[:, 7
*80
], '-', c=red)\n",
"nice_fig('', '', [0,np.max(PGL_fit[:, 0])], [0, 0.55], [0.7,0.7], fs=5)\n",
"nice_fig('', '', [0,np.max(PGL_fit[:, 0])], [0, 0.55], [0.7,0.7], fs=5)\n",
"plt.yticks([0, 0.5], ['', ''])\n",
"plt.yticks([0, 0.5], ['', ''])\n",
"plt.xticks([0, 3], ['', ''])\n",
"plt.xticks([0, 3], ['', ''])\n",
...
@@ -568,6 +568,51 @@
...
@@ -568,6 +568,51 @@
"save_nice_fig(fol+'Fig1/PGL_spat_510.pdf')"
"save_nice_fig(fol+'Fig1/PGL_spat_510.pdf')"
]
]
},
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Supplement: movie PLYS**"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"PLYS = np.loadtxt(fol+'/Fig1/PLYS_timecourse_D.csv', delimiter=',')\n",
"PLYS_fit = np.loadtxt(fol+'/Fig1/PLYS_fit_timecourse_D.csv', delimiter=',')\n",
"CMD = np.loadtxt(fol+'/Fig1/CMD_timecourse_D.csv', delimiter=',')\n",
"CMD_fit = np.loadtxt(fol+'/Fig1/CMD_fit_timecourse_D.csv', delimiter=',')\n",
"PGL = np.loadtxt(fol+'/Fig1/PGL_timecourse_D.csv', delimiter=',')\n",
"PGL_fit = np.loadtxt(fol+'/Fig1/PGL_fit_timecourse_D.csv', delimiter=',')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"zipped = zip([PLYS, CMD, PGL], [PLYS_fit, CMD_fit, PGL_fit],\n",
" [blue, green, red], ['PLYS/ATP', 'CMD/PLYS', 'PGL-3'],\n",
" [0.9, 0.7, 0.8])\n",
"for mov, mov_fit, c, l, yl in zipped:\n",
" for i in range(np.shape(mov)[1]-1):\n",
" l_sim = plt.plot(mov[:, 0], mov[:, 1+i], '-', c=c)\n",
" l_fit = plt.plot(mov_fit[:, 0], mov_fit[:, 1+i], '-', lw=1, c='k')\n",
" plt.plot(range(0, 10), np.ones(10)*np.min(mov_fit[:, 1]), linestyle='--', color=grey, lw=1.5)\n",
" plt.legend([l_sim[0], l_fit[0]], [l, 'Fit to Eq. (1)'], ncol=2, loc=(0, 0.85), frameon=False,\n",
" columnspacing=0.8, handletextpad=0.5, handlelength=0.65)\n",
" nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u.]', [0,np.max(mov_fit[:, 0])], [0, yl], [2.3,2])\n",
" plt.yticks([0.2, 0.4, 0.6])\n",
" if l=='PLYS/ATP':\n",
" plt.yticks([0.2, 0.4, 0.6, 0.8])\n",
" save_nice_fig(fol+'Fig4/Movies/'+l[:3]+'_spat_recov_mov_'+str(i)+'.png', form='png', dpi=149.5)\n",
" plt.show();"
]
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
...
@@ -587,7 +632,7 @@
...
@@ -587,7 +632,7 @@
"# fig, ax1 = plt.subplots()\n",
"# fig, ax1 = plt.subplots()\n",
"# ax2 = ax1.twiny()\n",
"# ax2 = ax1.twiny()\n",
"# plt.sca(ax1)\n",
"# plt.sca(ax1)\n",
"nice_fig('$t/T_\\mathrm{max}$', 'intensity
(
a.u
)
', [0,200], [0,0.62], [2.3,2])\n",
"nice_fig('$t/T_\\mathrm{max}$', 'intensity
[
a.u
.]
', [0,200], [0,0.62], [2.3,2])\n",
"# plt.sca(ax2)\n",
"# plt.sca(ax2)\n",
"# ax2.tick_params(axis=\"x\",direction=\"in\")\n",
"# ax2.tick_params(axis=\"x\",direction=\"in\")\n",
"plt.plot(PGL[::10, 0]/np.max(PGL[1:-1:2, 0]), PGL[::10,1], '.', label='PGL-3', c='#CC406E', markersize=3, alpha=0.7, lw=2)\n",
"plt.plot(PGL[::10, 0]/np.max(PGL[1:-1:2, 0]), PGL[::10,1], '.', label='PGL-3', c='#CC406E', markersize=3, alpha=0.7, lw=2)\n",
...
@@ -619,7 +664,7 @@
...
@@ -619,7 +664,7 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"nice_fig('time $t$ [s]', 'intensity
(a.u)
', [0,140], [0,0.82], [1,2])\n",
"nice_fig('time $t$ [s]', '
boundary
intensity', [0,140], [0,0.82], [1,2])\n",
"temp = sns.color_palette()\n",
"temp = sns.color_palette()\n",
"sns.set_palette(sns.color_palette(\"rocket\", 9))\n",
"sns.set_palette(sns.color_palette(\"rocket\", 9))\n",
"# plt.sca(ax2)\n",
"# plt.sca(ax2)\n",
...
@@ -642,7 +687,7 @@
...
@@ -642,7 +687,7 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"nice_fig('time $t$ [s]', 'intensity
(
a.u
)
', [0,10], [0,0.72], [1,2])\n",
"nice_fig('time $t$ [s]', 'intensity
[
a.u
.]
', [0,10], [0,0.72], [1,2])\n",
"plt.plot(ATP[::1, 0], ATP[::1,1], '-', label='PLYS/ATP', c=blue, markersize=3, alpha=0.7, lw=1.5)\n",
"plt.plot(ATP[::1, 0], ATP[::1,1], '-', label='PLYS/ATP', c=blue, markersize=3, alpha=0.7, lw=1.5)\n",
"plt.plot(CMD[::5, 0], CMD[::5,1], '-', label='CMD/PLYS', c=green, markersize=3, alpha=0.7, lw=1.5)\n",
"plt.plot(CMD[::5, 0], CMD[::5,1], '-', label='CMD/PLYS', c=green, markersize=3, alpha=0.7, lw=1.5)\n",
"plt.legend(frameon=False, fontsize=7, loc=(0.1, 0), handletextpad=0.5)\n",
"plt.legend(frameon=False, fontsize=7, loc=(0.1, 0), handletextpad=0.5)\n",
...
@@ -773,12 +818,15 @@
...
@@ -773,12 +818,15 @@
"source": [
"source": [
"CMD = np.loadtxt(fol+'Fig4/CMD_timecourse.csv', delimiter=',')\n",
"CMD = np.loadtxt(fol+'Fig4/CMD_timecourse.csv', delimiter=',')\n",
"CMD_fit = np.loadtxt(fol+'Fig4/CMD_fit_timecourse.csv', delimiter=',')\n",
"CMD_fit = np.loadtxt(fol+'Fig4/CMD_fit_timecourse.csv', delimiter=',')\n",
"l_data = plt.plot(CMD[:, 0], CMD[:, 1:], c=green, lw=2,\n",
"CMD_t = np.loadtxt(fol+'Fig4/CMD_fit_time.csv', delimiter=',')\n",
"l_data = plt.plot(CMD[:, 0], CMD[:, 1::30], c=green, lw=2,\n",
" label='Experiment')\n",
" label='Experiment')\n",
"l_fit = plt.plot(CMD_fit[:, 0], CMD_fit[:,
1:
], '-', lw=1,\n",
"l_fit = plt.plot(CMD_fit[:, 0], CMD_fit[:,
2::30
], '-', lw=1,\n",
" c=dark_grey, label='Simulation')\n",
" c=dark_grey, label='Simulation')\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u]',\n",
"l_fit = plt.plot(CMD_fit[:, 0], CMD_fit[:, 1], '-', lw=1,\n",
" [0, 2.4*np.max(CMD[:, 0])], [0,0.5], [2.3,2])\n",
" c=dark_grey) # Initial condition\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u.]',\n",
" [0, 2.4*np.max(CMD[:, 0])], [0,0.7], [2.3,2])\n",
"plt.legend([l_data[0], l_fit[0]], ['CMD/PLYS', 'Full model'], frameon=False,\n",
"plt.legend([l_data[0], l_fit[0]], ['CMD/PLYS', 'Full model'], frameon=False,\n",
" fontsize=9, handletextpad=0.4, handlelength=0.8, loc=(0.52, 0.7))\n",
" fontsize=9, handletextpad=0.4, handlelength=0.8, loc=(0.52, 0.7))\n",
"save_nice_fig(fol+'Fig4/CMD_spat_recov_new.pdf')"
"save_nice_fig(fol+'Fig4/CMD_spat_recov_new.pdf')"
...
@@ -798,11 +846,11 @@
...
@@ -798,11 +846,11 @@
" c=dark_grey, label='Simulation') # time course\n",
" c=dark_grey, label='Simulation') # time course\n",
"l_fit = plt.plot(PLYS_fit[:, 0], PLYS_fit[:, 1], '-', lw=1,\n",
"l_fit = plt.plot(PLYS_fit[:, 0], PLYS_fit[:, 1], '-', lw=1,\n",
" c=dark_grey) # Initial condition\n",
" c=dark_grey) # Initial condition\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u]',\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u
.
]',\n",
" [0, 2.4*np.max(PLYS[:, 0])], [0,0.75], [2.3,2])\n",
" [0, 2.4*np.max(PLYS[:, 0])], [0,0.75], [2.3,2])\n",
"plt.legend([l_data[0], l_fit[0]], ['
ATP/
PLYS', 'Full model'], frameon=False,\n",
"plt.legend([l_data[0], l_fit[0]], ['PLYS
/ATP
', 'Full model'], frameon=False,\n",
" fontsize=9, handletextpad=0.4, handlelength=0.8, loc=(0.52, 0.7))\n",
" fontsize=9, handletextpad=0.4, handlelength=0.8, loc=(0.52, 0.7))\n",
"
#
save_nice_fig(fol+'Fig4/PLYS_spat_recov_new.pdf')"
"save_nice_fig(fol+'Fig4/PLYS_spat_recov_new.pdf')"
]
]
},
},
{
{
...
@@ -811,18 +859,20 @@
...
@@ -811,18 +859,20 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"for i in range(np.shape(PLYS)[1]):\n",
"PGL = np.loadtxt(fol+'Fig4/PGL_timecourse.csv', delimiter=',')\n",
" l_data = plt.plot(PLYS[:, 0], PLYS[:, 1+i], c=blue, lw=2)\n",
"PGL_fit = np.loadtxt(fol+'Fig4/PGL_fit_timecourse.csv', delimiter=',')\n",
" l_fit = plt.plot(PLYS_fit[:, 0], PLYS_fit[:, 2+i], '-', lw=1,\n",
"PGL_t = np.loadtxt(fol+'Fig4/PGL_fit_time.csv', delimiter=',')\n",
" c=dark_grey, label='Simulation') # time course\n",
"l_data = plt.plot(PGL[:, 0], PGL[:, 1::140], c=red, lw=2,\n",
" nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u]',\n",
" label='Experiment')\n",
" [0, 2.4*np.max(PLYS[:, 0])], [0,0.9], [2.3,2.005])\n",
"l_fit = plt.plot(PGL_fit[:, 0], PGL_fit[:, 2::140], '-', lw=1,\n",
" plt.legend([l_data[0], l_fit[0]], ['ATP/PLYS', 'Full model'], frameon=False,\n",
" c=dark_grey, label='Simulation')\n",
" fontsize=9, handletextpad=0.4, handlelength=0.8, loc=(0.52, 0.7))\n",
"plt.plot(PGL_fit[:, 0], PGL_fit[:, 1], '-', lw=1, c=dark_grey)\n",
" t = str(np.round(PLYS_t[i+1], 2))\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u.]',\n",
" plt.text(0.5, 0.785, t.ljust(4, '0') + ' s')\n",
" [0, 2.7*np.max(PGL[:, 0])], [0,0.7], [2.3,2])\n",
" save_nice_fig(fol+'Fig4/PLYSATP_mov/PLYS_spat_recov_mov_'+str(i)+'.png', form='png')\n",
"plt.legend([l_data[0], l_fit[0]], ['PGL-3', 'Full model'],\n",
" plt.show();"
" frameon=False, fontsize=9, handletextpad=0.4,\n",
" handlelength=0.8, loc=(0.54, 0.7))\n",
"save_nice_fig(fol+'Fig4/PGL_spat_recov.pdf')"
]
]
},
},
{
{
...
@@ -831,19 +881,26 @@
...
@@ -831,19 +881,26 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"PGL = np.loadtxt(fol+'Fig4/PGL_timecourse.csv', delimiter=',')\n",
"zipped = zip([PLYS, CMD, PGL], [PLYS_fit, CMD_fit, PGL_fit],\n",
"PGL_fit = np.loadtxt(fol+'Fig4/PGL_fit_timecourse.csv', delimiter=',')\n",
" [PLYS_t, CMD_t, PGL_t], [blue, green, red],\n",
"l_data = plt.plot(PGL[:, 0], PGL[:, 1::4], c=red, lw=2,\n",
" ['PLYS/ATP', 'CMD/PLYS', 'PGL-3'], [0.9, 0.7, 0.8])\n",
" label='Experiment')\n",
"for (mov, mov_fit, mov_t, c, l, yl) in zipped:\n",
"l_fit = plt.plot(PGL_fit[:, 0], PGL_fit[:, 2::4], '-', lw=1,\n",
" for i in range(np.shape(mov)[1]-1):\n",
" c=dark_grey, label='Simulation')\n",
" l_data = plt.plot(mov[:, 0], mov[:, 1+i], c=c, lw=2)\n",
"plt.plot(PGL_fit[:, 0], PGL_fit[: 1], '-', lw=1, c=dark_grey)\n",
" l_fit = plt.plot(mov_fit[:, 0], mov_fit[:, 2+i], '-', lw=1,\n",
"nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity (a.u)',\n",
" c=dark_grey) # time course\n",
" [0, 2.5*np.max(PGL[:, 0])], [0,0.65], [2.3,2])\n",
" nice_fig('radial distance $r$ [$\\mathrm{\\mu m}$]', 'intensity [a.u]',\n",
"plt.legend([l_data[0], l_fit[0]], ['PGL', 'Full model'],\n",
" [0, 2.7*np.max(mov[:, 0])], [0, yl], [2.35,2.005])\n",
" frameon=False, fontsize=9, handletextpad=0.4,\n",
" plt.legend([l_data[0], l_fit[0]], [l, 'Fit to Eq. (6)'], frameon=False,\n",
" handlelength=0.8, loc=(0.54, 0.7))\n",
" fontsize=9, handletextpad=0.4, handlelength=0.8, loc=(0.48, 0.7))\n",
"save_nice_fig(fol+'Fig4/PGL_spat_recov.pdf')"
" t = str(np.round(mov_t[i+1], 2))\n",
" plt.text(0.5, yl-0.11/0.8*yl, t.ljust(4, '0') + ' s')\n",
" plt.yticks([0.2, 0.4, 0.6])\n",
" if l=='PLYS/ATP':\n",
" plt.yticks([0.2, 0.4, 0.6, 0.8])\n",
" save_nice_fig(fol+'Fig4/Movies/'+l[:3]+'_spat_recov_model_'+str(i)+'.png',\n",
" form='png', dpi=149)\n",
" plt.show();"
]
]
},
},
{
{
...
@@ -879,7 +936,7 @@
...
@@ -879,7 +936,7 @@
"ax1.set_xscale('log')\n",
"ax1.set_xscale('log')\n",
"nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mathrm{\\mu m^2s^{-1}}]$',\n",
"nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mathrm{\\mu m^2s^{-1}}]$',\n",
" [1,340], [0.08,450], [2.3,2])\n",
" [1,340], [0.08,450], [2.3,2])\n",
"plt.legend(['CMD/PLYS', '
ATP/
PLYS'], frameon=False, fontsize=9, loc=(0.44,0.05))\n",
"plt.legend(['CMD/PLYS', 'PLYS
/ATP
'], frameon=False, fontsize=9, loc=(0.44,0.05))\n",
"plt.text(1.1, 2, '$D_\\mathrm{in, P/A}$', color=blue)\n",
"plt.text(1.1, 2, '$D_\\mathrm{in, P/A}$', color=blue)\n",
"plt.text(1.1, 7, '$D_\\mathrm{in, C/P}$', color=green)\n",
"plt.text(1.1, 7, '$D_\\mathrm{in, C/P}$', color=green)\n",
"# plt.plot([1, 9], [1.7, 1.7], '--', color=blue)\n",
"# plt.plot([1, 9], [1.7, 1.7], '--', color=blue)\n",
...
@@ -932,7 +989,8 @@
...
@@ -932,7 +989,8 @@
" color=sns.color_palette()[4], ci=None)\n",
" color=sns.color_palette()[4], ci=None)\n",
"l100 = sns.lineplot(x=\"P\", y=\"D_out\", data=PGL_100,\n",
"l100 = sns.lineplot(x=\"P\", y=\"D_out\", data=PGL_100,\n",
" color=sns.color_palette()[5], ci=None)\n",
" color=sns.color_palette()[5], ci=None)\n",
"leg1 = plt.legend(['50 mM', '60 mM', '75 mM', '90 mM', '100 mM'],\n",
"ls = plt.gca().get_lines()\n",
"leg1 = plt.legend([ls[4], ls[3], ls[2], ls[1], ls[0]], ['100 mM', '90 mM', '75 mM', '60 mM', '50 mM'],\n",
" labelspacing=0.3, loc=(0.63, 0.0),\n",
" labelspacing=0.3, loc=(0.63, 0.0),\n",
" handletextpad=0.4, handlelength=0.5, frameon=0)\n",
" handletextpad=0.4, handlelength=0.5, frameon=0)\n",
"\n",
"\n",
...
@@ -952,14 +1010,10 @@
...
@@ -952,14 +1010,10 @@
" [1,20000], [0.0003,600], [2.3,2])\n",
" [1,20000], [0.0003,600], [2.3,2])\n",
"plt.xticks([1, 10, 100, 1000, 10000]);\n",
"plt.xticks([1, 10, 100, 1000, 10000]);\n",
"plt.legend(loc=1)\n",
"plt.legend(loc=1)\n",
"
plt.legend(['50 mM', '60 mM', '75 mM', '90 mM', '100 mM',
\n",
"
ls = plt.gca().get_lines()
\n",
"
'1
2
0 mM', '150 mM', '1
8
0 mM'], labelspacing=0.3,\n",
"
plt.legend([ls[7], ls[6],ls[5]], [
'1
8
0 mM', '150 mM', '1
2
0 mM'], labelspacing=0.3,\n",
" loc=(0, 0.66), handletextpad=0.4, handlelength=0.5, frameon=0)\n",
" loc=(0, 0.66), handletextpad=0.4, handlelength=0.5, frameon=0)\n",
"plt.gca().add_artist(leg1)\n",
"plt.gca().add_artist(leg1)\n",
"# plt.plot([700, 10000], [30, 30], color=(1, 0, 0))\n",
"# plt.plot([700, 10000], [70, 70], color=(1, 0, 0))\n",
"# plt.plot([700, 700], [30, 70], color=(1, 0, 0))\n",
"# plt.plot([10000, 10000], [30, 70], color=(1, 0, 0))\n",
"save_nice_fig(fol+'Fig4/PGL-3.pdf')\n",
"save_nice_fig(fol+'Fig4/PGL-3.pdf')\n",
"sns.set_palette(temp)"
"sns.set_palette(temp)"
]
]
...
@@ -999,7 +1053,7 @@
...
@@ -999,7 +1053,7 @@
"salts = [50, 60, 75, 90, 100, 120, 150, 180]\n",
"salts = [50, 60, 75, 90, 100, 120, 150, 180]\n",
"nice_fig('$c_\\mathrm{salt} \\; [\\mathrm{mM}]$', 'Partition coefficient $P$',\n",
"nice_fig('$c_\\mathrm{salt} \\; [\\mathrm{mM}]$', 'Partition coefficient $P$',\n",
" [50, 180], [12,20000], [2.3,2])\n",
" [50, 180], [12,20000], [2.3,2])\n",
"plt.plot(salts, Ps_
1
, color=red, label='$D_{\\mathrm{out}}=
1
$')\n",
"plt.plot(salts, Ps_
2
, color=red, label='$D_{\\mathrm{out}}=
2
$')\n",
"plt.plot(salts, Ps_10, color=green, label='$D_{\\mathrm{out}}=10$')\n",
"plt.plot(salts, Ps_10, color=green, label='$D_{\\mathrm{out}}=10$')\n",
"plt.plot(salts, Ps_50, color=blue, label='$D_{\\mathrm{out}}=50$')\n",
"plt.plot(salts, Ps_50, color=blue, label='$D_{\\mathrm{out}}=50$')\n",
"# plt.plot(salt_anatol, P_anatol)\n",
"# plt.plot(salt_anatol, P_anatol)\n",
...
@@ -1045,15 +1099,22 @@
...
@@ -1045,15 +1099,22 @@
"nice_fig('Partition coefficient $P$', '$D_\\mathrm{out}$ [$\\mathrm{\\mu m^2/s}$]', [0.9,320], [0.000001,340], [2.3,2])\n",
"nice_fig('Partition coefficient $P$', '$D_\\mathrm{out}$ [$\\mathrm{\\mu m^2/s}$]', [0.9,320], [0.000001,340], [2.3,2])\n",
"lines = plt.loglog(P_Do[0, :], P_Do[1:, :].transpose())\n",
"lines = plt.loglog(P_Do[0, :], P_Do[1:, :].transpose())\n",
"plt.plot(P_Do[0, :], P_Do[0, :], '--', c='grey')\n",
"plt.plot(P_Do[0, :], P_Do[0, :], '--', c='grey')\n",
"plt.legend([lines[2], lines[0], lines[3], lines[1]],\n",
"# plt.legend([lines[2], lines[0], lines[3], lines[1]],\n",
"# ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,\n",
"# title=r'$D_\\mathrm{out}$/P [$\\mathrm{\\mu m^2/s}$]:', columnspacing=0.5, labelspacing=0.3,\n",
"# loc=(0.4, 0), handletextpad=0.4, handlelength=0.5)\n",
"plt.gca().set_prop_cycle(None)\n",
"lines[0] = plt.plot(P[0], D_o[0], 'o', mfc='none', markersize=8)\n",
"lines[1] = plt.plot(P[1], D_o[1], 'o', mfc='none', markersize=8)\n",
"lines[2] = plt.plot(P[2], D_o[2], 'o', mfc='none', markersize=8)\n",
"lines[3] = plt.plot(P[3], D_o[3], 'o', mfc='none', markersize=8)\n",
"def circle(i):\n",
" return plt.Line2D(range(1), range(1), color=sns.color_palette()[i],\n",
" marker='o', markersize=5, markerfacecolor=\"white\")\n",
"plt.legend([circle(2), circle(0), circle(3), circle(1)],\n",
" ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,\n",
" ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,\n",
" title=r'$D_\\mathrm{out}$/P [$\\mathrm{\\mu m^2/s}$]:', columnspacing=0.5, labelspacing=0.3,\n",
" title=r'$D_\\mathrm{out}$/P [$\\mathrm{\\mu m^2/s}$]:', columnspacing=0.5, labelspacing=0.3,\n",
" loc=(0.4, 0), handletextpad=0.4, handlelength=0.5)\n",
" loc=(0.4, 0), handletextpad=0.4, handlelength=0.5)\n",
"plt.gca().set_prop_cycle(None)\n",
"plt.plot(P[0], D_o[0], 'd')\n",
"plt.plot(P[1], D_o[1], 'd')\n",
"plt.plot(P[2], D_o[2], 'd')\n",
"plt.plot(P[3], D_o[3], 'd')\n",
"plt.annotate('$D_{out}$/P = 1 $\\mathrm{\\mu m^2/s}$', [1,40], c='grey')\n",
"plt.annotate('$D_{out}$/P = 1 $\\mathrm{\\mu m^2/s}$', [1,40], c='grey')\n",
"plt.xticks([1, 10, 100]);\n",
"plt.xticks([1, 10, 100]);\n",
"save_nice_fig(fol+'Fig4/D_vs_P.pdf')"
"save_nice_fig(fol+'Fig4/D_vs_P.pdf')"
...
@@ -1080,7 +1141,7 @@
...
@@ -1080,7 +1141,7 @@
"# title=r'$D_\\mathrm{out}$/P set to:', columnspacing=0.5, labelspacing=0.3,\n",
"# title=r'$D_\\mathrm{out}$/P set to:', columnspacing=0.5, labelspacing=0.3,\n",
"# loc=(0.081, 0), handletextpad=0.4, handlelength=0.5)\n",
"# loc=(0.081, 0), handletextpad=0.4, handlelength=0.5)\n",
"plt.xticks([1, 10, 100]);\n",
"plt.xticks([1, 10, 100]);\n",
"save_nice_fig(fol+'Fig4/D_vs_Cost.pdf')"
"
#
save_nice_fig(fol+'Fig4/D_vs_Cost.pdf')"
]
]
},
},
{
{
...
@@ -1094,7 +1155,7 @@
...
@@ -1094,7 +1155,7 @@
"lines = plt.plot(P_Cost[0], P_Cost[1:].transpose()/[x[0] for x in P_Cost[1:]])\n",
"lines = plt.plot(P_Cost[0], P_Cost[1:].transpose()/[x[0] for x in P_Cost[1:]])\n",
"plt.gca().set_xscale('log')\n",
"plt.gca().set_xscale('log')\n",
"plt.plot([150, 150], [0, 1], '--', lw=2, c=grey)\n",
"plt.plot([150, 150], [0, 1], '--', lw=2, c=grey)\n",
"save_nice_fig(fol+'Fig4/D_vs_Cost_single.pdf')"
"
#
save_nice_fig(fol+'Fig4/D_vs_Cost_single.pdf')"
]
]
},
},
{
{
...
@@ -1114,8 +1175,8 @@
...
@@ -1114,8 +1175,8 @@
"levels = MaxNLocator(nbins=100).tick_values(np.log10(con[:, 2:].min()), np.log10(con[:, 2:].max()))\n",
"levels = MaxNLocator(nbins=100).tick_values(np.log10(con[:, 2:].min()), np.log10(con[:, 2:].max()))\n",
"nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mathrm{\\mu m^2 s^{-1}}]$', [1, 3], [-2,1], [2.3,2])\n",
"nice_fig('Partition coefficient $P$', '$D_\\mathrm{out} \\;[\\mathrm{\\mu m^2 s^{-1}}]$', [1, 3], [-2,1], [2.3,2])\n",
"CS = plt.contourf(np.log10(con[:, 0]), np.log10(con[:, 1]), np.log10(con[:, 2:]), levels=levels, cmap=cm.coolwarm)\n",
"CS = plt.contourf(np.log10(con[:, 0]), np.log10(con[:, 1]), np.log10(con[:, 2:]), levels=levels, cmap=cm.coolwarm)\n",
"plt.plot(np.log10(150), np.log10(10**-1), '
d
', c=sns.color_palette()[1], label='
Initial Simul.
', markersize=
6
)\n",
"plt.plot(np.log10(150), np.log10(10**-1), '
o
', c=sns.color_palette()[1], label='
Reference Simulation', mfc='none
', markersize=
8
)\n",
"le = plt.legend(loc=(0, 0.83), frameon=False, handletextpad=0.
4
)\n",
"le = plt.legend(loc=(0, 0.83), frameon=False, handletextpad=0.
2
)\n",
"# plt.plot(np.log10(P_Do[0, :]), np.log10(P_Do[2, :].transpose()), '--', c=green, lw = 1)\n",
"# plt.plot(np.log10(P_Do[0, :]), np.log10(P_Do[2, :].transpose()), '--', c=green, lw = 1)\n",
"le.get_texts()[0].set_color('white')\n",
"le.get_texts()[0].set_color('white')\n",
"plt.xticks([1, 2, 3], ['$10^1$', '$10^2$', '$10^3$'])\n",
"plt.xticks([1, 2, 3], ['$10^1$', '$10^2$', '$10^3$'])\n",
...
...
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
from
fem_sol
import
frap_solver
from
fem_sol
import
frap_solver
from
matplotlib
import
cm
,
rc
,
rcParams
from
matplotlib
import
cm
,
rc
,
rcParams
from
matplotlib.ticker
import
MaxNLocator
from
matplotlib.ticker
import
MaxNLocator
import
fem_utils
import
fem_utils
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
import
seaborn
as
sns
import
seaborn
as
sns
from
scipy.interpolate
import
interp1d
from
scipy.interpolate
import
interp1d
fol
=
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/
'
fol
=
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/
'
# sns.set_style("ticks")
# sns.set_style("ticks")
rcParams
[
'
axes.linewidth
'
]
=
0.75
rcParams
[
'
axes.linewidth
'
]
=
0.75
rcParams
[
'
xtick.major.width
'
]
=
0.75
rcParams
[
'
xtick.major.width
'
]
=
0.75
rcParams
[
'
ytick.major.width
'
]
=
0.75
rcParams
[
'
ytick.major.width
'
]
=
0.75
# rcParams['text.usetex']=True
# rcParams['text.usetex']=True
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# Define colors
# Define colors
pa
=
sns
.
color_palette
(
"
Set2
"
)
pa
=
sns
.
color_palette
(
"
Set2
"
)
sns
.
set_palette
(
pa
)
sns
.
set_palette
(
pa
)
grey
=
(
0.6
,
0.6
,
0.6
)
grey
=
(
0.6
,
0.6
,
0.6
)
dark_grey
=
(
0.2
,
0.2
,
0.2
)
dark_grey
=
(
0.2
,
0.2
,
0.2
)
green
=
pa
[
0
]
green
=
pa
[
0
]
blue
=
pa
[
2
]
blue
=
pa
[
2
]
red
=
pa
[
1
]
red
=
pa
[
1
]
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
import
pylab
as
pl
import
pylab
as
pl
params
=
{
'
legend.fontsize
'
:
9
,
params
=
{
'
legend.fontsize
'
:
9
,
'
legend.handlelength
'
:
1
}
'
legend.handlelength
'
:
1
}
pl
.
rcParams
.
update
(
params
)
pl
.
rcParams
.
update
(
params
)
def
nice_fig
(
xla
,
yla
,
xli
,
yli
,
size
,
fs
=
12
):
def
nice_fig
(
xla
,
yla
,
xli
,
yli
,
size
,
fs
=
12
):
rc
(
'
font
'
,
**
{
'
family
'
:
'
sans-serif
'
,
'
sans-serif
'
:[
'
Helvetica
'
]})
rc
(
'
font
'
,
**
{
'
family
'
:
'
sans-serif
'
,
'
sans-serif
'
:[
'
Helvetica
'
]})
# rc('font',**{'family':'serif','serif':['Palatino']})
# rc('font',**{'family':'serif','serif':['Palatino']})
plt
.
gcf
().
set_size_inches
(
size
[
0
],
size
[
1
])
plt
.
gcf
().
set_size_inches
(
size
[
0
],
size
[
1
])
plt
.
xlabel
(
xla
,
fontsize
=
fs
)
plt
.
xlabel
(
xla
,
fontsize
=
fs
)
plt
.
ylabel
(
yla
,
fontsize
=
fs
)
plt
.
ylabel
(
yla
,
fontsize
=
fs
)
plt
.
xlim
(
xli
)
plt
.
xlim
(
xli
)
plt
.
ylim
(
yli
)
plt
.
ylim
(
yli
)
plt
.
tick_params
(
axis
=
'
both
'
,
which
=
'
major
'
,
labelsize
=
fs
)
plt
.
tick_params
(
axis
=
'
both
'
,
which
=
'
major
'
,
labelsize
=
fs
)
def
save_nice_fig
(
name
,
form
=
'
pdf
'
):
def
save_nice_fig
(
name
,
form
=
'
pdf
'
,
dpi
=
300
):
plt
.
savefig
(
name
,
format
=
form
,
dpi
=
300
,
bbox_inches
=
'
tight
'
,
plt
.
savefig
(
name
,
format
=
form
,
dpi
=
dpi
,
bbox_inches
=
'
tight
'
,
transparent
=
True
)
transparent
=
True
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### FRAP geometries
### FRAP geometries
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# For radial average: define angles and radial spacing
# For radial average: define angles and radial spacing
alphas
=
np
.
linspace
(
0
,
2
*
np
.
pi
,
20
)
alphas
=
np
.
linspace
(
0
,
2
*
np
.
pi
,
20
)
ns
=
np
.
c_
[
np
.
cos
(
alphas
),
np
.
sin
(
alphas
),
np
.
zeros
(
len
(
alphas
))]
ns
=
np
.
c_
[
np
.
cos
(
alphas
),
np
.
sin
(
alphas
),
np
.
zeros
(
len
(
alphas
))]
eps
=
np
.
linspace
(
0
,
0.23
,
100
)
eps
=
np
.
linspace
(
0
,
0.23
,
100
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
#### Multi Drop
#### Multi Drop
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
me
=
[
'
Meshes/multi_drop_gauss.xml
'
,
'
Meshes/multi_drop_gauss_med.xml
'
,
me
=
[
'
Meshes/multi_drop_gauss.xml
'
,
'
Meshes/multi_drop_gauss_med.xml
'
,
'
Meshes/multi_drop_gauss_far.xml
'
,
'
Meshes/multi_drop_gauss.xml
'
,
'
Meshes/multi_drop_gauss_far.xml
'
,
'
Meshes/multi_drop_gauss.xml
'
,
'
Meshes/multi_drop_gauss_med.xml
'
,
'
Meshes/multi_drop_gauss_far.xml
'
]
'
Meshes/multi_drop_gauss_med.xml
'
,
'
Meshes/multi_drop_gauss_far.xml
'
]
point_lists
=
[[[
4
,
4.5
,
0.25
],
[
4
,
3.5
,
0.25
],
[
3.5
,
4
,
0.25
],
[
4.5
,
4
,
0.25
]],
point_lists
=
[[[
4
,
4.5
,
0.25
],
[
4
,
3.5
,
0.25
],
[
3.5
,
4
,
0.25
],
[
4.5
,
4
,
0.25
]],
[[
4
,
5
,
0.25
],
[
4
,
3
,
0.25
],
[
3
,
4
,
0.25
],
[
5
,
4
,
0.25
]],
[[
4
,
5
,
0.25
],
[
4
,
3
,
0.25
],
[
3
,
4
,
0.25
],
[
5
,
4
,
0.25
]],
[[
4
,
5.5
,
0.25
],
[
4
,
2.5
,
0.25
],
[
2.5
,
4
,
0.25
],
[
5.5
,
4
,
0.25
]],
[[
4
,
5.5
,
0.25
],
[
4
,
2.5
,
0.25
],
[
2.5
,
4
,
0.25
],
[
5.5
,
4
,
0.25
]],
[[
4
,
4.5
,
0.25
],
[
4
,
3.5
,
0.25
],
[
3.5
,
4
,
0.25
],
[
4.5
,
4
,
0.25
]],
[[
4
,
4.5
,
0.25
],
[
4
,
3.5
,
0.25
],
[
3.5
,
4
,
0.25
],
[
4.5
,
4
,
0.25
]],
[[
4
,
5
,
0.25
],
[
4
,
3
,
0.25
],
[
3
,
4
,
0.25
],
[
5
,
4
,
0.25
]],
[[
4
,
5
,
0.25
],
[
4
,
3
,
0.25
],
[
3
,
4
,
0.25
],
[
5
,
4
,
0.25
]],
[[
4
,
5.5
,
0.25
],
[
4
,
2.5
,
0.25
],
[
2.5
,
4
,
0.25
],
[
5.5
,
4
,
0.25
]]]
[[
4
,
5.5
,
0.25
],
[
4
,
2.5
,
0.25
],
[
2.5
,
4
,
0.25
],
[
5.5
,
4
,
0.25
]]]
phi_tot_int
=
[.
99
,
.
99
,
.
99
,
.
9
,
.
9
,
.
9
]
phi_tot_int
=
[.
99
,
.
99
,
.
99
,
.
9
,
.
9
,
.
9
]
phi_tot_ext
=
[.
01
,
.
01
,
.
01
,
.
1
,
.
1
,
.
1
]
phi_tot_ext
=
[.
01
,
.
01
,
.
01
,
.
1
,
.
1
,
.
1
]
G_in
=
[
1
,
1
,
1
,
.
1
,
.
1
,
.
1
]
G_in
=
[
1
,
1
,
1
,
.
1
,
.
1
,
.
1
]
G_out
=
[
1
,
1
,
1
,
0.99
/
0.9
,
0.99
/
0.9
,
0.99
/
0.9
]
G_out
=
[
1
,
1
,
1
,
0.99
/
0.9
,
0.99
/
0.9
,
0.99
/
0.9
]
f_i
=
[]
f_i
=
[]
for
p
,
m
,
p_i
,
p_e
,
G_i
,
G_o
in
zip
(
point_lists
,
me
,
phi_tot_int
,
for
p
,
m
,
p_i
,
p_e
,
G_i
,
G_o
in
zip
(
point_lists
,
me
,
phi_tot_int
,
phi_tot_ext
,
G_in
,
G_out
):
phi_tot_ext
,
G_in
,
G_out
):
f
=
frap_solver
([
4
,
4
,
0.25
],
m
,
name
=
'
FRAP_multi/FRAP_multi_
'
+
m
[:
-
4
]
+
str
(
G_i
),
point_list
=
p
,
f
=
frap_solver
([
4
,
4
,
0.25
],
m
,
name
=
'
FRAP_multi/FRAP_multi_
'
+
m
[:
-
4
]
+
str
(
G_i
),
point_list
=
p
,
T
=
240
,
dt
=
0.02
,
phi_tot_int
=
p_i
,
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
G_out
=
G_o
)
T
=
240
,
dt
=
0.02
,
phi_tot_int
=
p_i
,
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
G_out
=
G_o
)
# f.solve_frap()
# f.solve_frap()
f_i
.
append
(
f
)
f_i
.
append
(
f
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
profs
=
[]
profs
=
[]
for
i
in
range
(
len
(
f_i
)):
for
i
in
range
(
len
(
f_i
)):
# if i>2:
# if i>2:
profs
.
append
([])
profs
.
append
([])
for
j
in
range
(
240
):
for
j
in
range
(
240
):
values
=
[]
values
=
[]
fs
=
fem_utils
.
load_time_point
(
f_i
[
i
].
name
+
'
t_p_
'
+
str
(
j
)
+
'
.h5
'
,
fs
=
fem_utils
.
load_time_point
(
f_i
[
i
].
name
+
'
t_p_
'
+
str
(
j
)
+
'
.h5
'
,
f_i
[
i
].
mesh
)
f_i
[
i
].
mesh
)
print
(
'
Reading time point
'
+
str
(
j
)
+
'
of simulation
'
+
str
(
i
))
print
(
'
Reading time point
'
+
str
(
j
)
+
'
of simulation
'
+
str
(
i
))
for
n
in
ns
:
for
n
in
ns
:
values
.
append
([
fs
([
4
,
4
,
0.25
]
+
e
*
n
)
for
e
in
eps
])
values
.
append
([
fs
([
4
,
4
,
0.25
]
+
e
*
n
)
for
e
in
eps
])
profs
[
i
].
append
(
np
.
mean
(
np
.
transpose
(
values
),
1
))
profs
[
i
].
append
(
np
.
mean
(
np
.
transpose
(
values
),
1
))
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# Write out profiles to .csv
# Write out profiles to .csv
for
i
in
[
0
,
1
,
2
,
3
,
4
,
5
]:
for
i
in
[
0
,
1
,
2
,
3
,
4
,
5
]:
dist
=
str
(
point_lists
[
i
][
0
][
1
]
-
4
)
dist
=
str
(
point_lists
[
i
][
0
][
1
]
-
4
)
P
=
str
(
f_i
[
i
].
phi_tot_int
/
f_i
[
i
].
phi_tot_ext
)
P
=
str
(
f_i
[
i
].
phi_tot_int
/
f_i
[
i
].
phi_tot_ext
)
np
.
savetxt
(
'
eps_multi_
'
+
str
(
i
)
+
'
.csv
'
,
eps
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
eps_multi_
'
+
str
(
i
)
+
'
.csv
'
,
eps
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
t_p_multi_
'
+
P
+
'
_
'
+
dist
+
'
.csv
'
,
np
.
savetxt
(
'
t_p_multi_
'
+
P
+
'
_
'
+
dist
+
'
.csv
'
,
profs
[
i
][
1
:],
delimiter
=
'
,
'
)
profs
[
i
][
1
:],
delimiter
=
'
,
'
)
meta_data
=
np
.
r_
[
f_i
[
i
].
dt
,
f_i
[
i
].
T
-
1
,
eps
,
0.25
]
# last param: droplet radius
meta_data
=
np
.
r_
[
f_i
[
i
].
dt
,
f_i
[
i
].
T
-
1
,
eps
,
0.25
]
# last param: droplet radius
np
.
savetxt
(
'
meta_data_multi_
'
+
P
+
'
_
'
+
dist
+
'
.csv
'
,
meta_data
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
meta_data_multi_
'
+
P
+
'
_
'
+
dist
+
'
.csv
'
,
meta_data
,
delimiter
=
'
,
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
ft
=
f_i
[
1
]
ft
=
f_i
[
1
]
meta_data
=
np
.
r_
[
ft
.
dt
,
ft
.
T
,
eps
]
meta_data
=
np
.
r_
[
ft
.
dt
,
ft
.
T
,
eps
]
np
.
savetxt
(
'
meta_data.csv
'
,
meta_data
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
meta_data.csv
'
,
meta_data
,
delimiter
=
'
,
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
plt
.
plot
(
eps
,
np
.
transpose
(
profs
)[:,:])
plt
.
plot
(
eps
,
np
.
transpose
(
profs
)[:,:])
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
time $t$ [s]
'
,
'
intensity
(
a.u
)
'
,
[
0
,
4
],
[
0
,
1.05
],
[
1.5
,
2
])
nice_fig
(
'
time $t$ [s]
'
,
'
intensity
[
a.u
.]
'
,
[
0
,
4
],
[
0
,
1.05
],
[
1.5
,
2
])
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
0
].
T
-
1
)
*
f_i
[
0
].
dt
,
f_i
[
0
].
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
0
].
T
-
1
)
*
f_i
[
0
].
dt
,
f_i
[
0
].
T
),
[
np
.
mean
(
x
)
/
f_i
[
0
].
phi_tot_int
for
x
in
profs
[
0
]],
[
np
.
mean
(
x
)
/
f_i
[
0
].
phi_tot_int
for
x
in
profs
[
0
]],
lw
=
2
,
label
=
'
d=0.5
'
,
ls
=
'
-
'
)
lw
=
2
,
label
=
'
d=0.5
'
,
ls
=
'
-
'
)
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
1
].
T
-
1
)
*
f_i
[
1
].
dt
,
f_i
[
1
].
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
1
].
T
-
1
)
*
f_i
[
1
].
dt
,
f_i
[
1
].
T
),
[
np
.
mean
(
x
)
/
f_i
[
1
].
phi_tot_int
for
x
in
profs
[
1
]],
[
np
.
mean
(
x
)
/
f_i
[
1
].
phi_tot_int
for
x
in
profs
[
1
]],
lw
=
2
,
label
=
'
d=1
'
,
ls
=
'
--
'
)
lw
=
2
,
label
=
'
d=1
'
,
ls
=
'
--
'
)
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
2
].
T
-
1
)
*
f_i
[
2
].
dt
,
f_i
[
2
].
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
2
].
T
-
1
)
*
f_i
[
2
].
dt
,
f_i
[
2
].
T
),
[
np
.
mean
(
x
)
/
f_i
[
2
].
phi_tot_int
for
x
in
profs
[
2
]],
[
np
.
mean
(
x
)
/
f_i
[
2
].
phi_tot_int
for
x
in
profs
[
2
]],
lw
=
2
,
label
=
'
d=1.5
'
,
ls
=
'
:
'
)
lw
=
2
,
label
=
'
d=1.5
'
,
ls
=
'
:
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
title
(
'
$P=99}$
'
,
size
=
12
)
plt
.
title
(
'
$P=99}$
'
,
size
=
12
)
plt
.
gca
().
get_yaxis
().
set_visible
(
False
)
plt
.
gca
().
get_yaxis
().
set_visible
(
False
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_neighbours_bad.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_neighbours_bad.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
time $t$ [s]
'
,
r
'
av. volume fraction $\bar{\phi}_\mathrm{u}$
'
,
[
0
,
4.
],
[
0
,
1.05
],
[
1.5
,
2
])
nice_fig
(
'
time $t$ [s]
'
,
r
'
av. volume fraction $\bar{\phi}_\mathrm{u}$
'
,
[
0
,
4.
],
[
0
,
1.05
],
[
1.5
,
2
])
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
3
].
T
-
1
)
*
f_i
[
3
].
dt
,
f_i
[
3
].
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
3
].
T
-
1
)
*
f_i
[
3
].
dt
,
f_i
[
3
].
T
),
[
np
.
mean
(
x
)
/
f_i
[
3
].
phi_tot_int
for
x
in
profs
[
3
]],
[
np
.
mean
(
x
)
/
f_i
[
3
].
phi_tot_int
for
x
in
profs
[
3
]],
lw
=
2
,
label
=
'
$d=0.5 \,\mathrm{\mu m}$
'
,
ls
=
'
-
'
)
lw
=
2
,
label
=
'
$d=0.5 \,\mathrm{\mu m}$
'
,
ls
=
'
-
'
)
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
4
].
T
-
1
)
*
f_i
[
4
].
dt
,
f_i
[
4
].
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
4
].
T
-
1
)
*
f_i
[
4
].
dt
,
f_i
[
4
].
T
),
[
np
.
mean
(
x
)
/
f_i
[
4
].
phi_tot_int
for
x
in
profs
[
4
]],
[
np
.
mean
(
x
)
/
f_i
[
4
].
phi_tot_int
for
x
in
profs
[
4
]],
lw
=
2
,
label
=
'
$d=1 \,\mathrm{\mu m}$
'
,
ls
=
'
--
'
)
lw
=
2
,
label
=
'
$d=1 \,\mathrm{\mu m}$
'
,
ls
=
'
--
'
)
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
5
].
T
-
1
)
*
f_i
[
5
].
dt
,
f_i
[
5
].
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f_i
[
5
].
T
-
1
)
*
f_i
[
5
].
dt
,
f_i
[
5
].
T
),
[
np
.
mean
(
x
)
/
f_i
[
5
].
phi_tot_int
for
x
in
profs
[
5
]],
[
np
.
mean
(
x
)
/
f_i
[
5
].
phi_tot_int
for
x
in
profs
[
5
]],
lw
=
2
,
label
=
'
$d=1.5 \,\mathrm{\mu m}$
'
,
ls
=
'
:
'
)
lw
=
2
,
label
=
'
$d=1.5 \,\mathrm{\mu m}$
'
,
ls
=
'
:
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
title
(
'
$P=9$
'
,
size
=
12
)
plt
.
title
(
'
$P=9$
'
,
size
=
12
)
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
,
loc
=
(
0.2
,
0.025
),
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
,
loc
=
(
0.2
,
0.025
),
handletextpad
=
0.4
,
labelspacing
=
0.2
)
handletextpad
=
0.4
,
labelspacing
=
0.2
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_neighbours_good.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_neighbours_good.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
ml
=
np
.
loadtxt
(
'
/Users/hubatsch/Desktop/DropletFRAP/matlab_fit_multi.csv
'
,
ml
=
np
.
loadtxt
(
'
/Users/hubatsch/Desktop/DropletFRAP/matlab_fit_multi.csv
'
,
delimiter
=
'
,
'
)
delimiter
=
'
,
'
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
0.23
],
[
0
,
1.05
],
[
3.8
,
2
])
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
0.23
],
[
0
,
1.05
],
[
3.8
,
2
])
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs
[
0
])[:,
1
:
181
:
22
]
/
f_i
[
0
].
phi_tot_int
,
c
=
green
,
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs
[
0
])[:,
1
:
181
:
22
]
/
f_i
[
0
].
phi_tot_int
,
c
=
green
,
lw
=
4.5
,
alpha
=
0.7
)
lw
=
4.5
,
alpha
=
0.7
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
l_fit
=
plt
.
plot
(
np
.
linspace
(
0
,
0.23
,
100
),
np
.
transpose
(
ml
)[:,:
180
:
22
],
c
=
'
k
'
,
lw
=
1.5
)
l_fit
=
plt
.
plot
(
np
.
linspace
(
0
,
0.23
,
100
),
np
.
transpose
(
ml
)[:,:
180
:
22
],
c
=
'
k
'
,
lw
=
1.5
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Model, eq. (6)
'
,
'
Fit, eq. (1)
'
],
loc
=
(
0.1
,
0.77
),
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Model, eq. (6)
'
,
'
Fit, eq. (1)
'
],
loc
=
(
0.1
,
0.77
),
prop
=
{
'
size
'
:
9
},
frameon
=
False
,
labelspacing
=
0.1
,
handlelength
=
0.1
,
ncol
=
2
)
prop
=
{
'
size
'
:
9
},
frameon
=
False
,
labelspacing
=
0.1
,
handlelength
=
0.1
,
ncol
=
2
)
save_nice_fig
(
fol
+
'
Fig3/spat_recov_neighbours.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/spat_recov_neighbours.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
#### Coverslip
#### Coverslip
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# Define parameters for all simulations
# Define parameters for all simulations
point_list
=
[[
4
,
4
,
0.25
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
],
point_list
=
[[
4
,
4
,
0.25
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
],
[
4
,
4
,
0.25
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
]]
[
4
,
4
,
0.25
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
]]
me
=
[
'
coverslip.xml
'
,
'
1_5.xml
'
,
'
symmetric.xml
'
,
me
=
[
'
coverslip.xml
'
,
'
1_5.xml
'
,
'
symmetric.xml
'
,
'
coverslip.xml
'
,
'
1_5.xml
'
,
'
symmetric.xml
'
]
'
coverslip.xml
'
,
'
1_5.xml
'
,
'
symmetric.xml
'
]
phi_tot_int
=
[.
99
,
.
99
,
.
99
,
.
9
,
.
9
,
.
9
]
phi_tot_int
=
[.
99
,
.
99
,
.
99
,
.
9
,
.
9
,
.
9
]
phi_tot_ext
=
[.
01
,
.
01
,
.
01
,
.
1
,
.
1
,
.
1
]
phi_tot_ext
=
[.
01
,
.
01
,
.
01
,
.
1
,
.
1
,
.
1
]
G_in
=
[
1
,
1
,
1
,
.
1
,
.
1
,
.
1
]
G_in
=
[
1
,
1
,
1
,
.
1
,
.
1
,
.
1
]
G_out
=
[
1
,
1
,
1
,
0.99
/
0.9
,
0.99
/
0.9
,
0.99
/
0.9
]
G_out
=
[
1
,
1
,
1
,
0.99
/
0.9
,
0.99
/
0.9
,
0.99
/
0.9
]
f_cs
=
[]
f_cs
=
[]
# Zip all parameters, iterate
# Zip all parameters, iterate
for
p
,
m
,
p_i
,
p_e
,
G_i
,
G_o
,
i
in
zip
(
point_list
,
me
,
phi_tot_int
,
for
p
,
m
,
p_i
,
p_e
,
G_i
,
G_o
,
i
in
zip
(
point_list
,
me
,
phi_tot_int
,
phi_tot_ext
,
G_in
,
G_out
,
range
(
len
(
me
))):
phi_tot_ext
,
G_in
,
G_out
,
range
(
len
(
me
))):
if
i
in
[
0
,
1
,
2
,
3
,
4
,
5
]:
if
i
in
[
0
,
1
,
2
,
3
,
4
,
5
]:
f_cs
.
append
(
frap_solver
(
p
,
'
Meshes/single_drop_
'
+
m
,
f_cs
.
append
(
frap_solver
(
p
,
'
Meshes/single_drop_
'
+
m
,
name
=
'
FRAP_coverslip/FRAP_
'
+
m
[:
-
4
]
+
str
(
G_i
),
T
=
240
,
name
=
'
FRAP_coverslip/FRAP_
'
+
m
[:
-
4
]
+
str
(
G_i
),
T
=
240
,
phi_tot_int
=
p_i
,
dt
=
0.02
,
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
phi_tot_int
=
p_i
,
dt
=
0.02
,
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
G_out
=
G_o
))
G_out
=
G_o
))
# f_cs[-1].solve_frap()
# f_cs[-1].solve_frap()
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
z
=
[
0.25
,
1.5
,
4
,
0.25
,
1.5
,
4
]
z
=
[
0.25
,
1.5
,
4
,
0.25
,
1.5
,
4
]
# eps = np.linspace(0, 3.5, 100) # for full profile
# eps = np.linspace(0, 3.5, 100) # for full profile
# eps = np.r_[np.linspace(0, 0.4, 100), np.linspace(0.41, 2, 20)]
# eps = np.r_[np.linspace(0, 0.4, 100), np.linspace(0.41, 2, 20)]
eps
=
np
.
linspace
(
0
,
0.23
,
100
)
eps
=
np
.
linspace
(
0
,
0.23
,
100
)
profs_cs
=
[]
profs_cs
=
[]
for
i
,
z_i
in
enumerate
(
z
):
for
i
,
z_i
in
enumerate
(
z
):
profs_cs
.
append
([])
profs_cs
.
append
([])
for
j
in
range
(
240
):
for
j
in
range
(
240
):
values
=
[]
values
=
[]
fs
=
fem_utils
.
load_time_point
(
f_cs
[
i
].
name
+
fs
=
fem_utils
.
load_time_point
(
f_cs
[
i
].
name
+
'
t_p_
'
+
str
(
j
)
+
'
.h5
'
,
f_cs
[
i
].
mesh
)
'
t_p_
'
+
str
(
j
)
+
'
.h5
'
,
f_cs
[
i
].
mesh
)
for
n
in
ns
:
for
n
in
ns
:
values
.
append
([
fs
([
4
,
4
,
z_i
]
+
e
*
n
)
for
e
in
eps
])
values
.
append
([
fs
([
4
,
4
,
z_i
]
+
e
*
n
)
for
e
in
eps
])
profs_cs
[
i
].
append
(
np
.
mean
(
np
.
transpose
(
values
),
1
))
profs_cs
[
i
].
append
(
np
.
mean
(
np
.
transpose
(
values
),
1
))
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# Write out profiles to .csv
# Write out profiles to .csv
for
i
in
[
0
,
1
,
2
,
3
,
4
,
5
]:
for
i
in
[
0
,
1
,
2
,
3
,
4
,
5
]:
z_str
=
str
(
f_cs
[
i
].
cent_poin
[
-
1
])
z_str
=
str
(
f_cs
[
i
].
cent_poin
[
-
1
])
P
=
str
(
f_cs
[
i
].
phi_tot_int
/
f_cs
[
i
].
phi_tot_ext
)
P
=
str
(
f_cs
[
i
].
phi_tot_int
/
f_cs
[
i
].
phi_tot_ext
)
np
.
savetxt
(
'
eps_
'
+
str
(
i
)
+
'
.csv
'
,
eps
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
eps_
'
+
str
(
i
)
+
'
.csv
'
,
eps
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
t_p_long_coverslip_
'
+
P
+
'
_
'
+
z_str
+
'
.csv
'
,
np
.
savetxt
(
'
t_p_long_coverslip_
'
+
P
+
'
_
'
+
z_str
+
'
.csv
'
,
profs_cs
[
i
][
1
:],
delimiter
=
'
,
'
)
profs_cs
[
i
][
1
:],
delimiter
=
'
,
'
)
meta_data
=
np
.
r_
[
f_cs
[
i
].
dt
,
f_cs
[
i
].
T
-
1
,
eps
,
0.25
]
# last param: droplet radius
meta_data
=
np
.
r_
[
f_cs
[
i
].
dt
,
f_cs
[
i
].
T
-
1
,
eps
,
0.25
]
# last param: droplet radius
np
.
savetxt
(
'
meta_data_long_coverslip_
'
+
P
+
'
_
'
+
z_str
+
'
.csv
'
,
meta_data
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
meta_data_long_coverslip_
'
+
P
+
'
_
'
+
z_str
+
'
.csv
'
,
meta_data
,
delimiter
=
'
,
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
time $t$ [s]
'
,
''
,
[
0
,
4
],
[
0
,
1.05
],
[
1.5
,
2
])
nice_fig
(
'
time $t$ [s]
'
,
''
,
[
0
,
4
],
[
0
,
1.05
],
[
1.5
,
2
])
ls
=
[
'
-
'
,
'
--
'
,
'
-.
'
]
ls
=
[
'
-
'
,
'
--
'
,
'
-.
'
]
for
i
,
f
in
enumerate
(
f_cs
[
0
:
3
]):
for
i
,
f
in
enumerate
(
f_cs
[
0
:
3
]):
plt
.
plot
(
np
.
linspace
(
0
,
(
f
.
T
-
1
)
*
f
.
dt
,
f
.
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f
.
T
-
1
)
*
f
.
dt
,
f
.
T
),
[
np
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
]],
[
np
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
]],
label
=
'
d=
'
+
str
(
z
[
i
]),
ls
=
ls
[
i
],
lw
=
2
)
label
=
'
d=
'
+
str
(
z
[
i
]),
ls
=
ls
[
i
],
lw
=
2
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
title
(
'
$P=99$
'
,
size
=
12
)
plt
.
title
(
'
$P=99$
'
,
size
=
12
)
plt
.
gca
().
get_yaxis
().
set_visible
(
False
)
plt
.
gca
().
get_yaxis
().
set_visible
(
False
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_cs_bad.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_cs_bad.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
time $t$ [s]
'
,
r
'
av. volume fraction $\bar{\phi}_\mathrm{u}$
'
,
[
0
,
4
],
[
0
,
1.05
],
[
1.5
,
2
])
nice_fig
(
'
time $t$ [s]
'
,
r
'
av. volume fraction $\bar{\phi}_\mathrm{u}$
'
,
[
0
,
4
],
[
0
,
1.05
],
[
1.5
,
2
])
ls
=
[
'
-
'
,
'
--
'
,
'
-.
'
]
ls
=
[
'
-
'
,
'
--
'
,
'
-.
'
]
for
i
,
f
in
enumerate
(
f_cs
[
3
:]):
for
i
,
f
in
enumerate
(
f_cs
[
3
:]):
plt
.
plot
(
np
.
linspace
(
0
,
(
f
.
T
-
1
)
*
f
.
dt
,
f
.
T
),
plt
.
plot
(
np
.
linspace
(
0
,
(
f
.
T
-
1
)
*
f
.
dt
,
f
.
T
),
[
np
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
+
3
]],
[
np
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
+
3
]],
label
=
'
$h=$
'
+
str
(
z
[
i
])
+
'
$\,\mathrm{\mu m}$
'
,
lw
=
2
,
ls
=
ls
[
i
])
label
=
'
$h=$
'
+
str
(
z
[
i
])
+
'
$\,\mathrm{\mu m}$
'
,
lw
=
2
,
ls
=
ls
[
i
])
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
title
(
'
$P=9$
'
,
size
=
12
)
plt
.
title
(
'
$P=9$
'
,
size
=
12
)
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
,
loc
=
(
0.18
,
0.025
),
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
,
loc
=
(
0.18
,
0.025
),
handletextpad
=
0.4
,
labelspacing
=
0.2
)
handletextpad
=
0.4
,
labelspacing
=
0.2
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_cs_good.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/tot_recov_cs_good.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
ml_neigh
=
np
.
loadtxt
(
'
/Users/hubatsch/Desktop/DropletFRAP/matlab_fit_coverslip.csv
'
,
ml_neigh
=
np
.
loadtxt
(
'
/Users/hubatsch/Desktop/DropletFRAP/matlab_fit_coverslip.csv
'
,
delimiter
=
'
,
'
)
delimiter
=
'
,
'
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
0.23
],
[
0
,
1.05
],
[
3.8
,
2
])
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
0.23
],
[
0
,
1.05
],
[
3.8
,
2
])
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs_cs
[
0
])[:,
1
::
22
]
/
f_cs
[
0
].
phi_tot_int
,
c
=
green
,
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs_cs
[
0
])[:,
1
::
22
]
/
f_cs
[
0
].
phi_tot_int
,
c
=
green
,
lw
=
4.5
,
alpha
=
0.7
)
lw
=
4.5
,
alpha
=
0.7
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
plt
.
plot
(
range
(
0
,
100
),
np
.
ones
(
100
),
linestyle
=
'
--
'
,
color
=
'
k
'
)
l_fit
=
plt
.
plot
(
np
.
linspace
(
0
,
0.23
,
100
),
np
.
transpose
(
ml_neigh
)[:,::
22
],
l_fit
=
plt
.
plot
(
np
.
linspace
(
0
,
0.23
,
100
),
np
.
transpose
(
ml_neigh
)[:,::
22
],
ls
=
'
-
'
,
c
=
'
k
'
,
lw
=
1
)
ls
=
'
-
'
,
c
=
'
k
'
,
lw
=
1
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Model, eq. (6)
'
,
'
Fit, eq. (1)
'
],
frameon
=
False
,
loc
=
(
0.1
,
0.77
),
ncol
=
2
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Model, eq. (6)
'
,
'
Fit, eq. (1)
'
],
frameon
=
False
,
loc
=
(
0.1
,
0.77
),
ncol
=
2
)
save_nice_fig
(
fol
+
'
Fig3/spat_recov_coverslip.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/spat_recov_coverslip.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Figure 1: Fitting $D_{in}$ and data analysis.
### Figure 1: Fitting $D_{in}$ and data analysis.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: comparison PGL-3 diffusivity with Louise's viscosity**
**Panel: comparison PGL-3 diffusivity with Louise's viscosity**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
louise
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig1/Louise.csv
'
)
louise
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig1/Louise.csv
'
)
lars
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig1/Lars.csv
'
)
lars
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig1/Lars.csv
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# Calculate rough molecular radius, based on Stokes-Einstein and Louise's
# Calculate rough molecular radius, based on Stokes-Einstein and Louise's
# viscosity data from the Science paper supplement (Fig. S5G), email from Louise:
# viscosity data from the Science paper supplement (Fig. S5G), email from Louise:
# earliest point is 10.4 Pa*s .
# earliest point is 10.4 Pa*s .
# Einstein kinetic theory: D=kB*T/(6*pi*eta*r)
# Einstein kinetic theory: D=kB*T/(6*pi*eta*r)
D
=
lars
.
D
[
lars
.
conc
==
75
].
mean
()
D
=
lars
.
D
[
lars
.
conc
==
75
].
mean
()
eta
=
10.4
eta
=
10.4
kBT
=
4.11
*
10
**-
21
kBT
=
4.11
*
10
**-
21
r
=
kBT
/
(
D
*
6
*
np
.
pi
*
eta
)
r
=
kBT
/
(
D
*
6
*
np
.
pi
*
eta
)
print
(
r
)
print
(
r
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
fig
,
ax1
=
plt
.
subplots
()
fig
,
ax1
=
plt
.
subplots
()
ax2
=
ax1
.
twinx
()
ax2
=
ax1
.
twinx
()
plt
.
sca
(
ax1
)
plt
.
sca
(
ax1
)
nice_fig
(
'
c_\mathrm{salt} [\mathrm{mM}]
'
,
'
$\eta^{-1} \;[Pa\cdot s]^{-1}$
'
,
[
40
,
190
],
[
0
,
7.24
],
[
2.3
,
2
])
sns
.
lineplot
(
x
=
"
conc
"
,
y
=
"
D
"
,
data
=
lars
,
color
=
sns
.
color_palette
()[
1
])
sns
.
lineplot
(
x
=
"
conc
"
,
y
=
"
D
"
,
data
=
lars
,
color
=
sns
.
color_palette
()[
1
])
sns
.
scatterplot
(
x
=
"
conc
"
,
y
=
"
D
"
,
data
=
lars
,
color
=
sns
.
color_palette
()[
1
],
alpha
=
0.8
)
sns
.
scatterplot
(
x
=
"
conc
"
,
y
=
"
D
"
,
data
=
lars
,
color
=
sns
.
color_palette
()[
1
],
alpha
=
0.8
)
plt
.
xlabel
(
'
$c_\mathrm{salt}\; [\mathrm{mM}]$
'
)
plt
.
xlabel
(
'
$c_\mathrm{salt}\; [\mathrm{mM}]$
'
)
plt
.
ylabel
(
'
$D_{\mathrm{in}} \;[\mathrm{\mu m^2\cdot s^{-1}}]$
'
,
color
=
red
)
plt
.
ylabel
(
'
$D_{\mathrm{in}} \;[\mathrm{\mu m^2\cdot s^{-1}}]$
'
,
color
=
red
)
plt
.
yticks
([
0
,
0.05
,
0.1
],
rotation
=
90
,
color
=
pa
[
1
])
plt
.
yticks
([
0
,
0.05
,
0.1
],
rotation
=
90
,
color
=
pa
[
1
])
plt
.
ylim
(
0
,
0.1
)
plt
.
ylim
(
0
,
0.1
)
ax1
.
set_zorder
(
1
)
ax1
.
set_zorder
(
1
)
ax1
.
patch
.
set_visible
(
False
)
ax1
.
patch
.
set_visible
(
False
)
plt
.
sca
(
ax2
)
plt
.
sca
(
ax2
)
sns
.
lineplot
(
x
=
"
conc
"
,
y
=
"
vis
"
,
data
=
louise
,
color
=
grey
,
label
=
'
data from Jawerth
\n
et al. 2018
'
)
sns
.
lineplot
(
x
=
"
conc
"
,
y
=
"
vis
"
,
data
=
louise
,
color
=
grey
,
label
=
'
data from Jawerth
\n
et al. 2018
'
)
nice_fig
(
'
c_\mathrm{salt} [\mathrm{mM}]
'
,
'
$\eta^{-1} \;[Pa\cdot s]^{-1}$
'
,
[
40
,
190
],
[
0
,
7.24
],
[
2.3
,
2
])
plt
.
yticks
(
color
=
grey
,
fontsize
=
12
)
plt
.
yticks
(
color
=
grey
)
plt
.
ylabel
(
'
$\eta^{-1} \;[\mathrm{Pa\cdot s}]^{-1}$
'
,
color
=
grey
,
fontsize
=
12
)
plt
.
ylabel
(
'
$\eta^{-1} \;[\mathrm{Pa\cdot s}]^{-1}$
'
,
color
=
grey
)
plt
.
legend
(
frameon
=
False
,
fontsize
=
9
)
plt
.
legend
(
frameon
=
False
,
fontsize
=
9
)
save_nice_fig
(
fol
+
'
Fig1/Lars_vs_Louise.pdf
'
)
#
save_nice_fig(fol+'Fig1/Lars_vs_Louise.pdf')
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Ratio between $D_{out}$ for maximum and minimum salt concentrations for PGL-3**
**Ratio between $D_{out}$ for maximum and minimum salt concentrations for PGL-3**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
lars
[
lars
.
conc
==
180
].
mean
()
/
lars
[
lars
.
conc
==
50
].
mean
()
lars
[
lars
.
conc
==
180
].
mean
()
/
lars
[
lars
.
conc
==
50
].
mean
()
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel:coacervates PLYS/ATP, CMD/PLYS**
m
**Panel:coacervates PLYS/ATP, CMD/PLYS**
m
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
coacervates
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig1/Coacervates.csv
'
)
coacervates
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig1/Coacervates.csv
'
)
sns
.
stripplot
(
data
=
coacervates
,
palette
=
[
green
,
blue
],
jitter
=
0.35
,
**
{
'
marker
'
:
'
.
'
,
'
size
'
:
10
})
sns
.
stripplot
(
data
=
coacervates
,
palette
=
[
green
,
blue
],
jitter
=
0.35
,
**
{
'
marker
'
:
'
.
'
,
'
size
'
:
10
})
ax
=
sns
.
barplot
(
data
=
coacervates
,
palette
=
pa
,
facecolor
=
(
1
,
1
,
1
,
0
),
edgecolor
=
[
pa
[
0
],
pa
[
2
]],
capsize
=
.
15
,
ci
=
'
sd
'
,
errwidth
=
1.5
)
ax
=
sns
.
barplot
(
data
=
coacervates
,
palette
=
pa
,
facecolor
=
(
1
,
1
,
1
,
0
),
edgecolor
=
[
pa
[
0
],
pa
[
2
]],
capsize
=
.
15
,
ci
=
'
sd
'
,
errwidth
=
1.5
)
plt
.
setp
(
ax
.
lines
,
zorder
=
100
)
plt
.
setp
(
ax
.
lines
,
zorder
=
100
)
nice_fig
(
None
,
'
$D_\mathrm{in} \;[\mathrm{\mu m^2\cdot s^{-1}}]$
'
,
[
None
,
None
],
[
0
,
7
],
[
2.3
,
2
])
nice_fig
(
None
,
'
$D_\mathrm{in} \;[\mathrm{\mu m^2\cdot s^{-1}}]$
'
,
[
None
,
None
],
[
0
,
7
],
[
2.3
,
2
])
plt
.
xticks
([
0
,
1
],
(
'
CMD/PLYS
'
,
'
PLYS/ATP
'
),
rotation
=
20
)
plt
.
xticks
([
0
,
1
],
(
'
CMD/PLYS
'
,
'
PLYS/ATP
'
),
rotation
=
20
)
ax
.
get_xticklabels
()[
0
].
set_color
(
green
)
ax
.
get_xticklabels
()[
0
].
set_color
(
green
)
ax
.
get_xticklabels
()[
1
].
set_color
(
blue
)
ax
.
get_xticklabels
()[
1
].
set_color
(
blue
)
plt
.
xlim
(
-
0.7
,
1.7
)
plt
.
xlim
(
-
0.7
,
1.7
)
# save_nice_fig(fol+'Fig1/Coacervates.pdf')
# save_nice_fig(fol+'Fig1/Coacervates.pdf')
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: time course CMD**
**Panel: time course CMD**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_timecourse.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_timecourse
_D
.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_fit_timecourse
_D
.csv
'
,
delimiter
=
'
,
'
)
l_sim
=
plt
.
plot
(
CMD
[:,
0
],
CMD
[:,
1
::
2
],
'
.
'
,
c
=
green
)
l_sim
=
plt
.
plot
(
CMD
[:,
0
],
CMD
[:,
1
::
40
],
'
.
'
,
c
=
green
)
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
1
::
2
],
'
-
'
,
lw
=
1
,
c
=
'
k
'
)
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
1
::
40
],
'
-
'
,
lw
=
1
,
c
=
'
k
'
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
CMD_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
grey
,
lw
=
1.5
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
CMD_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
grey
,
lw
=
1.5
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
data
'
,
'
fit
'
],
ncol
=
2
,
loc
=
(
0
,
0.85
),
frameon
=
False
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
data
'
,
'
fit
'
],
ncol
=
2
,
loc
=
(
0
,
0.85
),
frameon
=
False
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity
(
a.u
)
'
,
[
0
,
np
.
max
(
CMD_fit
[:,
0
])],
[
0
,
0.65
],
[
2.3
,
2
])
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity
[
a.u
.]
'
,
[
0
,
np
.
max
(
CMD_fit
[:,
0
])],
[
0
,
0.65
],
[
2.3
,
2
])
save_nice_fig
(
fol
+
'
Fig1/CMD_spat_recov.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/CMD_spat_recov.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: time course PGL-3**
**Panel: time course PGL-3**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PGL
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_timecourse.csv
'
,
delimiter
=
'
,
'
)
PGL
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_timecourse
_D
.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_fit_timecourse
_D
.csv
'
,
delimiter
=
'
,
'
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
::
2
],
'
.
'
,
c
=
red
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
::
130
],
'
.
'
,
c
=
red
)
l_fit
=
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:,
1
::
2
],
'
-
'
,
lw
=
1
,
c
=
'
k
'
)
l_fit
=
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:,
1
::
130
],
'
-
'
,
lw
=
1
,
c
=
'
k
'
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
PGL_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
grey
,
lw
=
1.5
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
PGL_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
grey
,
lw
=
1.5
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
data
'
,
'
fit
'
],
ncol
=
2
,
loc
=
(
0.015
,
0.865
),
frameon
=
False
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
data
'
,
'
fit
'
],
ncol
=
2
,
loc
=
(
0.015
,
0.865
),
frameon
=
False
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity
(
a.u
)
'
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.
7
],
[
2.3
,
2
])
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity
[
a.u
.]
'
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.
65
],
[
2.3
,
2
])
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_recov.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_recov.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
],
'
-
'
,
c
=
red
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
],
'
-
'
,
c
=
red
)
nice_fig
(
''
,
''
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.55
],
[
0.7
,
0.7
],
fs
=
5
)
nice_fig
(
''
,
''
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.55
],
[
0.7
,
0.7
],
fs
=
5
)
plt
.
yticks
([
0
,
0.5
],
[
''
,
''
])
plt
.
yticks
([
0
,
0.5
],
[
''
,
''
])
plt
.
xticks
([
0
,
3
],
[
''
,
''
])
plt
.
xticks
([
0
,
3
],
[
''
,
''
])
plt
.
gca
().
tick_params
(
direction
=
'
in
'
,
length
=
3
,
width
=
1
)
plt
.
gca
().
tick_params
(
direction
=
'
in
'
,
length
=
3
,
width
=
1
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_90.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_90.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
4
],
'
-
'
,
c
=
red
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
4
*
80
],
'
-
'
,
c
=
red
)
nice_fig
(
''
,
''
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.55
],
[
0.7
,
0.7
],
fs
=
5
)
nice_fig
(
''
,
''
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.55
],
[
0.7
,
0.7
],
fs
=
5
)
plt
.
yticks
([
0
,
0.5
],
[
''
,
''
])
plt
.
yticks
([
0
,
0.5
],
[
''
,
''
])
plt
.
xticks
([
0
,
3
],
[
''
,
''
])
plt
.
xticks
([
0
,
3
],
[
''
,
''
])
plt
.
gca
().
tick_params
(
direction
=
'
in
'
,
length
=
3
,
width
=
1
)
plt
.
gca
().
tick_params
(
direction
=
'
in
'
,
length
=
3
,
width
=
1
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_300.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_300.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
7
],
'
-
'
,
c
=
red
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
7
*
80
],
'
-
'
,
c
=
red
)
nice_fig
(
''
,
''
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.55
],
[
0.7
,
0.7
],
fs
=
5
)
nice_fig
(
''
,
''
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
0.55
],
[
0.7
,
0.7
],
fs
=
5
)
plt
.
yticks
([
0
,
0.5
],
[
''
,
''
])
plt
.
yticks
([
0
,
0.5
],
[
''
,
''
])
plt
.
xticks
([
0
,
3
],
[
''
,
''
])
plt
.
xticks
([
0
,
3
],
[
''
,
''
])
plt
.
gca
().
tick_params
(
direction
=
'
in
'
,
length
=
3
,
width
=
1
)
plt
.
gca
().
tick_params
(
direction
=
'
in
'
,
length
=
3
,
width
=
1
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_510.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_510.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Supplement: movie PLYS**
%% Cell type:code id: tags:
```
python
PLYS
=
np
.
loadtxt
(
fol
+
'
/Fig1/PLYS_timecourse_D.csv
'
,
delimiter
=
'
,
'
)
PLYS_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/PLYS_fit_timecourse_D.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_timecourse_D.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_fit_timecourse_D.csv
'
,
delimiter
=
'
,
'
)
PGL
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_timecourse_D.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_fit_timecourse_D.csv
'
,
delimiter
=
'
,
'
)
```
%% Cell type:code id: tags:
```
python
zipped
=
zip
([
PLYS
,
CMD
,
PGL
],
[
PLYS_fit
,
CMD_fit
,
PGL_fit
],
[
blue
,
green
,
red
],
[
'
PLYS/ATP
'
,
'
CMD/PLYS
'
,
'
PGL-3
'
],
[
0.9
,
0.7
,
0.8
])
for
mov
,
mov_fit
,
c
,
l
,
yl
in
zipped
:
for
i
in
range
(
np
.
shape
(
mov
)[
1
]
-
1
):
l_sim
=
plt
.
plot
(
mov
[:,
0
],
mov
[:,
1
+
i
],
'
-
'
,
c
=
c
)
l_fit
=
plt
.
plot
(
mov_fit
[:,
0
],
mov_fit
[:,
1
+
i
],
'
-
'
,
lw
=
1
,
c
=
'
k
'
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
mov_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
grey
,
lw
=
1.5
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
l
,
'
Fit to Eq. (1)
'
],
ncol
=
2
,
loc
=
(
0
,
0.85
),
frameon
=
False
,
columnspacing
=
0.8
,
handletextpad
=
0.5
,
handlelength
=
0.65
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u.]
'
,
[
0
,
np
.
max
(
mov_fit
[:,
0
])],
[
0
,
yl
],
[
2.3
,
2
])
plt
.
yticks
([
0.2
,
0.4
,
0.6
])
if
l
==
'
PLYS/ATP
'
:
plt
.
yticks
([
0.2
,
0.4
,
0.6
,
0.8
])
save_nice_fig
(
fol
+
'
Fig4/Movies/
'
+
l
[:
3
]
+
'
_spat_recov_mov_
'
+
str
(
i
)
+
'
.png
'
,
form
=
'
png
'
,
dpi
=
149.5
)
plt
.
show
();
```
%% Cell type:markdown id: tags:
**Panel: time course total intensity**
**Panel: time course total intensity**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PGL
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_bc.csv
'
,
delimiter
=
'
,
'
)
PGL
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_bc.csv
'
,
delimiter
=
'
,
'
)
ATP
=
np
.
loadtxt
(
fol
+
'
/Fig1/ATP_bc.csv
'
,
delimiter
=
'
,
'
)
ATP
=
np
.
loadtxt
(
fol
+
'
/Fig1/ATP_bc.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_bc.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_bc.csv
'
,
delimiter
=
'
,
'
)
# fig, ax1 = plt.subplots()
# fig, ax1 = plt.subplots()
# ax2 = ax1.twiny()
# ax2 = ax1.twiny()
# plt.sca(ax1)
# plt.sca(ax1)
nice_fig
(
'
$t/T_\mathrm{max}$
'
,
'
intensity
(
a.u
)
'
,
[
0
,
200
],
[
0
,
0.62
],
[
2.3
,
2
])
nice_fig
(
'
$t/T_\mathrm{max}$
'
,
'
intensity
[
a.u
.]
'
,
[
0
,
200
],
[
0
,
0.62
],
[
2.3
,
2
])
# plt.sca(ax2)
# plt.sca(ax2)
# ax2.tick_params(axis="x",direction="in")
# ax2.tick_params(axis="x",direction="in")
plt
.
plot
(
PGL
[::
10
,
0
]
/
np
.
max
(
PGL
[
1
:
-
1
:
2
,
0
]),
PGL
[::
10
,
1
],
'
.
'
,
label
=
'
PGL-3
'
,
c
=
'
#CC406E
'
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
2
)
plt
.
plot
(
PGL
[::
10
,
0
]
/
np
.
max
(
PGL
[
1
:
-
1
:
2
,
0
]),
PGL
[::
10
,
1
],
'
.
'
,
label
=
'
PGL-3
'
,
c
=
'
#CC406E
'
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
2
)
plt
.
plot
(
ATP
[::
1
,
0
]
/
np
.
max
(
ATP
[:,
0
]),
ATP
[::
1
,
1
],
'
.
'
,
label
=
'
PLYS/ATP
'
,
c
=
'
#FF508A
'
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
2
)
plt
.
plot
(
ATP
[::
1
,
0
]
/
np
.
max
(
ATP
[:,
0
]),
ATP
[::
1
,
1
],
'
.
'
,
label
=
'
PLYS/ATP
'
,
c
=
'
#FF508A
'
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
2
)
plt
.
plot
(
CMD
[::
5
,
0
]
/
np
.
max
(
CMD
[:,
0
]),
CMD
[::
5
,
1
],
'
.
'
,
label
=
'
CMD/PLYS
'
,
c
=
'
#7F2845
'
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
2
)
plt
.
plot
(
CMD
[::
5
,
0
]
/
np
.
max
(
CMD
[:,
0
]),
CMD
[::
5
,
1
],
'
.
'
,
label
=
'
CMD/PLYS
'
,
c
=
'
#7F2845
'
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
2
)
plt
.
legend
(
frameon
=
False
,
fontsize
=
9
)
plt
.
legend
(
frameon
=
False
,
fontsize
=
9
)
plt
.
xlim
(
0
,
1
)
plt
.
xlim
(
0
,
1
)
# save_nice_fig(fol+'Fig1/tot_recov.pdf')
# save_nice_fig(fol+'Fig1/tot_recov.pdf')
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PGL
=
[]
PGL
=
[]
for
i
in
range
(
8
):
for
i
in
range
(
8
):
PGL
.
append
(
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_bc
'
+
str
(
i
+
1
)
+
'
.csv
'
,
delimiter
=
'
,
'
))
PGL
.
append
(
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_bc
'
+
str
(
i
+
1
)
+
'
.csv
'
,
delimiter
=
'
,
'
))
conc
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_conc.csv
'
,
delimiter
=
'
,
'
)
conc
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_conc.csv
'
,
delimiter
=
'
,
'
)
rads
=
[
25
,
24
,
29
,
26
,
25
,
53
,
33
,
26
]
rads
=
[
25
,
24
,
29
,
26
,
25
,
53
,
33
,
26
]
# PGL = [PGL[i] for i in [0, 1, 2, 3, 4, 5, 7]]
# PGL = [PGL[i] for i in [0, 1, 2, 3, 4, 5, 7]]
# rads =
# rads =
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
time $t$ [s]
'
,
'
intensity
(a.u)
'
,
[
0
,
140
],
[
0
,
0.82
],
[
1
,
2
])
nice_fig
(
'
time $t$ [s]
'
,
'
boundary
intensity
'
,
[
0
,
140
],
[
0
,
0.82
],
[
1
,
2
])
temp
=
sns
.
color_palette
()
temp
=
sns
.
color_palette
()
sns
.
set_palette
(
sns
.
color_palette
(
"
rocket
"
,
9
))
sns
.
set_palette
(
sns
.
color_palette
(
"
rocket
"
,
9
))
# plt.sca(ax2)
# plt.sca(ax2)
# ax2.tick_params(axis="x",direction="in")
# ax2.tick_params(axis="x",direction="in")
# plt.plot(PGL[::10, 0], PGL[::10,1], '.', label='PGL-3', c='#CC406E', markersize=3, alpha=0.7, lw=2)
# plt.plot(PGL[::10, 0], PGL[::10,1], '.', label='PGL-3', c='#CC406E', markersize=3, alpha=0.7, lw=2)
for
jj
,
i
in
enumerate
(
PGL
):
for
jj
,
i
in
enumerate
(
PGL
):
if
jj
!=
10
:
if
jj
!=
10
:
plt
.
plot
(
i
[::,
0
]
/
(
0.136
*
rads
[
jj
])
**
2
,
i
[::,
1
],
'
-
'
,
color
=
sns
.
color_palette
()[
jj
],
lw
=
1.5
)
plt
.
plot
(
i
[::,
0
]
/
(
0.136
*
rads
[
jj
])
**
2
,
i
[::,
1
],
'
-
'
,
color
=
sns
.
color_palette
()[
jj
],
lw
=
1.5
)
plt
.
legend
([
str
(
x
)[:
-
2
]
for
x
in
conc
],
columnspacing
=
0.2
,
frameon
=
False
,
plt
.
legend
([
str
(
x
)[:
-
2
]
for
x
in
conc
],
columnspacing
=
0.2
,
frameon
=
False
,
fontsize
=
7
,
handletextpad
=
0.4
,
handlelength
=
0.5
,
labelspacing
=
0.1
,
fontsize
=
7
,
handletextpad
=
0.4
,
handlelength
=
0.5
,
labelspacing
=
0.1
,
loc
=
(
0.3
,
0
),
ncol
=
2
)
loc
=
(
0.3
,
0
),
ncol
=
2
)
# plt.xticks([0, 500])
# plt.xticks([0, 500])
save_nice_fig
(
fol
+
'
Fig1/tot_recov_PGL.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/tot_recov_PGL.pdf
'
)
sns
.
set_palette
(
temp
)
sns
.
set_palette
(
temp
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
time $t$ [s]
'
,
'
intensity
(
a.u
)
'
,
[
0
,
10
],
[
0
,
0.72
],
[
1
,
2
])
nice_fig
(
'
time $t$ [s]
'
,
'
intensity
[
a.u
.]
'
,
[
0
,
10
],
[
0
,
0.72
],
[
1
,
2
])
plt
.
plot
(
ATP
[::
1
,
0
],
ATP
[::
1
,
1
],
'
-
'
,
label
=
'
PLYS/ATP
'
,
c
=
blue
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
1.5
)
plt
.
plot
(
ATP
[::
1
,
0
],
ATP
[::
1
,
1
],
'
-
'
,
label
=
'
PLYS/ATP
'
,
c
=
blue
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
1.5
)
plt
.
plot
(
CMD
[::
5
,
0
],
CMD
[::
5
,
1
],
'
-
'
,
label
=
'
CMD/PLYS
'
,
c
=
green
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
1.5
)
plt
.
plot
(
CMD
[::
5
,
0
],
CMD
[::
5
,
1
],
'
-
'
,
label
=
'
CMD/PLYS
'
,
c
=
green
,
markersize
=
3
,
alpha
=
0.7
,
lw
=
1.5
)
plt
.
legend
(
frameon
=
False
,
fontsize
=
7
,
loc
=
(
0.1
,
0
),
handletextpad
=
0.5
)
plt
.
legend
(
frameon
=
False
,
fontsize
=
7
,
loc
=
(
0.1
,
0
),
handletextpad
=
0.5
)
plt
.
yticks
([]);
plt
.
ylabel
(
''
)
plt
.
yticks
([]);
plt
.
ylabel
(
''
)
save_nice_fig
(
fol
+
'
Fig1/tot_recov_coac.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/tot_recov_coac.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Figure 2: model sketches
### Figure 2: model sketches
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
model
=
np
.
loadtxt
(
fol
+
'
Fig2/model_timecourse.csv
'
,
delimiter
=
'
,
'
)
model
=
np
.
loadtxt
(
fol
+
'
Fig2/model_timecourse.csv
'
,
delimiter
=
'
,
'
)
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
1
:],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
1
:],
'
-
'
,
lw
=
1
,
c
=
green
,
label
=
'
Simulation
'
)
c
=
green
,
label
=
'
Simulation
'
)
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
[
0
,
1
],
[
2.3
,
2
])
[
0
,
1
],
[
2.3
,
2
])
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
c
=
green
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
c
=
green
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
# plt.annotate('$t \longrightarrow \infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)
# plt.annotate('$t \longrightarrow \infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)
# plt.annotate('$t \longrightarrow \infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)
# plt.annotate('$t \longrightarrow \infty$', (0.97, 0.89), (1.3,0.85), fontsize=12)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
save_nice_fig
(
fol
+
'
Fig2/full_time_course.pdf
'
)
save_nice_fig
(
fol
+
'
Fig2/full_time_course.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
2
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
c
=
dark_grey
,
label
=
'
Simulation
'
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
[
0
,
1
],
[
2.3
,
2
])
[
0
,
1
],
[
2.3
,
2
])
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
text
(
0.75
,
0.18
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
text
(
0.75
,
0.18
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
2
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
2
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
model
[:,
-
1
],
model
[:,
2
],
color
=
grey
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
model
[:,
-
1
],
model
[:,
2
],
color
=
grey
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot.pdf
'
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
1
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
1
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
c
=
dark_grey
,
label
=
'
Simulation
'
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
[
0
,
1
],
[
2.3
,
2
])
[
0
,
1
],
[
2.3
,
2
])
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
text
(
1.45
,
0.02
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
text
(
1.45
,
0.02
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
-
1
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
-
1
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
model
[:,
-
1
],
model
[:,
1
],
color
=
grey
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
model
[:,
-
1
],
model
[:,
1
],
color
=
grey
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot_bleach.pdf
'
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot_bleach.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
-
2
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
model
[:,
0
],
model
[:,
-
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
c
=
dark_grey
,
label
=
'
Simulation
'
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
[
0
,
1
],
[
2.3
,
2
])
[
0
,
1
],
[
2.3
,
2
])
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
text
(
0.47
,
0.4
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
text
(
0.47
,
0.4
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
-
2
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
-
2
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
model
[:,
-
2
],
model
[:,
-
1
],
color
=
grey
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
model
[:,
-
2
],
model
[:,
-
1
],
color
=
grey
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot_late.pdf
'
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot_late.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# l_fit = plt.plot(model[:, 0], model[:, -2], '-', lw=1,
# l_fit = plt.plot(model[:, 0], model[:, -2], '-', lw=1,
# c=dark_grey, label='Simulation')
# c=dark_grey, label='Simulation')
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
plt
.
plot
(
model
[:,
0
],
model
[:,
-
1
],
'
k
'
,
lw
=
2
)
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
nice_fig
(
'
radial distance $r/R$
'
,
'
volume fraction $\phi_\mathrm{u}$
'
,
[
0
,
2
],
[
0
,
1
],
[
2.3
,
2
])
[
0
,
1
],
[
2.3
,
2
])
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
title
(
'
$t=0.22 \;R^2/D_\mathrm{in}$
'
)
plt
.
text
(
0.47
,
0.4
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
text
(
0.47
,
0.4
,
'
$\phi_\mathrm{u}$
'
,
fontsize
=
10
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
-
1
],
color
=
green
)
plt
.
gca
().
fill_between
(
model
[:,
0
],
0
,
model
[:,
-
1
],
color
=
green
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
plt
.
annotate
(
'
$\phi_\mathrm{tot}$
'
,
(
1
,
0.5
),
(
1.5
,
0.5
),
fontsize
=
10
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot_before.pdf
'
)
save_nice_fig
(
fol
+
'
Fig2/snap_shot_before.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Figure 4: Obtaining info about outside: experiments.
### Figure 4: Obtaining info about outside: experiments.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: data time course with full model.**
**Panel: data time course with full model.**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
CMD
=
np
.
loadtxt
(
fol
+
'
Fig4/CMD_timecourse.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
Fig4/CMD_timecourse.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
Fig4/CMD_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
Fig4/CMD_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
l_data
=
plt
.
plot
(
CMD
[:,
0
],
CMD
[:,
1
:],
c
=
green
,
lw
=
2
,
CMD_t
=
np
.
loadtxt
(
fol
+
'
Fig4/CMD_fit_time.csv
'
,
delimiter
=
'
,
'
)
l_data
=
plt
.
plot
(
CMD
[:,
0
],
CMD
[:,
1
::
30
],
c
=
green
,
lw
=
2
,
label
=
'
Experiment
'
)
label
=
'
Experiment
'
)
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
1
:
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
2
::
30
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
c
=
dark_grey
,
label
=
'
Simulation
'
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
1
],
'
-
'
,
lw
=
1
,
[
0
,
2.4
*
np
.
max
(
CMD
[:,
0
])],
[
0
,
0.5
],
[
2.3
,
2
])
c
=
dark_grey
)
# Initial condition
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u.]
'
,
[
0
,
2.4
*
np
.
max
(
CMD
[:,
0
])],
[
0
,
0.7
],
[
2.3
,
2
])
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
CMD/PLYS
'
,
'
Full model
'
],
frameon
=
False
,
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
CMD/PLYS
'
,
'
Full model
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.52
,
0.7
))
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.52
,
0.7
))
save_nice_fig
(
fol
+
'
Fig4/CMD_spat_recov_new.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/CMD_spat_recov_new.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PLYS
=
np
.
loadtxt
(
fol
+
'
Fig4/PLYS_timecourse.csv
'
,
delimiter
=
'
,
'
)
PLYS
=
np
.
loadtxt
(
fol
+
'
Fig4/PLYS_timecourse.csv
'
,
delimiter
=
'
,
'
)
PLYS_fit
=
np
.
loadtxt
(
fol
+
'
Fig4/PLYS_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
PLYS_fit
=
np
.
loadtxt
(
fol
+
'
Fig4/PLYS_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
PLYS_t
=
np
.
loadtxt
(
fol
+
'
Fig4/PLYS_fit_time.csv
'
,
delimiter
=
'
,
'
)
PLYS_t
=
np
.
loadtxt
(
fol
+
'
Fig4/PLYS_fit_time.csv
'
,
delimiter
=
'
,
'
)
l_data
=
plt
.
plot
(
PLYS
[:,
0
],
PLYS
[:,
1
::
30
],
c
=
blue
,
lw
=
2
)
l_data
=
plt
.
plot
(
PLYS
[:,
0
],
PLYS
[:,
1
::
30
],
c
=
blue
,
lw
=
2
)
l_fit
=
plt
.
plot
(
PLYS_fit
[:,
0
],
PLYS_fit
[:,
2
::
30
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
PLYS_fit
[:,
0
],
PLYS_fit
[:,
2
::
30
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
# time course
c
=
dark_grey
,
label
=
'
Simulation
'
)
# time course
l_fit
=
plt
.
plot
(
PLYS_fit
[:,
0
],
PLYS_fit
[:,
1
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
PLYS_fit
[:,
0
],
PLYS_fit
[:,
1
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
# Initial condition
c
=
dark_grey
)
# Initial condition
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u
.
]
'
,
[
0
,
2.4
*
np
.
max
(
PLYS
[:,
0
])],
[
0
,
0.75
],
[
2.3
,
2
])
[
0
,
2.4
*
np
.
max
(
PLYS
[:,
0
])],
[
0
,
0.75
],
[
2.3
,
2
])
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
ATP/
PLYS
'
,
'
Full model
'
],
frameon
=
False
,
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
PLYS
/ATP
'
,
'
Full model
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.52
,
0.7
))
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.52
,
0.7
))
# save_nice_fig(fol+'Fig4/PLYS_spat_recov_new.pdf')
save_nice_fig
(
fol
+
'
Fig4/PLYS_spat_recov_new.pdf
'
)
```
%% Cell type:code id: tags:
```
python
for
i
in
range
(
np
.
shape
(
PLYS
)[
1
]):
l_data
=
plt
.
plot
(
PLYS
[:,
0
],
PLYS
[:,
1
+
i
],
c
=
blue
,
lw
=
2
)
l_fit
=
plt
.
plot
(
PLYS_fit
[:,
0
],
PLYS_fit
[:,
2
+
i
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
# time course
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
[
0
,
2.4
*
np
.
max
(
PLYS
[:,
0
])],
[
0
,
0.9
],
[
2.3
,
2.005
])
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
ATP/PLYS
'
,
'
Full model
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.52
,
0.7
))
t
=
str
(
np
.
round
(
PLYS_t
[
i
+
1
],
2
))
plt
.
text
(
0.5
,
0.785
,
t
.
ljust
(
4
,
'
0
'
)
+
'
s
'
)
save_nice_fig
(
fol
+
'
Fig4/PLYSATP_mov/PLYS_spat_recov_mov_
'
+
str
(
i
)
+
'
.png
'
,
form
=
'
png
'
)
plt
.
show
();
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PGL
=
np
.
loadtxt
(
fol
+
'
Fig4/PGL_timecourse.csv
'
,
delimiter
=
'
,
'
)
PGL
=
np
.
loadtxt
(
fol
+
'
Fig4/PGL_timecourse.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
Fig4/PGL_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
Fig4/PGL_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
l_data
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
::
4
],
c
=
red
,
lw
=
2
,
PGL_t
=
np
.
loadtxt
(
fol
+
'
Fig4/PGL_fit_time.csv
'
,
delimiter
=
'
,
'
)
l_data
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
::
140
],
c
=
red
,
lw
=
2
,
label
=
'
Experiment
'
)
label
=
'
Experiment
'
)
l_fit
=
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:,
2
::
4
],
'
-
'
,
lw
=
1
,
l_fit
=
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:,
2
::
140
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Simulation
'
)
c
=
dark_grey
,
label
=
'
Simulation
'
)
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:
1
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:
,
1
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity
(
a.u
)
'
,
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity
[
a.u
.]
'
,
[
0
,
2.
5
*
np
.
max
(
PGL
[:,
0
])],
[
0
,
0.
65
],
[
2.3
,
2
])
[
0
,
2.
7
*
np
.
max
(
PGL
[:,
0
])],
[
0
,
0.
7
],
[
2.3
,
2
])
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
PGL
'
,
'
Full model
'
],
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
'
PGL
-3
'
,
'
Full model
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.54
,
0.7
))
handlelength
=
0.8
,
loc
=
(
0.54
,
0.7
))
save_nice_fig
(
fol
+
'
Fig4/PGL_spat_recov.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/PGL_spat_recov.pdf
'
)
```
```
%% Cell type:code id: tags:
```
python
zipped
=
zip
([
PLYS
,
CMD
,
PGL
],
[
PLYS_fit
,
CMD_fit
,
PGL_fit
],
[
PLYS_t
,
CMD_t
,
PGL_t
],
[
blue
,
green
,
red
],
[
'
PLYS/ATP
'
,
'
CMD/PLYS
'
,
'
PGL-3
'
],
[
0.9
,
0.7
,
0.8
])
for
(
mov
,
mov_fit
,
mov_t
,
c
,
l
,
yl
)
in
zipped
:
for
i
in
range
(
np
.
shape
(
mov
)[
1
]
-
1
):
l_data
=
plt
.
plot
(
mov
[:,
0
],
mov
[:,
1
+
i
],
c
=
c
,
lw
=
2
)
l_fit
=
plt
.
plot
(
mov_fit
[:,
0
],
mov_fit
[:,
2
+
i
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
# time course
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
[
0
,
2.7
*
np
.
max
(
mov
[:,
0
])],
[
0
,
yl
],
[
2.35
,
2.005
])
plt
.
legend
([
l_data
[
0
],
l_fit
[
0
]],
[
l
,
'
Fit to Eq. (6)
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.48
,
0.7
))
t
=
str
(
np
.
round
(
mov_t
[
i
+
1
],
2
))
plt
.
text
(
0.5
,
yl
-
0.11
/
0.8
*
yl
,
t
.
ljust
(
4
,
'
0
'
)
+
'
s
'
)
plt
.
yticks
([
0.2
,
0.4
,
0.6
])
if
l
==
'
PLYS/ATP
'
:
plt
.
yticks
([
0.2
,
0.4
,
0.6
,
0.8
])
save_nice_fig
(
fol
+
'
Fig4/Movies/
'
+
l
[:
3
]
+
'
_spat_recov_model_
'
+
str
(
i
)
+
'
.png
'
,
form
=
'
png
'
,
dpi
=
149
)
plt
.
show
();
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: Experimental Partition coefficient vs $D_{out}$ for CMD**
**Panel: Experimental Partition coefficient vs $D_{out}$ for CMD**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PLYS
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PLYS.csv
'
)
PLYS
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PLYS.csv
'
)
CMD
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/CMD.csv
'
)
CMD
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/CMD.csv
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
fig
,
ax1
=
plt
.
subplots
()
fig
,
ax1
=
plt
.
subplots
()
plt
.
sca
(
ax1
)
plt
.
sca
(
ax1
)
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
CMD
,
color
=
green
,
ci
=
'
sd
'
)
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
CMD
,
color
=
green
,
ci
=
'
sd
'
)
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PLYS
,
color
=
blue
,
ci
=
'
sd
'
)
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PLYS
,
color
=
blue
,
ci
=
'
sd
'
)
plt
.
plot
(
np
.
logspace
(
1
,
3
,
10
),
1.5
*
np
.
logspace
(
1
,
3
,
10
),
'
--
'
,
c
=
'
grey
'
,
alpha
=
0.5
)
plt
.
plot
(
np
.
logspace
(
1
,
3
,
10
),
1.5
*
np
.
logspace
(
1
,
3
,
10
),
'
--
'
,
c
=
'
grey
'
,
alpha
=
0.5
)
# plt.plot(np.logspace(0, 2, 10), 0.2*np.logspace(0, 2, 10)**2, '--', c='grey')
# plt.plot(np.logspace(0, 2, 10), 0.2*np.logspace(0, 2, 10)**2, '--', c='grey')
ax1
.
set_yscale
(
'
log
'
)
ax1
.
set_yscale
(
'
log
'
)
ax1
.
set_xscale
(
'
log
'
)
ax1
.
set_xscale
(
'
log
'
)
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out} \;[\mathrm{\mu m^2s^{-1}}]$
'
,
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out} \;[\mathrm{\mu m^2s^{-1}}]$
'
,
[
1
,
340
],
[
0.08
,
450
],
[
2.3
,
2
])
[
1
,
340
],
[
0.08
,
450
],
[
2.3
,
2
])
plt
.
legend
([
'
CMD/PLYS
'
,
'
ATP/
PLYS
'
],
frameon
=
False
,
fontsize
=
9
,
loc
=
(
0.44
,
0.05
))
plt
.
legend
([
'
CMD/PLYS
'
,
'
PLYS
/ATP
'
],
frameon
=
False
,
fontsize
=
9
,
loc
=
(
0.44
,
0.05
))
plt
.
text
(
1.1
,
2
,
'
$D_\mathrm{in, P/A}$
'
,
color
=
blue
)
plt
.
text
(
1.1
,
2
,
'
$D_\mathrm{in, P/A}$
'
,
color
=
blue
)
plt
.
text
(
1.1
,
7
,
'
$D_\mathrm{in, C/P}$
'
,
color
=
green
)
plt
.
text
(
1.1
,
7
,
'
$D_\mathrm{in, C/P}$
'
,
color
=
green
)
# plt.plot([1, 9], [1.7, 1.7], '--', color=blue)
# plt.plot([1, 9], [1.7, 1.7], '--', color=blue)
# plt.plot([1, 12], [6, 6], '--', color=green)
# plt.plot([1, 12], [6, 6], '--', color=green)
plt
.
xticks
([
1
,
10
,
100
]);
plt
.
xticks
([
1
,
10
,
100
]);
plt
.
yticks
([
0.1
,
1
,
10
,
100
]);
plt
.
yticks
([
0.1
,
1
,
10
,
100
]);
save_nice_fig
(
fol
+
'
Fig4/PLYS_CMD.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/PLYS_CMD.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: Experimental Partition coefficient vs $D_out$ for PGL-3**
**Panel: Experimental Partition coefficient vs $D_out$ for PGL-3**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
PGL_50
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_50.csv
'
)
PGL_50
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_50.csv
'
)
PGL_60
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_60.csv
'
)
PGL_60
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_60.csv
'
)
PGL_75
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_75.csv
'
)
PGL_75
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_75.csv
'
)
PGL_90
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_90.csv
'
)
PGL_90
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_90.csv
'
)
PGL_100
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_100.csv
'
)
PGL_100
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_100.csv
'
)
PGL_120
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_120.csv
'
)
PGL_120
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_120.csv
'
)
PGL_150
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_150.csv
'
)
PGL_150
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_150.csv
'
)
PGL_180
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_180.csv
'
)
PGL_180
=
pd
.
read_csv
(
'
/Users/hubatsch/Desktop/DropletFRAP/Latex/Figures/Fig4/PGL_180.csv
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
fig
,
ax1
=
plt
.
subplots
()
fig
,
ax1
=
plt
.
subplots
()
plt
.
sca
(
ax1
)
plt
.
sca
(
ax1
)
temp
=
sns
.
color_palette
()
temp
=
sns
.
color_palette
()
sns
.
set_palette
(
sns
.
color_palette
(
"
rocket
"
,
9
))
sns
.
set_palette
(
sns
.
color_palette
(
"
rocket
"
,
9
))
l50
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_50
,
l50
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_50
,
color
=
sns
.
color_palette
()[
1
],
ci
=
None
)
color
=
sns
.
color_palette
()[
1
],
ci
=
None
)
l60
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_60
,
l60
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_60
,
color
=
sns
.
color_palette
()[
2
],
ci
=
None
)
color
=
sns
.
color_palette
()[
2
],
ci
=
None
)
l75
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_75
,
l75
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_75
,
color
=
sns
.
color_palette
()[
3
],
ci
=
None
)
color
=
sns
.
color_palette
()[
3
],
ci
=
None
)
l90
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_90
,
l90
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_90
,
color
=
sns
.
color_palette
()[
4
],
ci
=
None
)
color
=
sns
.
color_palette
()[
4
],
ci
=
None
)
l100
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_100
,
l100
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_100
,
color
=
sns
.
color_palette
()[
5
],
ci
=
None
)
color
=
sns
.
color_palette
()[
5
],
ci
=
None
)
leg1
=
plt
.
legend
([
'
50 mM
'
,
'
60 mM
'
,
'
75 mM
'
,
'
90 mM
'
,
'
100 mM
'
],
ls
=
plt
.
gca
().
get_lines
()
leg1
=
plt
.
legend
([
ls
[
4
],
ls
[
3
],
ls
[
2
],
ls
[
1
],
ls
[
0
]],
[
'
100 mM
'
,
'
90 mM
'
,
'
75 mM
'
,
'
60 mM
'
,
'
50 mM
'
],
labelspacing
=
0.3
,
loc
=
(
0.63
,
0.0
),
labelspacing
=
0.3
,
loc
=
(
0.63
,
0.0
),
handletextpad
=
0.4
,
handlelength
=
0.5
,
frameon
=
0
)
handletextpad
=
0.4
,
handlelength
=
0.5
,
frameon
=
0
)
l120
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_120
,
l120
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_120
,
color
=
sns
.
color_palette
()[
6
],
ci
=
None
)
color
=
sns
.
color_palette
()[
6
],
ci
=
None
)
l150
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_150
,
l150
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_150
,
color
=
sns
.
color_palette
()[
7
],
ci
=
None
)
color
=
sns
.
color_palette
()[
7
],
ci
=
None
)
l180
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_180
,
l180
=
sns
.
lineplot
(
x
=
"
P
"
,
y
=
"
D_out
"
,
data
=
PGL_180
,
color
=
sns
.
color_palette
()[
8
],
ci
=
None
)
color
=
sns
.
color_palette
()[
8
],
ci
=
None
)
plt
.
plot
(
np
.
logspace
(
0
,
4
,
10
),
0.07
*
np
.
logspace
(
0
,
4
,
10
),
plt
.
plot
(
np
.
logspace
(
0
,
4
,
10
),
0.07
*
np
.
logspace
(
0
,
4
,
10
),
'
--
'
,
c
=
'
grey
'
,
alpha
=
0.5
)
'
--
'
,
c
=
'
grey
'
,
alpha
=
0.5
)
# plt.plot(np.logspace(2, 3, 10), 30*np.ones(10), '--', c='m', lw=2)
# plt.plot(np.logspace(2, 3, 10), 30*np.ones(10), '--', c='m', lw=2)
ax1
.
set_yscale
(
'
log
'
)
ax1
.
set_yscale
(
'
log
'
)
ax1
.
set_xscale
(
'
log
'
)
ax1
.
set_xscale
(
'
log
'
)
nice_fig
(
'
Partition coefficient $P$
'
,
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out} \;[\mathrm{\mu m^2 s^{-1}}]$
'
,
'
$D_\mathrm{out} \;[\mathrm{\mu m^2 s^{-1}}]$
'
,
[
1
,
20000
],
[
0.0003
,
600
],
[
2.3
,
2
])
[
1
,
20000
],
[
0.0003
,
600
],
[
2.3
,
2
])
plt
.
xticks
([
1
,
10
,
100
,
1000
,
10000
]);
plt
.
xticks
([
1
,
10
,
100
,
1000
,
10000
]);
plt
.
legend
(
loc
=
1
)
plt
.
legend
(
loc
=
1
)
plt
.
legend
([
'
50 mM
'
,
'
60 mM
'
,
'
75 mM
'
,
'
90 mM
'
,
'
100 mM
'
,
ls
=
plt
.
gca
().
get_lines
()
'
1
2
0 mM
'
,
'
150 mM
'
,
'
1
8
0 mM
'
],
labelspacing
=
0.3
,
plt
.
legend
([
ls
[
7
],
ls
[
6
],
ls
[
5
]],
[
'
1
8
0 mM
'
,
'
150 mM
'
,
'
1
2
0 mM
'
],
labelspacing
=
0.3
,
loc
=
(
0
,
0.66
),
handletextpad
=
0.4
,
handlelength
=
0.5
,
frameon
=
0
)
loc
=
(
0
,
0.66
),
handletextpad
=
0.4
,
handlelength
=
0.5
,
frameon
=
0
)
plt
.
gca
().
add_artist
(
leg1
)
plt
.
gca
().
add_artist
(
leg1
)
# plt.plot([700, 10000], [30, 30], color=(1, 0, 0))
# plt.plot([700, 10000], [70, 70], color=(1, 0, 0))
# plt.plot([700, 700], [30, 70], color=(1, 0, 0))
# plt.plot([10000, 10000], [30, 70], color=(1, 0, 0))
save_nice_fig
(
fol
+
'
Fig4/PGL-3.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/PGL-3.pdf
'
)
sns
.
set_palette
(
temp
)
sns
.
set_palette
(
temp
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
le_egfp
=
239
le_egfp
=
239
le_pgl3
=
693
le_pgl3
=
693
ratio
=
le_egfp
/
(
le_egfp
+
le_pgl3
)
ratio
=
le_egfp
/
(
le_egfp
+
le_pgl3
)
D_factor
=
np
.
sqrt
(
ratio
)
D_factor
=
np
.
sqrt
(
ratio
)
D_GFPw
=
87
# micron^2/s, Arrio-Dupont et al. 2000 BJ, GFP in water
D_GFPw
=
87
# micron^2/s, Arrio-Dupont et al. 2000 BJ, GFP in water
D
=
D_GFPw
*
np
.
sqrt
(
ratio
)
D
=
D_GFPw
*
np
.
sqrt
(
ratio
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
P_anatol
=
np
.
array
([
686
,
533
,
590
,
474
])
/
np
.
array
([
1.6
,
5.5
,
7.5
,
19.3
])
P_anatol
=
np
.
array
([
686
,
533
,
590
,
474
])
/
np
.
array
([
1.6
,
5.5
,
7.5
,
19.3
])
salt_anatol
=
np
.
array
([
100
,
150
,
175
,
200
])
salt_anatol
=
np
.
array
([
100
,
150
,
175
,
200
])
P
=
PGL_50
[
'
P
'
]
P
=
PGL_50
[
'
P
'
]
def
i_P
(
df
,
Pa
):
def
i_P
(
df
,
Pa
):
return
interp1d
(
np
.
array
(
df
.
groupby
(
'
P
'
).
mean
()).
flatten
(),
return
interp1d
(
np
.
array
(
df
.
groupby
(
'
P
'
).
mean
()).
flatten
(),
P
.
unique
())(
Pa
)
P
.
unique
())(
Pa
)
Ps_2
=
[
i_P
(
PGL
,
2
)
for
PGL
in
[
PGL_50
,
PGL_60
,
PGL_75
,
PGL_90
,
Ps_2
=
[
i_P
(
PGL
,
2
)
for
PGL
in
[
PGL_50
,
PGL_60
,
PGL_75
,
PGL_90
,
PGL_100
,
PGL_120
,
PGL_150
,
PGL_180
]]
PGL_100
,
PGL_120
,
PGL_150
,
PGL_180
]]
Ps_10
=
[
i_P
(
PGL
,
10
)
for
PGL
in
[
PGL_50
,
PGL_60
,
PGL_75
,
PGL_90
,
Ps_10
=
[
i_P
(
PGL
,
10
)
for
PGL
in
[
PGL_50
,
PGL_60
,
PGL_75
,
PGL_90
,
PGL_100
,
PGL_120
,
PGL_150
,
PGL_180
]]
PGL_100
,
PGL_120
,
PGL_150
,
PGL_180
]]
Ps_50
=
[
i_P
(
PGL
,
50
)
for
PGL
in
[
PGL_50
,
PGL_60
,
PGL_75
,
PGL_90
,
Ps_50
=
[
i_P
(
PGL
,
50
)
for
PGL
in
[
PGL_50
,
PGL_60
,
PGL_75
,
PGL_90
,
PGL_100
,
PGL_120
,
PGL_150
,
PGL_180
]]
PGL_100
,
PGL_120
,
PGL_150
,
PGL_180
]]
salts
=
[
50
,
60
,
75
,
90
,
100
,
120
,
150
,
180
]
salts
=
[
50
,
60
,
75
,
90
,
100
,
120
,
150
,
180
]
nice_fig
(
'
$c_\mathrm{salt} \; [\mathrm{mM}]$
'
,
'
Partition coefficient $P$
'
,
nice_fig
(
'
$c_\mathrm{salt} \; [\mathrm{mM}]$
'
,
'
Partition coefficient $P$
'
,
[
50
,
180
],
[
12
,
20000
],
[
2.3
,
2
])
[
50
,
180
],
[
12
,
20000
],
[
2.3
,
2
])
plt
.
plot
(
salts
,
Ps_
1
,
color
=
red
,
label
=
'
$D_{\mathrm{out}}=
1
$
'
)
plt
.
plot
(
salts
,
Ps_
2
,
color
=
red
,
label
=
'
$D_{\mathrm{out}}=
2
$
'
)
plt
.
plot
(
salts
,
Ps_10
,
color
=
green
,
label
=
'
$D_{\mathrm{out}}=10$
'
)
plt
.
plot
(
salts
,
Ps_10
,
color
=
green
,
label
=
'
$D_{\mathrm{out}}=10$
'
)
plt
.
plot
(
salts
,
Ps_50
,
color
=
blue
,
label
=
'
$D_{\mathrm{out}}=50$
'
)
plt
.
plot
(
salts
,
Ps_50
,
color
=
blue
,
label
=
'
$D_{\mathrm{out}}=50$
'
)
# plt.plot(salt_anatol, P_anatol)
# plt.plot(salt_anatol, P_anatol)
# plt.gca().fill_between(salts, Ps_15, Ps_30, color=red, alpha=0.2)
# plt.gca().fill_between(salts, Ps_15, Ps_30, color=red, alpha=0.2)
plt
.
yticks
(
rotation
=
45
)
plt
.
yticks
(
rotation
=
45
)
plt
.
yscale
(
'
log
'
)
plt
.
yscale
(
'
log
'
)
plt
.
legend
(
frameon
=
False
,
ncol
=
2
,
columnspacing
=
0.2
,
handletextpad
=
0.1
,
plt
.
legend
(
frameon
=
False
,
ncol
=
2
,
columnspacing
=
0.2
,
handletextpad
=
0.1
,
labelspacing
=
0.2
,
loc
=
(
0.005
,
-
0.02
),
handlelength
=
0.5
)
labelspacing
=
0.2
,
loc
=
(
0.005
,
-
0.02
),
handlelength
=
0.5
)
# plt.text(110, 6200, '$D_\mathrm{out}=30\;\mathrm{\mu m^2/s}$',
# plt.text(110, 6200, '$D_\mathrm{out}=30\;\mathrm{\mu m^2/s}$',
# color=red, size=8)
# color=red, size=8)
# plt.text(54, 700, '$D_\mathrm{out}=15\;\mathrm{\mu m^2/s}$',
# plt.text(54, 700, '$D_\mathrm{out}=15\;\mathrm{\mu m^2/s}$',
# color=red, size=8)
# color=red, size=8)
save_nice_fig
(
fol
+
'
Fig4/PGL-3_part.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/PGL-3_part.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Figure 5: Obtaining info about outside: theory.
### Figure 5: Obtaining info about outside: theory.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: Partition coefficient vs. $D_{out}$, showcasing four different simulation start cases.**
**Panel: Partition coefficient vs. $D_{out}$, showcasing four different simulation start cases.**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
sns
.
set_palette
(
sns
.
color_palette
(
"
Set2
"
))
sns
.
set_palette
(
sns
.
color_palette
(
"
Set2
"
))
P_Do
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Do_220121.csv
'
,
delimiter
=
'
,
'
)
P_Do
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Do_220121.csv
'
,
delimiter
=
'
,
'
)
sns
.
set_style
(
"
white
"
)
sns
.
set_style
(
"
white
"
)
sns
.
set_palette
([
sns
.
color_palette
()[
i
]
for
i
in
[
3
,
0
,
1
,
2
]])
sns
.
set_palette
([
sns
.
color_palette
()[
i
]
for
i
in
[
3
,
0
,
1
,
2
]])
P
=
[
5
,
150
,
5
,
150
]
P
=
[
5
,
150
,
5
,
150
]
D_o
=
[
0.1
,
0.1
,
1
,
1
]
D_o
=
[
0.1
,
0.1
,
1
,
1
]
plt
.
gca
().
set_prop_cycle
(
None
)
plt
.
gca
().
set_prop_cycle
(
None
)
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out}$ [$\mathrm{\mu m^2/s}$]
'
,
[
0.9
,
320
],
[
0.000001
,
340
],
[
2.3
,
2
])
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out}$ [$\mathrm{\mu m^2/s}$]
'
,
[
0.9
,
320
],
[
0.000001
,
340
],
[
2.3
,
2
])
lines
=
plt
.
loglog
(
P_Do
[
0
,
:],
P_Do
[
1
:,
:].
transpose
())
lines
=
plt
.
loglog
(
P_Do
[
0
,
:],
P_Do
[
1
:,
:].
transpose
())
plt
.
plot
(
P_Do
[
0
,
:],
P_Do
[
0
,
:],
'
--
'
,
c
=
'
grey
'
)
plt
.
plot
(
P_Do
[
0
,
:],
P_Do
[
0
,
:],
'
--
'
,
c
=
'
grey
'
)
plt
.
legend
([
lines
[
2
],
lines
[
0
],
lines
[
3
],
lines
[
1
]],
# plt.legend([lines[2], lines[0], lines[3], lines[1]],
# ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,
# title=r'$D_\mathrm{out}$/P [$\mathrm{\mu m^2/s}$]:', columnspacing=0.5, labelspacing=0.3,
# loc=(0.4, 0), handletextpad=0.4, handlelength=0.5)
plt
.
gca
().
set_prop_cycle
(
None
)
lines
[
0
]
=
plt
.
plot
(
P
[
0
],
D_o
[
0
],
'
o
'
,
mfc
=
'
none
'
,
markersize
=
8
)
lines
[
1
]
=
plt
.
plot
(
P
[
1
],
D_o
[
1
],
'
o
'
,
mfc
=
'
none
'
,
markersize
=
8
)
lines
[
2
]
=
plt
.
plot
(
P
[
2
],
D_o
[
2
],
'
o
'
,
mfc
=
'
none
'
,
markersize
=
8
)
lines
[
3
]
=
plt
.
plot
(
P
[
3
],
D_o
[
3
],
'
o
'
,
mfc
=
'
none
'
,
markersize
=
8
)
def
circle
(
i
):
return
plt
.
Line2D
(
range
(
1
),
range
(
1
),
color
=
sns
.
color_palette
()[
i
],
marker
=
'
o
'
,
markersize
=
5
,
markerfacecolor
=
"
white
"
)
plt
.
legend
([
circle
(
2
),
circle
(
0
),
circle
(
3
),
circle
(
1
)],
[
'
0.2
'
,
'
0.02
'
,
'
0.0067
'
,
'
0.00067
'
],
ncol
=
2
,
frameon
=
False
,
[
'
0.2
'
,
'
0.02
'
,
'
0.0067
'
,
'
0.00067
'
],
ncol
=
2
,
frameon
=
False
,
title
=
r
'
$D_\mathrm{out}$/P [$\mathrm{\mu m^2/s}$]:
'
,
columnspacing
=
0.5
,
labelspacing
=
0.3
,
title
=
r
'
$D_\mathrm{out}$/P [$\mathrm{\mu m^2/s}$]:
'
,
columnspacing
=
0.5
,
labelspacing
=
0.3
,
loc
=
(
0.4
,
0
),
handletextpad
=
0.4
,
handlelength
=
0.5
)
loc
=
(
0.4
,
0
),
handletextpad
=
0.4
,
handlelength
=
0.5
)
plt
.
gca
().
set_prop_cycle
(
None
)
plt
.
plot
(
P
[
0
],
D_o
[
0
],
'
d
'
)
plt
.
plot
(
P
[
1
],
D_o
[
1
],
'
d
'
)
plt
.
plot
(
P
[
2
],
D_o
[
2
],
'
d
'
)
plt
.
plot
(
P
[
3
],
D_o
[
3
],
'
d
'
)
plt
.
annotate
(
'
$D_{out}$/P = 1 $\mathrm{\mu m^2/s}$
'
,
[
1
,
40
],
c
=
'
grey
'
)
plt
.
annotate
(
'
$D_{out}$/P = 1 $\mathrm{\mu m^2/s}$
'
,
[
1
,
40
],
c
=
'
grey
'
)
plt
.
xticks
([
1
,
10
,
100
]);
plt
.
xticks
([
1
,
10
,
100
]);
save_nice_fig
(
fol
+
'
Fig4/D_vs_P.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/D_vs_P.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: Cost function**
**Panel: Cost function**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
P_Cost
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Cost_220121.csv
'
,
delimiter
=
'
,
'
)
P_Cost
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Cost_220121.csv
'
,
delimiter
=
'
,
'
)
nice_fig
(
'
Partition coefficient $P$
'
,
'
$Cost_\mathrm{min} (P)$ [a.u.]
'
,
[
0.9
,
320
],
[
0.000000001
,
0.01
],
[
2.3
,
2
])
nice_fig
(
'
Partition coefficient $P$
'
,
'
$Cost_\mathrm{min} (P)$ [a.u.]
'
,
[
0.9
,
320
],
[
0.000000001
,
0.01
],
[
2.3
,
2
])
lines
=
plt
.
loglog
(
P_Cost
[
0
,
:],
P_Cost
[
1
:,
:].
transpose
())
lines
=
plt
.
loglog
(
P_Cost
[
0
,
:],
P_Cost
[
1
:,
:].
transpose
())
# plt.legend([lines[2], lines[0], lines[3], lines[1]],
# plt.legend([lines[2], lines[0], lines[3], lines[1]],
# ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,
# ['0.2', '0.02', '0.0067', '0.00067'], ncol=2, frameon=False,
# title=r'$D_\mathrm{out}$/P set to:', columnspacing=0.5, labelspacing=0.3,
# title=r'$D_\mathrm{out}$/P set to:', columnspacing=0.5, labelspacing=0.3,
# loc=(0.081, 0), handletextpad=0.4, handlelength=0.5)
# loc=(0.081, 0), handletextpad=0.4, handlelength=0.5)
plt
.
xticks
([
1
,
10
,
100
]);
plt
.
xticks
([
1
,
10
,
100
]);
save_nice_fig
(
fol
+
'
Fig4/D_vs_Cost.pdf
'
)
#
save_nice_fig(fol+'Fig4/D_vs_Cost.pdf')
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
P_Cost
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Cost_220121.csv
'
,
delimiter
=
'
,
'
)
P_Cost
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Cost_220121.csv
'
,
delimiter
=
'
,
'
)
nice_fig
(
'
Partition coefficient $P$
'
,
'
$Cost_\mathrm{min} (P)$ [a.u.]
'
,
[
0.9
,
100
],
[
0
,
2
],
[
2.3
,
2
])
nice_fig
(
'
Partition coefficient $P$
'
,
'
$Cost_\mathrm{min} (P)$ [a.u.]
'
,
[
0.9
,
100
],
[
0
,
2
],
[
2.3
,
2
])
lines
=
plt
.
plot
(
P_Cost
[
0
],
P_Cost
[
1
:].
transpose
()
/
[
x
[
0
]
for
x
in
P_Cost
[
1
:]])
lines
=
plt
.
plot
(
P_Cost
[
0
],
P_Cost
[
1
:].
transpose
()
/
[
x
[
0
]
for
x
in
P_Cost
[
1
:]])
plt
.
gca
().
set_xscale
(
'
log
'
)
plt
.
gca
().
set_xscale
(
'
log
'
)
plt
.
plot
([
150
,
150
],
[
0
,
1
],
'
--
'
,
lw
=
2
,
c
=
grey
)
plt
.
plot
([
150
,
150
],
[
0
,
1
],
'
--
'
,
lw
=
2
,
c
=
grey
)
save_nice_fig
(
fol
+
'
Fig4/D_vs_Cost_single.pdf
'
)
#
save_nice_fig(fol+'Fig4/D_vs_Cost_single.pdf')
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: Valley in parameter space**
**Panel: Valley in parameter space**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
con
=
np
.
loadtxt
(
fol
+
'
Fig4/Valley_220121.csv
'
,
delimiter
=
'
,
'
)
con
=
np
.
loadtxt
(
fol
+
'
Fig4/Valley_220121.csv
'
,
delimiter
=
'
,
'
)
levels
=
MaxNLocator
(
nbins
=
100
).
tick_values
(
np
.
log10
(
con
[:,
2
:].
min
()),
np
.
log10
(
con
[:,
2
:].
max
()))
levels
=
MaxNLocator
(
nbins
=
100
).
tick_values
(
np
.
log10
(
con
[:,
2
:].
min
()),
np
.
log10
(
con
[:,
2
:].
max
()))
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out} \;[\mathrm{\mu m^2 s^{-1}}]$
'
,
[
1
,
3
],
[
-
2
,
1
],
[
2.3
,
2
])
nice_fig
(
'
Partition coefficient $P$
'
,
'
$D_\mathrm{out} \;[\mathrm{\mu m^2 s^{-1}}]$
'
,
[
1
,
3
],
[
-
2
,
1
],
[
2.3
,
2
])
CS
=
plt
.
contourf
(
np
.
log10
(
con
[:,
0
]),
np
.
log10
(
con
[:,
1
]),
np
.
log10
(
con
[:,
2
:]),
levels
=
levels
,
cmap
=
cm
.
coolwarm
)
CS
=
plt
.
contourf
(
np
.
log10
(
con
[:,
0
]),
np
.
log10
(
con
[:,
1
]),
np
.
log10
(
con
[:,
2
:]),
levels
=
levels
,
cmap
=
cm
.
coolwarm
)
plt
.
plot
(
np
.
log10
(
150
),
np
.
log10
(
10
**-
1
),
'
d
'
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Initial Simul.
'
,
markersize
=
6
)
plt
.
plot
(
np
.
log10
(
150
),
np
.
log10
(
10
**-
1
),
'
o
'
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Reference Simulation
'
,
mfc
=
'
none
'
,
markersize
=
8
)
le
=
plt
.
legend
(
loc
=
(
0
,
0.83
),
frameon
=
False
,
handletextpad
=
0.
4
)
le
=
plt
.
legend
(
loc
=
(
0
,
0.83
),
frameon
=
False
,
handletextpad
=
0.
2
)
# plt.plot(np.log10(P_Do[0, :]), np.log10(P_Do[2, :].transpose()), '--', c=green, lw = 1)
# plt.plot(np.log10(P_Do[0, :]), np.log10(P_Do[2, :].transpose()), '--', c=green, lw = 1)
le
.
get_texts
()[
0
].
set_color
(
'
white
'
)
le
.
get_texts
()[
0
].
set_color
(
'
white
'
)
plt
.
xticks
([
1
,
2
,
3
],
[
'
$10^1$
'
,
'
$10^2$
'
,
'
$10^3$
'
])
plt
.
xticks
([
1
,
2
,
3
],
[
'
$10^1$
'
,
'
$10^2$
'
,
'
$10^3$
'
])
plt
.
yticks
([
-
2
,
-
1
,
0
,
1
],
[
'
$10^{-2}$
'
,
'
$10^{-1}$
'
,
'
$10^0$
'
,
'
$10^1$
'
])
plt
.
yticks
([
-
2
,
-
1
,
0
,
1
],
[
'
$10^{-2}$
'
,
'
$10^{-1}$
'
,
'
$10^0$
'
,
'
$10^1$
'
])
plt
.
tick_params
(
'
x
'
,
pad
=
5
)
plt
.
tick_params
(
'
x
'
,
pad
=
5
)
fig1
=
plt
.
gcf
()
fig1
=
plt
.
gcf
()
clb
=
fig1
.
colorbar
(
CS
,
ticks
=
[
0
,
-
2
,
-
4
,
-
6
])
clb
=
fig1
.
colorbar
(
CS
,
ticks
=
[
0
,
-
2
,
-
4
,
-
6
])
clb
.
ax
.
set_title
(
'
Cost
'
)
clb
.
ax
.
set_title
(
'
Cost
'
)
save_nice_fig
(
fol
+
'
Fig4/Sim_D_out_P.pdf
'
)
save_nice_fig
(
fol
+
'
Fig4/Sim_D_out_P.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
**Panel: Zoom in for valley in parameter space**
**Panel: Zoom in for valley in parameter space**
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# levels = MaxNLocator(nbins=15).tick_values(np.log10(con[:, 2:].min()), np.log10(con[:, 2:].max()))
# levels = MaxNLocator(nbins=15).tick_values(np.log10(con[:, 2:].min()), np.log10(con[:, 2:].max()))
nice_fig
(
'
Partition coefficient $P$
'
,
''
,
[
1.9
,
2.4
],
[
-
1.5
,
-
0.5
],
[
2.3
,
2
])
nice_fig
(
'
Partition coefficient $P$
'
,
''
,
[
1.9
,
2.4
],
[
-
1.5
,
-
0.5
],
[
2.3
,
2
])
CS
=
plt
.
contourf
(
np
.
log10
(
con
[
16
:
-
27
,
0
]),
np
.
log10
(
con
[
16
:
-
27
,
1
]),
CS
=
plt
.
contourf
(
np
.
log10
(
con
[
16
:
-
27
,
0
]),
np
.
log10
(
con
[
16
:
-
27
,
1
]),
np
.
log10
(
con
[
16
:
-
27
,
2
+
16
:
-
27
]),
levels
=
levels
,
np
.
log10
(
con
[
16
:
-
27
,
2
+
16
:
-
27
]),
levels
=
levels
,
cmap
=
cm
.
coolwarm
,
vmax
=-
1.5
)
cmap
=
cm
.
coolwarm
,
vmax
=-
1.5
)
plt
.
plot
(
np
.
log10
(
150
),
np
.
log10
(
10
**-
1
),
'
d
'
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Initial Simul.
'
,
markersize
=
6
)
plt
.
plot
(
np
.
log10
(
150
),
np
.
log10
(
10
**-
1
),
'
d
'
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Initial Simul.
'
,
markersize
=
6
)
le
=
plt
.
legend
(
loc
=
(
0
,
0.83
),
frameon
=
False
,
handletextpad
=
0.4
)
le
=
plt
.
legend
(
loc
=
(
0
,
0.83
),
frameon
=
False
,
handletextpad
=
0.4
)
le
.
get_texts
()[
0
].
set_color
(
'
white
'
)
le
.
get_texts
()[
0
].
set_color
(
'
white
'
)
plt
.
xticks
([
2
,
2.25
],
[
'
$10^2$
'
,
'
$10^{2.25}$
'
])
plt
.
xticks
([
2
,
2.25
],
[
'
$10^2$
'
,
'
$10^{2.25}$
'
])
plt
.
yticks
([
-
1.5
,
-
1
,
-
0.5
],
[
'
$10^{-1.5}$
'
,
'
$10^{-1}$
'
,
'
$10^{-0.5}$
'
])
plt
.
yticks
([
-
1.5
,
-
1
,
-
0.5
],
[
'
$10^{-1.5}$
'
,
'
$10^{-1}$
'
,
'
$10^{-0.5}$
'
])
plt
.
tick_params
(
'
x
'
,
pad
=
5
)
plt
.
tick_params
(
'
x
'
,
pad
=
5
)
fig1
=
plt
.
gcf
()
fig1
=
plt
.
gcf
()
clb
=
fig1
.
colorbar
(
CS
,
ticks
=
[
-
2
,
-
4
,
-
6
])
clb
=
fig1
.
colorbar
(
CS
,
ticks
=
[
-
2
,
-
4
,
-
6
])
clb
.
ax
.
set_title
(
'
Cost
'
)
clb
.
ax
.
set_title
(
'
Cost
'
)
# save_nice_fig(fol+'Fig4/Sim_D_out_P_inset.pdf')
# save_nice_fig(fol+'Fig4/Sim_D_out_P_inset.pdf')
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
con_fine
=
np
.
loadtxt
(
fol
+
'
Fig4/Valley_fine_210121.csv
'
,
delimiter
=
'
,
'
)
con_fine
=
np
.
loadtxt
(
fol
+
'
Fig4/Valley_fine_210121.csv
'
,
delimiter
=
'
,
'
)
# nice_fig('Partition coefficient $P$', '', [2.172, 2.1795], [-1.005,-0.9955], [2.3,2])
# nice_fig('Partition coefficient $P$', '', [2.172, 2.1795], [-1.005,-0.9955], [2.3,2])
P
=
np
.
log10
(
con_fine
[:,
0
])
P
=
np
.
log10
(
con_fine
[:,
0
])
D_o
=
np
.
log10
(
con_fine
[:,
1
])
D_o
=
np
.
log10
(
con_fine
[:,
1
])
fval
=
np
.
log10
(
con_fine
[:,
2
])
fval
=
np
.
log10
(
con_fine
[:,
2
])
# levels = np.linspace(-fval.max(), -fval.min(), 100)
# levels = np.linspace(-fval.max(), -fval.min(), 100)
levels
=
MaxNLocator
(
nbins
=
50
).
tick_values
(
fval
.
min
(),
fval
.
max
())
levels
=
MaxNLocator
(
nbins
=
50
).
tick_values
(
fval
.
min
(),
fval
.
max
())
plt
.
plot
(
np
.
log10
(
150
),
np
.
log10
(
10
**-
1
),
'
d
'
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Initial Simul.
'
,
markersize
=
6
)
plt
.
plot
(
np
.
log10
(
150
),
np
.
log10
(
10
**-
1
),
'
d
'
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Initial Simul.
'
,
markersize
=
6
)
cs
=
plt
.
tricontourf
(
P
,
D_o
,
-
fval
,
levels
=
np
.
flip
(
-
levels
))
cs
=
plt
.
tricontourf
(
P
,
D_o
,
-
fval
,
levels
=
np
.
flip
(
-
levels
))
plt
.
yticks
([
-
1.005
,
-
1
,
-
0.996
],
[
'
$10^{-1.005}$
'
,
'
$10^{-1}$
'
,
'
$10^{-0.996}$
'
],
rotation
=
30
)
plt
.
yticks
([
-
1.005
,
-
1
,
-
0.996
],
[
'
$10^{-1.005}$
'
,
'
$10^{-1}$
'
,
'
$10^{-0.996}$
'
],
rotation
=
30
)
plt
.
xticks
([
2.173
,
2.178
],
[
'
$10^{2.173}$
'
,
'
$10^{2.178}$
'
])
plt
.
xticks
([
2.173
,
2.178
],
[
'
$10^{2.173}$
'
,
'
$10^{2.178}$
'
])
plt
.
tick_params
(
axis
=
'
x
'
,
direction
=
'
out
'
,
which
=
'
minor
'
,
length
=
10
)
plt
.
tick_params
(
axis
=
'
x
'
,
direction
=
'
out
'
,
which
=
'
minor
'
,
length
=
10
)
fig1
=
plt
.
gcf
()
fig1
=
plt
.
gcf
()
clb
=
fig1
.
colorbar
(
cs
,
ticks
=
[
5
,
7
,
9
,
11
])
clb
=
fig1
.
colorbar
(
cs
,
ticks
=
[
5
,
7
,
9
,
11
])
clb
.
ax
.
set_title
(
'
Cost
'
)
clb
.
ax
.
set_title
(
'
Cost
'
)
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Figure: supplement. Scaling at early and late times
### Figure: supplement. Scaling at early and late times
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
scal1
=
np
.
loadtxt
(
'
scaling_test_1.csv
'
,
delimiter
=
'
,
'
)
scal1
=
np
.
loadtxt
(
'
scaling_test_1.csv
'
,
delimiter
=
'
,
'
)
scal2
=
np
.
loadtxt
(
'
scaling_test_2.csv
'
,
delimiter
=
'
,
'
)
scal2
=
np
.
loadtxt
(
'
scaling_test_2.csv
'
,
delimiter
=
'
,
'
)
scal3
=
np
.
loadtxt
(
'
scaling_test_3.csv
'
,
delimiter
=
'
,
'
)
scal3
=
np
.
loadtxt
(
'
scaling_test_3.csv
'
,
delimiter
=
'
,
'
)
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
red
,
alpha
=
0.3
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
red
,
alpha
=
0.3
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
green
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
green
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
[
0
,
2
],
[
0
,
1
],
[
3
,
2
])
[
0
,
2
],
[
0
,
1
],
[
3
,
2
])
plt
.
legend
([
s1
[
0
],
s2
[
0
],
s3
[
0
]],
[
'
Reference
'
,
'
$D_\mathrm{out}\propto P^2$
'
,
plt
.
legend
([
s1
[
0
],
s2
[
0
],
s3
[
0
]],
[
'
Reference
'
,
'
$D_\mathrm{out}\propto P^2$
'
,
'
$D_\mathrm{out}\propto P$
'
],
frameon
=
False
,
'
$D_\mathrm{out}\propto P$
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.57
,
0.5
))
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.57
,
0.5
))
save_nice_fig
(
fol
+
'
Supp/scal_late.pdf
'
)
save_nice_fig
(
fol
+
'
Supp/scal_late.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
red
,
alpha
=
0.3
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
red
,
alpha
=
0.3
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
green
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
14
::
2
],
'
-
'
,
lw
=
1
,
c
=
green
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
[
0
,
1.2
],
[
0.35
,
1
],
[
3
,
2
])
[
0
,
1.2
],
[
0.35
,
1
],
[
3
,
2
])
save_nice_fig
(
fol
+
'
Supp/scal_late_zoom.pdf
'
)
save_nice_fig
(
fol
+
'
Supp/scal_late_zoom.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
2
:
10
:
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
2
:
10
:
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
2
:
10
:
2
],
'
-
'
,
lw
=
1
,
c
=
red
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
2
:
10
:
2
],
'
-
'
,
lw
=
1
,
c
=
red
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
2
:
10
:
2
],
'
-
'
,
lw
=
1
,
c
=
green
,
alpha
=
0.4
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
2
:
10
:
2
],
'
-
'
,
lw
=
1
,
c
=
green
,
alpha
=
0.4
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
[
0
,
2
],
[
0
,
1
],
[
3
,
2
])
[
0
,
2
],
[
0
,
1
],
[
3
,
2
])
plt
.
legend
([
s1
[
0
],
s2
[
0
],
s3
[
0
]],
[
'
Reference
'
,
'
$D_\mathrm{out}\propto P^2$
'
,
plt
.
legend
([
s1
[
0
],
s2
[
0
],
s3
[
0
]],
[
'
Reference
'
,
'
$D_\mathrm{out}\propto P^2$
'
,
'
$D_\mathrm{out}\propto P$
'
],
frameon
=
False
,
'
$D_\mathrm{out}\propto P$
'
],
frameon
=
False
,
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.57
,
0.54
))
fontsize
=
9
,
handletextpad
=
0.4
,
handlelength
=
0.8
,
loc
=
(
0.57
,
0.54
))
save_nice_fig
(
fol
+
'
Supp/scal_early.pdf
'
)
save_nice_fig
(
fol
+
'
Supp/scal_early.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
4
:
11
:
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Original
'
)
s1
=
plt
.
plot
(
scal1
[:,
0
],
scal1
[:,
4
:
11
:
2
],
'
-
'
,
lw
=
1
,
c
=
dark_grey
,
label
=
'
Original
'
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
4
:
11
:
2
],
'
-
'
,
lw
=
1
,
c
=
red
,
label
=
'
Original
'
)
s2
=
plt
.
plot
(
scal2
[:,
0
],
scal2
[:,
4
:
11
:
2
],
'
-
'
,
lw
=
1
,
c
=
red
,
label
=
'
Original
'
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
4
:
11
:
2
],
'
-
'
,
lw
=
1
,
c
=
green
,
label
=
'
Original
'
,
alpha
=
0.4
)
s3
=
plt
.
plot
(
scal3
[:,
0
],
scal3
[:,
4
:
11
:
2
],
'
-
'
,
lw
=
1
,
c
=
green
,
label
=
'
Original
'
,
alpha
=
0.4
)
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
nice_fig
(
'
radial distance $r$ [$\mathrm{\mu m}$]
'
,
'
intensity [a.u]
'
,
[
0.97
,
1.03
],
[
0
,
0.35
],
[
3
,
2
])
[
0.97
,
1.03
],
[
0
,
0.35
],
[
3
,
2
])
save_nice_fig
(
fol
+
'
Supp/scal_early_zoom.pdf
'
)
save_nice_fig
(
fol
+
'
Supp/scal_early_zoom.pdf
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment