Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Track Analyzer
track-analyzer
Commits
c4ff545b
Commit
c4ff545b
authored
Apr 28, 2022
by
amichaut
Browse files
tifffile.imsave to imwrite
parent
2ca465b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
track_analyzer/plotting.py
View file @
c4ff545b
...
...
@@ -95,7 +95,7 @@ def stack_max_proj(image_fn, z_dim, t_dim=None):
new_im
[
i
]
=
np
.
max
(
im
[
i
],
axis
=
0
)
fn
,
file_ext
=
osp
.
splitext
(
image_fn
)
out_fn
=
fn
+
'_maxproj.tif'
tifff
.
im
sav
e
(
out_fn
,
new_im
)
tifff
.
im
writ
e
(
out_fn
,
new_im
)
def
plot_cmap
(
plot_dir
,
label
,
cmap
,
vmin
,
vmax
,
plot_config
=
None
,
suffix
=
''
):
...
...
@@ -1028,7 +1028,7 @@ def plot_all_traj(data_dir, df, image={'image_fn': None, 't_dim': None, 'z_dim':
if
save_as_stack
:
stack
=
np
.
array
(
stack
)
tifff
.
im
sav
e
(
osp
.
join
(
plot_dir
,
'traj.tiff'
),
stack
)
tifff
.
im
writ
e
(
osp
.
join
(
plot_dir
,
'traj.tiff'
),
stack
)
def
plot_all_scalar_fields
(
data_dir
,
df
,
data
,
field
,
image
=
{
'image_fn'
:
None
,
't_dim'
:
None
,
'z_dim'
:
None
},
...
...
@@ -1080,7 +1080,7 @@ def plot_all_scalar_fields(data_dir, df, data, field, image={'image_fn': None, '
if
save_as_stack
:
stack
=
np
.
array
(
stack
)
tifff
.
im
sav
e
(
osp
.
join
(
plot_dir
,
field
+
'.tiff'
),
stack
)
tifff
.
im
writ
e
(
osp
.
join
(
plot_dir
,
field
+
'.tiff'
),
stack
)
...
...
@@ -1136,7 +1136,7 @@ def plot_all_vector_fields(data_dir, df, data, field, plot_on_field=None, dim=3,
if
save_as_stack
:
stack
=
np
.
array
(
stack
)
tifff
.
im
sav
e
(
osp
.
join
(
plot_dir
,
'vector_'
+
field
+
'.tiff'
),
stack
)
tifff
.
im
writ
e
(
osp
.
join
(
plot_dir
,
'vector_'
+
field
+
'.tiff'
),
stack
)
def
plot_all_Voronoi
(
data_dir
,
df
,
data
,
show_local_area
=
True
,
df_mean
=
None
,
image
=
{
'image_fn'
:
None
,
't_dim'
:
None
,
'z_dim'
:
None
},
...
...
@@ -1208,7 +1208,7 @@ def plot_all_Voronoi(data_dir, df, data, show_local_area=True, df_mean = None,
if
save_as_stack
:
stack
=
np
.
array
(
stack
)
tifff
.
im
sav
e
(
osp
.
join
(
plot_dir
,
'voronoi.tiff'
),
stack
)
tifff
.
im
writ
e
(
osp
.
join
(
plot_dir
,
'voronoi.tiff'
),
stack
)
def
plot_all_MSD
(
data_dir
,
df
=
None
,
df_out
=
None
,
fit_model
=
"biased_diff"
,
msd_all
=
None
,
refresh
=
False
,
hue
=
None
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment