Skip to content
GitLab
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
1c5ba0c0
Commit
1c5ba0c0
authored
Apr 28, 2021
by
amichaut
Browse files
improve notebook comments
parent
95ba98a2
Pipeline
#54848
passed with stages
in 10 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
analyze_traj_gui.ipynb
View file @
1c5ba0c0
This diff is collapsed.
Click to expand it.
track_analyzer/plotting.py
View file @
1c5ba0c0
This diff is collapsed.
Click to expand it.
track_analyzer/prepare.py
View file @
1c5ba0c0
...
...
@@ -1301,7 +1301,6 @@ def get_image(data_dir, filename=None, verbose=False):
y_size
,
t_size
,
z_size
))
print
(
"If the time and z dimensions are mixed up, you can swap them."
)
image_dict
=
{
'image_fn'
:
filename
,
't_dim'
:
t_dim
,
'z_dim'
:
z_dim
,
'image_size'
:
im
.
shape
[
-
2
:]}
else
:
...
...
track_analyzer/scripts/analyze_tracks.py
View file @
1c5ba0c0
...
...
@@ -77,7 +77,7 @@ def make_traj_config(data_dir=None,export_config=True):
# list of variables averaged along the whole track to be plotted in histogram
}
centered
_traj_config
=
{
'run'
:
True
,
# run plot_centered_traj
total
_traj_config
=
{
'run'
:
True
,
# run plot_centered_traj
'hide_labels'
:
False
,
# hide trajectory ID
'label_size'
:
5
,
# label size in points if hide_labels is False
'dont_center'
:
False
,
# to keep initial position at its true position
...
...
@@ -93,7 +93,7 @@ def make_traj_config(data_dir=None,export_config=True):
'MSD_config'
:
MSD_config
,
'scatter_config'
:
scatter_config
,
'hist_config'
:
hist_config
,
'
centered
_traj_config'
:
centered
_traj_config
'
total
_traj_config'
:
total
_traj_config
}
if
export_config
:
...
...
@@ -134,7 +134,7 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa
traj_config
=
traj_config_default
if
traj_config
is
None
else
traj_config
# check that all configs are in traj_confign, if not load default
for
key
in
[
"traj_config_"
,
"MSD_config"
,
"scatter_config"
,
"hist_config"
,
"
centered
_traj_config"
]:
for
key
in
[
"traj_config_"
,
"MSD_config"
,
"scatter_config"
,
"hist_config"
,
"
total
_traj_config"
]:
if
key
not
in
traj_config
.
keys
():
traj_config
[
key
]
=
traj_config_default
[
key
]
...
...
@@ -142,7 +142,7 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa
MSD_config
=
traj_config
[
"MSD_config"
]
scatter_config
=
traj_config
[
"scatter_config"
]
hist_config
=
traj_config
[
"hist_config"
]
centered
_traj_config
=
traj_config
[
"
centered
_traj_config"
]
total
_traj_config
=
traj_config
[
"
total
_traj_config"
]
### Filter data
...
...
@@ -215,10 +215,10 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa
tpl
.
plot_param_vs_param
(
data_dir
,
x_param
,
y_param
,
df_prop
,
plot_dir
=
sub_dir
,
plot_config
=
plot_config
,
prefix
=
'track_'
)
if
centered
_traj_config
[
'run'
]:
print
(
"Plotting
centered
trajectories"
)
tpl
.
plot_
centered
_traj
(
data_dir
,
df
,
dim
=
dim
,
plot_dir
=
sub_dir
,
plot_config
=
plot_config
,
specific_config
=
centered
_traj_config
)
if
total
_traj_config
[
'run'
]:
print
(
"Plotting
total
trajectories"
)
tpl
.
plot_
total
_traj
(
data_dir
,
df
,
dim
=
dim
,
plot_dir
=
sub_dir
,
plot_config
=
plot_config
,
specific_config
=
total
_traj_config
)
return
df_list
...
...
@@ -285,7 +285,7 @@ def main(args=None):
# get traj_config
traj_config
=
{}
for
key
in
[
"traj_config_"
,
"MSD_config"
,
"scatter_config"
,
"hist_config"
,
"
centered
_traj_config"
]:
for
key
in
[
"traj_config_"
,
"MSD_config"
,
"scatter_config"
,
"hist_config"
,
"
total
_traj_config"
]:
if
key
in
config
.
keys
():
traj_config
[
key
]
=
config
[
key
]
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment