Commit 6414429a authored by amichaut's avatar amichaut
Browse files

changed matplotlib backend to make it run on cluster

parent b0437988
...@@ -67,7 +67,7 @@ def map_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fal ...@@ -67,7 +67,7 @@ def map_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fal
if k not in plot_config.keys(): if k not in plot_config.keys():
plot_config[k] = plot_config_default[k] plot_config[k] = plot_config_default[k]
if plot_config['save_as_stack']: if plot_config['save_as_stack']:
mpl.use('TkAgg') # need to switch backend to use matplotlib tostring_rgb() mpl.use('agg') # need to switch backend to use matplotlib tostring_rgb()
# Get map_config # Get map_config
map_config_default = tpr.make_map_config(data_dir=data_dir, export_config=False) map_config_default = tpr.make_map_config(data_dir=data_dir, export_config=False)
......
...@@ -67,7 +67,7 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa ...@@ -67,7 +67,7 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa
if k not in plot_config.keys(): if k not in plot_config.keys():
plot_config[k] = plot_config_default[k] plot_config[k] = plot_config_default[k]
if plot_config['save_as_stack']: if plot_config['save_as_stack']:
mpl.use('TkAgg') # need to switch backend to use matplotlib tostring_rgb() mpl.use('agg') # need to switch backend to use matplotlib tostring_rgb()
# Get traj_config # Get traj_config
traj_config_default = tpr.make_traj_config(data_dir=data_dir, export_config=False) traj_config_default = tpr.make_traj_config(data_dir=data_dir, export_config=False)
...@@ -101,8 +101,6 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa ...@@ -101,8 +101,6 @@ def traj_analysis(data_dir, data=None, image=None, refresh=False, parallelize=Fa
filters['filters_list'][i] = filter_ filters['filters_list'][i] = filter_
subset_analysis = filters['subset'] # how to deal with subsets subset_analysis = filters['subset'] # how to deal with subsets
print(subset_analysis)
print(filters)
filters_ = filters['filters_list'] filters_ = filters['filters_list']
df = tpr.select_sub_data(df, filters=filters_) df = tpr.select_sub_data(df, filters=filters_)
if subset_analysis == 'together': if subset_analysis == 'together':
......
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