Skip to content

Commit

Permalink
Plotting directional cosines: Completed parameter checking the old way
Browse files Browse the repository at this point in the history
  • Loading branch information
vsmagalhaes committed Nov 28, 2023
1 parent d92fb94 commit 6dd6d92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/astrohack/_utils/_extract_holog.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def _plot_lm_coverage(param_dict):

_plot_lm_coverage_sub(time, real_lm, ideal_lm, param_dict)

if param_dict['plot_correlation'] is None:
if param_dict['plot_correlation'] is None or param_dict['plot_correlation'] == 'None':
pass
else:
param_dict['linestyle'] = ''
Expand Down
12 changes: 12 additions & 0 deletions src/astrohack/mds.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,24 @@ def plot_lm_sky_coverage(self, destination, ant=None, ddi=None, map_id=None, ang
list_acceptable_data_types=[int], default='all')
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'map', [int, list],
list_acceptable_data_types=[int], default='all')
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'complex_split', [str],
acceptable_data=possible_splits, default="polar")
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'angle_unit', [str],
acceptable_data=trigo_units, default='deg')
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'phase_unit', [str],
acceptable_data=trigo_units, default='deg')
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'time_unit', [str],
acceptable_data=time_units, default='hour')
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'plot_correlation', [str, list],
list_acceptable_data_types=[str], default='None')
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'display', [bool], default=True)
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'figure_size', [list, np.ndarray],
list_acceptable_data_types=[numbers.Number], list_len=2,
default='None', log_default_setting=False)
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'dpi', [int], default=300)
parms_passed = parms_passed and _check_parms(function_name, parm_dict, 'parallel', [bool], default=False)

_parm_check_passed(function_name, parms_passed)
_create_destination_folder(parm_dict['destination'])
key_order = ["ddi", "map", "ant"]
_dask_general_compute(function_name, self, _plot_lm_coverage, parm_dict, key_order, parallel)
Expand Down

0 comments on commit 6dd6d92

Please sign in to comment.