changeset 322:2c9fd99b709c draft

Uploaded
author luca_milaz
date Mon, 05 Aug 2024 14:34:51 +0000
parents afaa7bcc730e
children e8ed689d40da
files marea_2/flux_to_map.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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)