Commit 1c5ba0c0 authored by amichaut's avatar amichaut
Browse files

improve notebook comments

parent 95ba98a2
Pipeline #54848 passed with stages
in 10 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -1301,7 +1301,6 @@ def get_image(data_dir, filename=None, verbose=False):
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:]}
......@@ -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,
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,
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,
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]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment