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
1f5331db
Commit
1f5331db
authored
4 years ago
by
Lars Hubatsch
Browse files
Options
Downloads
Patches
Plain Diff
Plotting: adding first Fig4 panels.
parent
fce1407c
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
+70
-3
70 additions, 3 deletions
Plots_Droplet_FRAP.ipynb
with
70 additions
and
3 deletions
Plots_Droplet_FRAP.ipynb
+
70
−
3
View file @
1f5331db
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
"sns.set_style(\"ticks\")\n",
"sns.set_style(\"ticks\")\n",
"rcParams['axes.linewidth'] = 0.75\n",
"rcParams['axes.linewidth'] = 0.75\n",
"rcParams['xtick.major.width'] = 0.75\n",
"rcParams['xtick.major.width'] = 0.75\n",
"rcParams['ytick.major.width'] = 0.75"
"rcParams['ytick.major.width'] = 0.75\n",
"rcParams['text.usetex']=True"
]
]
},
},
{
{
...
@@ -39,7 +40,8 @@
...
@@ -39,7 +40,8 @@
"pl.rcParams.update(params)\n",
"pl.rcParams.update(params)\n",
"\n",
"\n",
"def nice_fig(xla, yla, xli, yli, size, fs=12): \n",
"def nice_fig(xla, yla, xli, yli, size, fs=12): \n",
" rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})\n",
"# rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})\n",
" rc('font',**{'family':'serif','serif':['Palatino']})\n",
" plt.gcf().set_size_inches(size[0], size[1])\n",
" plt.gcf().set_size_inches(size[0], size[1])\n",
" plt.xlabel(xla,fontsize=fs) \n",
" plt.xlabel(xla,fontsize=fs) \n",
" plt.ylabel(yla,fontsize=fs)\n",
" plt.ylabel(yla,fontsize=fs)\n",
...
@@ -296,7 +298,7 @@
...
@@ -296,7 +298,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"## Figure 1:"
"##
#
Figure 1:
Fitting $D_{in}$ and data analysis.
"
]
]
},
},
{
{
...
@@ -448,6 +450,71 @@
...
@@ -448,6 +450,71 @@
"save_nice_fig(fol+'Fig1/tot_recov.pdf')"
"save_nice_fig(fol+'Fig1/tot_recov.pdf')"
]
]
},
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Figure 4: Obtaining info about outside."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Panel: Partitioning vs. $D_{out}$, showcasing four different simulation start cases.**"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"P_Do = np.loadtxt(fol+'/Fig4/Part_vs_Do.csv', delimiter=',')\n",
"P = [5, 150, 5, 150]\n",
"D_o = [0.1, 0.1, 1, 1]\n",
"plt.gca().set_prop_cycle(None)\n",
"nice_fig('Partitioning P', '$D_{out}$ [$\\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",
"plt.plot(P_Do[0, :], P_Do[0, :], '--', c='grey')\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'\\underline{$D_{out}$/P [$\\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",
"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 $\\mu m^2/s$', [1,40], c='grey')\n",
"plt.xticks([1, 10, 100]);\n",
"save_nice_fig(fol+'Fig4/D_vs_P.pdf')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Panel: Cost function**"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"P_Cost = np.loadtxt(fol+'/Fig4/Part_vs_Cost.csv', delimiter=',')\n",
"nice_fig('Partitioning P', 'Cost function [a.u.]', [0.9,320], [0.000000001,0.01], [2.3,2])\n",
"lines = plt.loglog(P_Cost[0, :], P_Cost[1:, :].transpose())\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'\\underline{$D_{out}$/P set to:}', columnspacing=0.5, labelspacing=0.3,\n",
" loc=(0.081, 0), handletextpad=0.4, handlelength=0.5)\n",
"plt.xticks([1, 10, 100]);\n",
"save_nice_fig(fol+'Fig4/D_vs_Cost.pdf')"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
...
...
%% 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
from
fem_sol
import
frap_solver
from
fem_sol
import
frap_solver
from
matplotlib
import
rc
,
rcParams
from
matplotlib
import
rc
,
rcParams
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
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
```
```
%% 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
'
]})
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
):
def
save_nice_fig
(
name
):
plt
.
savefig
(
name
,
format
=
'
pdf
'
,
dpi
=
300
,
bbox_inches
=
'
tight
'
,
plt
.
savefig
(
name
,
format
=
'
pdf
'
,
dpi
=
300
,
bbox_inches
=
'
tight
'
,
transparent
=
True
)
transparent
=
True
)
```
```
%% 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.5
],
[
4
,
3.5
,
0.5
],
[
3.5
,
4
,
0.5
],
[
4.5
,
4
,
0.5
]],
point_lists
=
[[[
4
,
4.5
,
0.5
],
[
4
,
3.5
,
0.5
],
[
3.5
,
4
,
0.5
],
[
4.5
,
4
,
0.5
]],
[[
4
,
5
,
0.5
],
[
4
,
3
,
0.5
],
[
3
,
4
,
0.5
],
[
5
,
4
,
0.5
]],
[[
4
,
5
,
0.5
],
[
4
,
3
,
0.5
],
[
3
,
4
,
0.5
],
[
5
,
4
,
0.5
]],
[[
4
,
5.5
,
0.5
],
[
4
,
2.5
,
0.5
],
[
2.5
,
4
,
0.5
],
[
5.5
,
4
,
0.5
]],
[[
4
,
5.5
,
0.5
],
[
4
,
2.5
,
0.5
],
[
2.5
,
4
,
0.5
],
[
5.5
,
4
,
0.5
]],
[[
4
,
4.5
,
0.5
],
[
4
,
3.5
,
0.5
],
[
3.5
,
4
,
0.5
],
[
4.5
,
4
,
0.5
]],
[[
4
,
4.5
,
0.5
],
[
4
,
3.5
,
0.5
],
[
3.5
,
4
,
0.5
],
[
4.5
,
4
,
0.5
]],
[[
4
,
5
,
0.5
],
[
4
,
3
,
0.5
],
[
3
,
4
,
0.5
],
[
5
,
4
,
0.5
]],
[[
4
,
5
,
0.5
],
[
4
,
3
,
0.5
],
[
3
,
4
,
0.5
],
[
5
,
4
,
0.5
]],
[[
4
,
5.5
,
0.5
],
[
4
,
2.5
,
0.5
],
[
2.5
,
4
,
0.5
],
[
5.5
,
4
,
0.5
]]]
[[
4
,
5.5
,
0.5
],
[
4
,
2.5
,
0.5
],
[
2.5
,
4
,
0.5
],
[
5.5
,
4
,
0.5
]]]
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.5
],
m
,
name
=
'
FRAP_multi_
'
+
m
[:
-
4
]
+
str
(
G_i
),
point_list
=
p
,
f
=
frap_solver
([
4
,
4
,
0.5
],
m
,
name
=
'
FRAP_multi_
'
+
m
[:
-
4
]
+
str
(
G_i
),
point_list
=
p
,
T
=
50
,
phi_tot_int
=
p_i
,
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
G_out
=
G_o
)
T
=
50
,
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
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
)
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
(
50
):
for
j
in
range
(
50
):
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
)
for
n
in
ns
:
for
n
in
ns
:
values
.
append
([
fs
([
4
,
4
,
0.5
]
+
e
*
n
)
for
e
in
eps
])
values
.
append
([
fs
([
4
,
4
,
0.5
]
+
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
np
.
savetxt
(
'
t_p.csv
'
,
profs
,
delimiter
=
'
,
'
)
np
.
savetxt
(
'
t_p.csv
'
,
profs
,
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
(
'
t [s]
'
,
'
intensity (a.u)
'
,
[
0
,
50
],
[
0
,
1.1
],
[
1.5
,
2
])
nice_fig
(
'
t [s]
'
,
'
intensity (a.u)
'
,
[
0
,
50
],
[
0
,
1.1
],
[
1.5
,
2
])
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
0
].
phi_tot_int
for
x
in
profs
[
0
]],
plt
.
plot
([
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
.
mean
(
x
)
/
f_i
[
1
].
phi_tot_int
for
x
in
profs
[
1
]],
plt
.
plot
([
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
.
mean
(
x
)
/
f_i
[
2
].
phi_tot_int
for
x
in
profs
[
2
]],
plt
.
plot
([
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
(
'
$\Phi_{out}=0.01}$
'
,
size
=
12
)
plt
.
title
(
'
$\Phi_{out}=0.01}$
'
,
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
(
'
t [s]
'
,
'
intensity (a.u)
'
,
[
0
,
30
],
[
0
,
1.1
],
[
1.5
,
2
])
nice_fig
(
'
t [s]
'
,
'
intensity (a.u)
'
,
[
0
,
30
],
[
0
,
1.1
],
[
1.5
,
2
])
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
3
].
phi_tot_int
for
x
in
profs
[
3
]],
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
3
].
phi_tot_int
for
x
in
profs
[
3
]],
lw
=
2
,
label
=
'
d=0.5
'
,
ls
=
'
-
'
)
lw
=
2
,
label
=
'
d=0.5
'
,
ls
=
'
-
'
)
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
4
].
phi_tot_int
for
x
in
profs
[
4
]],
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
4
].
phi_tot_int
for
x
in
profs
[
4
]],
lw
=
2
,
label
=
'
d=1
'
,
ls
=
'
--
'
)
lw
=
2
,
label
=
'
d=1
'
,
ls
=
'
--
'
)
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
5
].
phi_tot_int
for
x
in
profs
[
5
]],
plt
.
plot
([
np
.
mean
(
x
)
/
f_i
[
5
].
phi_tot_int
for
x
in
profs
[
5
]],
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
(
'
$\Phi_{out}=0.1}$
'
,
size
=
12
)
plt
.
title
(
'
$\Phi_{out}=0.1}$
'
,
size
=
12
)
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
)
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
)
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
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
0.25
],
[
0
,
1.1
],
[
3.8
,
2
])
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
0.25
],
[
0
,
1.1
],
[
3.8
,
2
])
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs
[
0
])[:,::
8
]
/
f_i
[
0
].
phi_tot_int
,
'
#1f77b4
'
,
lw
=
2.5
)
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs
[
0
])[:,::
8
]
/
f_i
[
0
].
phi_tot_int
,
'
#1f77b4
'
,
lw
=
2.5
)
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
)[:,::
8
],
l_fit
=
plt
.
plot
(
np
.
linspace
(
0
,
0.23
,
100
),
np
.
transpose
(
ml
)[:,::
8
],
ls
=
'
--
'
,
c
=
'
orange
'
,
lw
=
1.5
)
ls
=
'
--
'
,
c
=
'
orange
'
,
lw
=
1.5
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Simulation
'
,
'
Fit
'
],
prop
=
{
'
size
'
:
9
},
frameon
=
False
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Simulation
'
,
'
Fit
'
],
prop
=
{
'
size
'
:
9
},
frameon
=
False
)
save_nice_fig
(
fol
+
'
Fig3/spat_recov_neighbours.pdf
'
)
save_nice_fig
(
fol
+
'
Fig3/spat_recov_neighbours.pdf
'
)
```
```
%% 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.5
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
],
point_list
=
[[
4
,
4
,
0.5
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
],
[
4
,
4
,
0.5
],
[
4
,
4
,
1.5
],
[
4
,
4
,
4
]]
[
4
,
4
,
0.5
],
[
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
in
zip
(
point_list
,
me
,
phi_tot_int
,
for
p
,
m
,
p_i
,
p_e
,
G_i
,
G_o
in
zip
(
point_list
,
me
,
phi_tot_int
,
phi_tot_ext
,
G_in
,
G_out
):
phi_tot_ext
,
G_in
,
G_out
):
f_cs
.
append
(
frap_solver
(
p
,
'
Meshes/single_drop_
'
+
m
,
f_cs
.
append
(
frap_solver
(
p
,
'
Meshes/single_drop_
'
+
m
,
name
=
'
FRAP_
'
+
m
[:
-
4
]
+
str
(
G_i
),
T
=
60
,
phi_tot_int
=
p_i
,
name
=
'
FRAP_
'
+
m
[:
-
4
]
+
str
(
G_i
),
T
=
60
,
phi_tot_int
=
p_i
,
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
G_out
=
G_o
))
phi_tot_ext
=
p_e
,
G_in
=
G_i
,
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.5
,
1.5
,
4
,
0.5
,
1.5
,
4
]
z
=
[
0.5
,
1.5
,
4
,
0.5
,
1.5
,
4
]
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
(
50
):
for
j
in
range
(
50
):
values
=
[]
values
=
[]
fs
=
fem_utils
.
load_time_point
(
f_cs
[
i
].
name
+
'
t_p_
'
+
str
(
j
)
+
'
.h5
'
,
fs
=
fem_utils
.
load_time_point
(
f_cs
[
i
].
name
+
'
t_p_
'
+
str
(
j
)
+
'
.h5
'
,
f_cs
[
i
].
mesh
)
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
np
.
savetxt
(
'
t_p_neighbours.csv
'
,
profs_cs
[
0
],
delimiter
=
'
,
'
)
np
.
savetxt
(
'
t_p_neighbours.csv
'
,
profs_cs
[
0
],
delimiter
=
'
,
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
nice_fig
(
'
t [s]
'
,
''
,
[
0
,
50
],
[
0
,
1.1
],
[
1.5
,
2
])
nice_fig
(
'
t [s]
'
,
''
,
[
0
,
50
],
[
0
,
1.1
],
[
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
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
]],
plt
.
plot
([
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
(
'
$\Phi_{out}=0.01}$
'
,
size
=
12
)
plt
.
title
(
'
$\Phi_{out}=0.01}$
'
,
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
(
'
t [s]
'
,
'
intensity (a.u)
'
,
[
0
,
30
],
[
0
,
1.1
],
[
1.5
,
2
])
nice_fig
(
'
t [s]
'
,
'
intensity (a.u)
'
,
[
0
,
30
],
[
0
,
1.1
],
[
1.5
,
2
])
ls
=
[
'
-
'
,
'
--
'
,
'
:
'
]
ls
=
[
'
-
'
,
'
--
'
,
'
:
'
]
for
i
,
f
in
enumerate
(
f_cs
[
3
:]):
for
i
,
f
in
enumerate
(
f_cs
[
3
:]):
plt
.
plot
([
np
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
+
3
]],
plt
.
plot
([
np
.
mean
(
x
)
/
f
.
phi_tot_int
for
x
in
profs_cs
[
i
+
3
]],
label
=
'
h=
'
+
str
(
z
[
i
]),
lw
=
2
,
ls
=
ls
[
i
])
label
=
'
h=
'
+
str
(
z
[
i
]),
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
(
'
$\Phi_{out}=0.1}$
'
,
size
=
12
)
plt
.
title
(
'
$\Phi_{out}=0.1}$
'
,
size
=
12
)
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
)
plt
.
legend
(
prop
=
{
'
size
'
:
9
},
frameon
=
False
)
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_neigh.csv
'
,
ml_neigh
=
np
.
loadtxt
(
'
/Users/hubatsch/Desktop/DropletFRAP/matlab_fit_neigh.csv
'
,
delimiter
=
'
,
'
)
delimiter
=
'
,
'
)
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
0.25
],
[
0
,
1.1
],
[
3.8
,
2
])
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
0.25
],
[
0
,
1.1
],
[
3.8
,
2
])
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs_cs
[
0
])[:,::
8
]
/
f_cs
[
0
].
phi_tot_int
,
'
#1f77b4
'
,
l_sim
=
plt
.
plot
(
eps
,
np
.
transpose
(
profs_cs
[
0
])[:,::
8
]
/
f_cs
[
0
].
phi_tot_int
,
'
#1f77b4
'
,
lw
=
2.5
,
label
=
'
Simulation
'
)
lw
=
2.5
,
label
=
'
Simulation
'
)
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
)[:,::
8
],
l_fit
=
plt
.
plot
(
np
.
linspace
(
0
,
0.23
,
100
),
np
.
transpose
(
ml_neigh
)[:,::
8
],
ls
=
'
--
'
,
c
=
'
orange
'
,
lw
=
1.5
)
ls
=
'
--
'
,
c
=
'
orange
'
,
lw
=
1.5
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Simulation
'
,
'
Fit
'
],
frameon
=
False
)
plt
.
legend
([
l_sim
[
0
],
l_fit
[
0
]],
[
'
Simulation
'
,
'
Fit
'
],
frameon
=
False
)
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:
##
#
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
fig
,
ax1
=
plt
.
subplots
()
fig
,
ax1
=
plt
.
subplots
()
ax2
=
ax1
.
twinx
()
ax2
=
ax1
.
twinx
()
plt
.
sca
(
ax1
)
plt
.
sca
(
ax1
)
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.7
)
sns
.
scatterplot
(
x
=
"
conc
"
,
y
=
"
D
"
,
data
=
lars
,
color
=
sns
.
color_palette
()[
1
],
alpha
=
0.7
)
plt
.
xlabel
(
'
$c_{salt}\; [mM]$
'
)
plt
.
xlabel
(
'
$c_{salt}\; [mM]$
'
)
plt
.
ylabel
(
'
$D_{in} \;[\mu m^2\cdot s^{-1}]$
'
,
color
=
sns
.
color_palette
()[
1
])
plt
.
ylabel
(
'
$D_{in} \;[\mu m^2\cdot s^{-1}]$
'
,
color
=
sns
.
color_palette
()[
1
])
plt
.
yticks
([
0
,
0.05
,
0.1
],
rotation
=
90
,
color
=
sns
.
color_palette
()[
1
])
plt
.
yticks
([
0
,
0.05
,
0.1
],
rotation
=
90
,
color
=
sns
.
color_palette
()[
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
=
sns
.
color_palette
()[
0
],
label
=
'
data from ref[xxx]
'
)
sns
.
lineplot
(
x
=
"
conc
"
,
y
=
"
vis
"
,
data
=
louise
,
color
=
sns
.
color_palette
()[
0
],
label
=
'
data from ref[xxx]
'
)
nice_fig
(
'
c_{salt} [mM]
'
,
'
$\eta^{-1} \;[Pa\cdot s]^{-1}$
'
,
[
40
,
190
],
[
0
,
7.24
],
[
2.3
,
2
])
nice_fig
(
'
c_{salt} [mM]
'
,
'
$\eta^{-1} \;[Pa\cdot s]^{-1}$
'
,
[
40
,
190
],
[
0
,
7.24
],
[
2.3
,
2
])
plt
.
yticks
(
color
=
sns
.
color_palette
()[
0
])
plt
.
yticks
(
color
=
sns
.
color_palette
()[
0
])
plt
.
ylabel
(
'
$\eta^{-1} \;[Pa\cdot s]^{-1}$
'
,
color
=
sns
.
color_palette
()[
0
])
plt
.
ylabel
(
'
$\eta^{-1} \;[Pa\cdot s]^{-1}$
'
,
color
=
sns
.
color_palette
()[
0
])
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:
**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
,
jitter
=
0.35
,
alpha
=
0.8
,
**
{
'
marker
'
:
'
.
'
,
'
size
'
:
8
,
'
edgecolor
'
:
'
black
'
,
'
color
'
:
'
k
'
})
sns
.
stripplot
(
data
=
coacervates
,
jitter
=
0.35
,
alpha
=
0.8
,
**
{
'
marker
'
:
'
.
'
,
'
size
'
:
8
,
'
edgecolor
'
:
'
black
'
,
'
color
'
:
'
k
'
})
ax
=
sns
.
barplot
(
data
=
coacervates
,
facecolor
=
(
1
,
1
,
1
,
0
),
edgecolor
=
(
0.6
,
0.6
,
0.6
),
errcolor
=
(
0.6
,
0.6
,
0.6
),
capsize
=
.
2
,
ci
=
'
sd
'
,
errwidth
=
1.5
)
ax
=
sns
.
barplot
(
data
=
coacervates
,
facecolor
=
(
1
,
1
,
1
,
0
),
edgecolor
=
(
0.6
,
0.6
,
0.6
),
errcolor
=
(
0.6
,
0.6
,
0.6
),
capsize
=
.
2
,
ci
=
'
sd
'
,
errwidth
=
1.5
)
plt
.
setp
(
ax
.
lines
,
zorder
=
100
)
plt
.
setp
(
ax
.
lines
,
zorder
=
100
)
nice_fig
(
None
,
'
$D_{in} \;[\mu m^2\cdot s^{-1}]$
'
,
[
None
,
None
],
[
0
,
6
],
[
2.3
,
2
])
nice_fig
(
None
,
'
$D_{in} \;[\mu m^2\cdot s^{-1}]$
'
,
[
None
,
None
],
[
0
,
6
],
[
2.3
,
2
])
plt
.
xticks
([
0
,
1
],
(
'
CMD/PLYS
'
,
'
PLYS/ATP
'
),
rotation
=
20
)
plt
.
xticks
([
0
,
1
],
(
'
CMD/PLYS
'
,
'
PLYS/ATP
'
),
rotation
=
20
)
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:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
ax
.
patches
ax
.
patches
```
```
%% 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.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
CMD_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
l_sim
=
plt
.
plot
(
CMD
[:,
0
],
CMD
[:,
1
:],
'
#1f77b4
'
,
lw
=
3
,
label
=
'
Simulation
'
)
l_sim
=
plt
.
plot
(
CMD
[:,
0
],
CMD
[:,
1
:],
'
#1f77b4
'
,
lw
=
3
,
label
=
'
Simulation
'
)
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
1
:],
'
--
'
,
lw
=
2
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Simulation
'
)
l_fit
=
plt
.
plot
(
CMD_fit
[:,
0
],
CMD_fit
[:,
1
:],
'
--
'
,
lw
=
2
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Simulation
'
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
CMD_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
'
k
'
,
lw
=
2
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
CMD_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
'
k
'
,
lw
=
2
)
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
np
.
max
(
CMD_fit
[:,
0
])],
[
0
,
0.6
],
[
2.3
,
2
])
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
np
.
max
(
CMD_fit
[:,
0
])],
[
0
,
0.6
],
[
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.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
PGL_fit
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_fit_timecourse.csv
'
,
delimiter
=
'
,
'
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
:],
'
#1f77b4
'
,
lw
=
3
,
label
=
'
Simulation
'
)
l_sim
=
plt
.
plot
(
PGL
[:,
0
],
PGL
[:,
1
:],
'
#1f77b4
'
,
lw
=
3
,
label
=
'
Simulation
'
)
l_fit
=
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:,
1
:],
'
--
'
,
lw
=
2
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Simulation
'
)
l_fit
=
plt
.
plot
(
PGL_fit
[:,
0
],
PGL_fit
[:,
1
:],
'
--
'
,
lw
=
2
,
c
=
sns
.
color_palette
()[
1
],
label
=
'
Simulation
'
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
PGL_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
'
k
'
,
lw
=
2
)
plt
.
plot
(
range
(
0
,
10
),
np
.
ones
(
10
)
*
np
.
min
(
PGL_fit
[:,
1
]),
linestyle
=
'
--
'
,
color
=
'
k
'
,
lw
=
2
)
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
None
],
[
2.3
,
2
])
nice_fig
(
'
x [$\mu m$]
'
,
'
intensity (a.u)
'
,
[
0
,
np
.
max
(
PGL_fit
[:,
0
])],
[
0
,
None
],
[
2.3
,
2
])
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_recov.pdf
'
)
save_nice_fig
(
fol
+
'
Fig1/PGL_spat_recov.pdf
'
)
```
```
%% Cell type:markdown id: tags:
%% 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_tot.csv
'
,
delimiter
=
'
,
'
)
PGL
=
np
.
loadtxt
(
fol
+
'
/Fig1/PGL_tot.csv
'
,
delimiter
=
'
,
'
)
ATP
=
np
.
loadtxt
(
fol
+
'
/Fig1/ATP_tot.csv
'
,
delimiter
=
'
,
'
)
ATP
=
np
.
loadtxt
(
fol
+
'
/Fig1/ATP_tot.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_tot.csv
'
,
delimiter
=
'
,
'
)
CMD
=
np
.
loadtxt
(
fol
+
'
/Fig1/CMD_tot.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_{max}$
'
,
'
intensity (a.u)
'
,
[
0
,
200
],
[
0
,
0.62
],
[
2.3
,
2
])
nice_fig
(
'
$t/T_{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:markdown id: tags:
### Figure 4: Obtaining info about outside.
%% Cell type:markdown id: tags:
**Panel: Partitioning vs. $D_{out}$, showcasing four different simulation start cases.**
%% Cell type:code id: tags:
```
python
P_Do
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Do.csv
'
,
delimiter
=
'
,
'
)
P
=
[
5
,
150
,
5
,
150
]
D_o
=
[
0.1
,
0.1
,
1
,
1
]
plt
.
gca
().
set_prop_cycle
(
None
)
nice_fig
(
'
Partitioning P
'
,
'
$D_{out}$ [$\mu m^2/s$]
'
,
[
0.9
,
320
],
[
0.000001
,
340
],
[
2.3
,
2
])
lines
=
plt
.
loglog
(
P_Do
[
0
,
:],
P_Do
[
1
:,
:].
transpose
())
plt
.
plot
(
P_Do
[
0
,
:],
P_Do
[
0
,
:],
'
--
'
,
c
=
'
grey
'
)
plt
.
legend
([
lines
[
2
],
lines
[
0
],
lines
[
3
],
lines
[
1
]],
[
'
0.2
'
,
'
0.02
'
,
'
0.0067
'
,
'
0.00067
'
],
ncol
=
2
,
frameon
=
False
,
title
=
r
'
\underline{$D_{out}$/P [$\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
)
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 $\mu m^2/s$
'
,
[
1
,
40
],
c
=
'
grey
'
)
plt
.
xticks
([
1
,
10
,
100
]);
save_nice_fig
(
fol
+
'
Fig4/D_vs_P.pdf
'
)
```
%% Cell type:markdown id: tags:
**Panel: Cost function**
%% Cell type:code id: tags:
```
python
P_Cost
=
np
.
loadtxt
(
fol
+
'
/Fig4/Part_vs_Cost.csv
'
,
delimiter
=
'
,
'
)
nice_fig
(
'
Partitioning P
'
,
'
Cost function [a.u.]
'
,
[
0.9
,
320
],
[
0.000000001
,
0.01
],
[
2.3
,
2
])
lines
=
plt
.
loglog
(
P_Cost
[
0
,
:],
P_Cost
[
1
:,
:].
transpose
())
plt
.
legend
([
lines
[
2
],
lines
[
0
],
lines
[
3
],
lines
[
1
]],
[
'
0.2
'
,
'
0.02
'
,
'
0.0067
'
,
'
0.00067
'
],
ncol
=
2
,
frameon
=
False
,
title
=
r
'
\underline{$D_{out}$/P set to:}
'
,
columnspacing
=
0.5
,
labelspacing
=
0.3
,
loc
=
(
0.081
,
0
),
handletextpad
=
0.4
,
handlelength
=
0.5
)
plt
.
xticks
([
1
,
10
,
100
]);
save_nice_fig
(
fol
+
'
Fig4/D_vs_Cost.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