Commit 467e89da authored by amichaut's avatar amichaut
Browse files

bug fix: in load config

parent d8a62a98
Pipeline #76019 passed with stages
in 23 seconds
......@@ -1429,7 +1429,7 @@ def make_traj_config(data_dir=None, export_config=True):
}
total_traj_config = {'run': True, # run plot_centered_traj
'hide_labels': False, # hide trajectory ID
'hide_labels': True, # hide trajectory ID
'label_size': 5, # label size in points if hide_labels is False
'center_origin': True, # to center origin of all trajectories
'set_axis_lim': None, # custom axis limites: [xmin,xmax,ymin,ymax]
......
......@@ -301,8 +301,9 @@ def main(args=None):
config[key] = None
# get map_config
map_config_default = tpr.make_map_config(data_dir=data_dir, export_config=False)
map_config = {}
for key in ["grid_param", "map_param", "scalar_fields", "vector_fields", "vector_mean"]:
for key in map_config_default.keys():
if key in config.keys():
map_config[key] = config[key]
......
......@@ -84,7 +84,8 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa
# check all defaut param are present
for k in traj_config_default_.keys():
if k not in traj_config[key].keys():
traj_config[key][k] = traj_config_default_[k]
traj_config[key][k] = traj_config_default_[k]
traj_config_ = traj_config["traj_config_"]
MSD_config = traj_config["MSD_config"]
......@@ -348,8 +349,9 @@ def main(args=None):
config[key] = None # make them None, so they are initialize in traj_analysis
# get traj_config
traj_config_default = tpr.make_traj_config(data_dir=data_dir, export_config=False)
traj_config = {}
for key in ["traj_config_", "MSD_config", "scatter_config", "hist_config", "total_traj_config", "voronoi_config"]:
for key in traj_config_default.keys(): # load only the necessary config dict
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