# HG changeset patch
# User muon-spectroscopy-computational-project
# Date 1709552626 0
# Node ID 59d0d15a40ef80149182cf763deeb30808648dfd
# Parent  002c18a3e6427059fe185a8cc6f0340e2bfa29f0
planemo upload for repository https://github.com/MaterialsGalaxy/larch-tools/tree/main/larch_plot commit 0f66842e802430e887d1c6cb7be1cc5436408fd2

diff -r 002c18a3e642 -r 59d0d15a40ef common.py
--- a/common.py	Wed Dec 06 13:04:06 2023 +0000
+++ b/common.py	Mon Mar 04 11:43:46 2024 +0000
@@ -29,6 +29,7 @@
     )
     all_groups = {}
     for key in athena_group._athena_groups.keys():
+        print(f"\nExtracting group {key}")
         group = get_group(athena_group, key)
         pre_edge_with_defaults(group=group)
         xftf_with_defaults(group=group)
@@ -68,8 +69,7 @@
         ("nnorm", "nnorm", None),
         ("make_flat", "flatten", None),
         ("step", "step", None),
-        # This cannot be read from file as it is not stored by Larch (0.9.71)
-        # ("nvict", "nvict", None),
+        ("nvict", "nvict", None),
     )
     for key, parameters_key, default in keys:
         extract_attribute(
diff -r 002c18a3e642 -r 59d0d15a40ef larch_plot.py
--- a/larch_plot.py	Wed Dec 06 13:04:06 2023 +0000
+++ b/larch_plot.py	Mon Mar 04 11:43:46 2024 +0000
@@ -34,7 +34,10 @@
 
         for group in groups:
             params = group.athena_params
-            label = params.annotation or params.file or params.id
+            annotation = getattr(params, "annotation", None)
+            file = getattr(params, "file", None)
+            params_id = getattr(params, "id", None)
+            label = annotation or file or params_id
             if y_variable == "chir_mag":
                 x_variable = "distance"
                 x = group.r
diff -r 002c18a3e642 -r 59d0d15a40ef larch_plot.xml
--- a/larch_plot.xml	Wed Dec 06 13:04:06 2023 +0000
+++ b/larch_plot.xml	Mon Mar 04 11:43:46 2024 +0000
@@ -2,9 +2,9 @@
     <description>plot Athena projects</description>
     <macros>
         <!-- version of underlying tool (PEP 440) -->
-        <token name="@TOOL_VERSION@">0.9.71</token>
+        <token name="@TOOL_VERSION@">0.9.74</token>
         <!-- version of this tool wrapper (integer) -->
-        <token name="@WRAPPER_VERSION@">1</token>
+        <token name="@WRAPPER_VERSION@">0</token>
         <!-- citation should be updated with every underlying tool version -->
         <!-- typical fields to update are version, month, year, and doi -->
         <token name="@TOOL_CITATION@">10.1088/1742-6596/430/1/012007</token>
@@ -72,7 +72,7 @@
         </test>
         <!-- 2: plot limits -->
         <test expect_num_outputs="1">
-            <param name="dat_files" value="test.prj"/>
+            <param name="dat_files" value="test.prj,merged.prj"/>
             <param name="variable" value="norm"/>
             <param name="x_limit_min" value="7000"/>
             <param name="x_limit_max" value="7200"/>
diff -r 002c18a3e642 -r 59d0d15a40ef test-data/merged.prj
Binary file test-data/merged.prj has changed