# HG changeset patch # User luca_milaz # Date 1722868491 0 # Node ID 2c9fd99b709c3ef1ffe17b6bd5a93855dbb92931 # Parent afaa7bcc730eef81db71f65a01a47a1f26a609e8 Uploaded diff -r afaa7bcc730e -r 2c9fd99b709c marea_2/flux_to_map.py --- a/marea_2/flux_to_map.py Mon Aug 05 13:10:37 2024 +0000 +++ b/marea_2/flux_to_map.py Mon Aug 05 14:34:51 2024 +0000 @@ -114,6 +114,11 @@ '-mc', '--choice_map', type = utils.Model, default = utils.Model.HMRcore, choices = [utils.Model.HMRcore, utils.Model.ENGRO2, utils.Model.Custom]) + + parser.add_argument( + '-colorm', '--color_map', + type = str, + choices = ["jet", "viridis"]) args :argparse.Namespace = parser.parse_args() args.net = True @@ -1014,16 +1019,14 @@ ids, class_pat = getClassesAndIdsFromDatasets(ARGS.input_datas_fluxes, ARGS.input_data_fluxes, ARGS.input_class_fluxes, ARGS.names_fluxes) - ARGS.colormap="jet" #to add to user interface, choice amongst matplotlib colormaps - if(ARGS.choice_map == utils.Model.HMRcore): temp_map = utils.Model.HMRcore_no_legend - computeEnrichmentMeanMedian(temp_map.getMap(ARGS.tool_dir), class_pat, ids, ARGS.colormap) + computeEnrichmentMeanMedian(temp_map.getMap(ARGS.tool_dir), class_pat, ids, ARGS.color_map) elif(ARGS.choice_map == utils.Model.ENGRO2): temp_map = utils.Model.ENGRO2_no_legend - computeEnrichmentMeanMedian(temp_map.getMap(ARGS.tool_dir), class_pat, ids, ARGS.colormap) + computeEnrichmentMeanMedian(temp_map.getMap(ARGS.tool_dir), class_pat, ids, ARGS.color_map) else: - computeEnrichmentMeanMedian(core_map, class_pat, ids, ARGS.colormap) + computeEnrichmentMeanMedian(core_map, class_pat, ids, ARGS.color_map) computeEnrichment(core_map, class_pat, ids)