Repository 'larch_select_paths'
hg clone https://toolshed.g2.bx.psu.edu/repos/muon-spectroscopy-computational-project/larch_select_paths

Changeset 0:2e827836f0ad (2023-11-14)
Next changeset 1:7fdca938d90c (2023-12-06)
Commit message:
planemo upload for repository https://github.com/MaterialsGalaxy/larch-tools/tree/main/larch_select_paths commit 5be486890442dedfb327289d597e1c8110240735
added:
larch_select_paths.py
larch_select_paths.xml
test-data/FEFF_paths.zip
test-data/[CSV_summary_of_1564889.cif].csv
test-data/gds_altered_defaults.csv
test-data/gds_default.csv
test-data/gds_include_path_3_custom_name.csv
test-data/gds_include_path_3_custom_name_value.csv
test-data/gds_merge_custom.csv
test-data/sp_default.csv
test-data/sp_include_path_3.csv
test-data/sp_include_path_3_custom_name.csv
test-data/sp_merge_custom.csv
test-data/sp_merge_default.csv
test-data/sp_select_all_false.csv
b
diff -r 000000000000 -r 2e827836f0ad larch_select_paths.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/larch_select_paths.py Tue Nov 14 15:35:52 2023 +0000
[
b'@@ -0,0 +1,295 @@\n+import csv\n+import json\n+import os\n+import re\n+import sys\n+from zipfile import ZIP_DEFLATED, ZipFile\n+\n+\n+class GDSWriter:\n+    def __init__(self, default_variables: "dict[str, dict]"):\n+        self.default_properties = {\n+            "s02": {"name": "s02"},\n+            "e0": {"name": "e0"},\n+            "deltar": {"name": "alpha*reff"},\n+            "sigma2": {"name": "sigma2"},\n+        }\n+        self.rows = [\n+            f"{\'id\':>4s}, {\'name\':>24s}, {\'value\':>5s}, {\'expr\':>4s}, "\n+            f"{\'vary\':>4s}\\n"\n+        ]\n+        self.names = set()\n+\n+        for property in self.default_properties:\n+            name = self.default_properties[property]["name"]\n+            value = default_variables[property]["value"]\n+            vary = default_variables[property]["vary"]\n+            is_common = default_variables[property]["is_common"]\n+\n+            self.default_properties[property]["value"] = value\n+            self.default_properties[property]["vary"] = vary\n+            self.default_properties[property]["is_common"] = is_common\n+\n+            if is_common:\n+                self.append_gds(name=name, value=value, vary=vary)\n+\n+    def append_gds(\n+        self,\n+        name: str,\n+        value: float = 0.,\n+        expr: str = None,\n+        vary: bool = True,\n+        label: str = "",\n+    ):\n+        """Append a single GDS variable to the list of rows, later to be\n+        written to file.\n+\n+        Args:\n+            name (str): Name of the GDS variable.\n+            value (float, optional): Starting value for variable.\n+                Defaults to 0.\n+            expr (str, optional): Expression for setting the variable.\n+                Defaults to None.\n+            vary (bool, optional): Whether the variable is optimised during the\n+                fit. Defaults to True.\n+            label (str, optional): Label to keep variables for different FEFF\n+                directories distinct. Defaults to "".\n+        """\n+        formatted_name = name if (label is None) else label + name\n+        formatted_name = formatted_name.replace("*reff", "")\n+        if not expr:\n+            expr = "    "\n+\n+        if formatted_name in self.names:\n+            raise ValueError(f"{formatted_name} already used as variable name")\n+        self.names.add(formatted_name)\n+\n+        self.rows.append(\n+            f"{len(self.rows):4d}, {formatted_name:>24s}, {str(value):>5s}, "\n+            f"{expr:>4s}, {str(vary):>4s}\\n"\n+        )\n+\n+    def parse_gds(\n+        self,\n+        property_name: str,\n+        variable_name: str = None,\n+        path_variable: dict = None,\n+        directory_label: str = None,\n+        path_label: str = None,\n+    ) -> str:\n+        """Parse and append a row defining a GDS variable for a particular\n+        path.\n+\n+        Args:\n+            property_name (str): The property to which the variable\n+                corresponds. Should be a key in `self.default_properties`.\n+            variable_name (str, optional): Custom name for this variable.\n+                Defaults to None.\n+            path_variable (dict, optional): Dictionary defining the GDS\n+                settings for this path\'s variable. Defaults to None.\n+            directory_label (str, optional): Label to indicate paths from a\n+                separate directory. Defaults to None.\n+            path_label (str, optional): Label indicating the atoms involved in\n+                this path. Defaults to None.\n+\n+        Returns:\n+            str: Either `variable_name`, the name used as a default globally\n+                for this `property_name`, or an automatically generated unique\n+                name.\n+        """\n+        if variable_name:\n+            self.append_gds(\n+                name=variable_name,\n+                value=path_variable["value"],\n+                expr=path_variable["expr"],\n+                vary=path_variable["vary"],\n+            )\n+            return variable_name\n+        elif self'..b'                   )\n+                        self.parse_selected_path(\n+                            filename=filename,\n+                            path_label=path_label,\n+                            directory_label=directory_label,\n+                            **variables,\n+                        )\n+\n+    def parse_selected_path(\n+        self,\n+        filename: str,\n+        path_label: str,\n+        directory_label: str = "",\n+        s02: str = "s02",\n+        e0: str = "e0",\n+        sigma2: str = "sigma2",\n+        deltar: str = "alpha*reff",\n+    ):\n+        """Format and append row representing a selected FEFF path.\n+\n+        Args:\n+            filename (str): Name of the underlying FEFF path file, without\n+                parent directory.\n+            path_label (str): Label indicating the atoms involved in this path.\n+            directory_label (str, optional): Label to indicate paths from a\n+                separate directory. Defaults to "".\n+            s02 (str, optional): Electron screening factor variable name.\n+                Defaults to "s02".\n+            e0 (str, optional): Energy shift variable name. Defaults to "e0".\n+            sigma2 (str, optional): Mean squared displacement variable name.\n+                Defaults to "sigma2".\n+            deltar (str, optional): Change in path length variable.\n+                Defaults to "alpha*reff".\n+        """\n+        if directory_label:\n+            filename = os.path.join(directory_label, filename)\n+            label = f"{directory_label}.{path_label}"\n+        else:\n+            filename = os.path.join("feff", filename)\n+            label = path_label\n+\n+        self.rows.append(\n+            f"{len(self.rows):>4d}, {filename:>24s}, {label:>24s}, "\n+            f"{s02:>3s}, {e0:>4s}, {sigma2:>24s}, {deltar:>10s}\\n"\n+        )\n+\n+    def write(self):\n+        """Write selected path and GDS rows to file.\n+        """\n+        self.gds_writer.write()\n+        with open("sp.csv", "w") as out:\n+            out.writelines(self.rows)\n+\n+\n+def main(input_values: dict):\n+    """Select paths and define GDS parameters.\n+\n+    Args:\n+        input_values (dict): All input values from the Galaxy tool UI.\n+\n+    Raises:\n+        ValueError: If a FEFF label is not unique.\n+    """\n+    default_variables = input_values["variables"]\n+\n+    writer = PathsWriter(default_variables=default_variables)\n+\n+    if len(input_values["feff_outputs"]) == 1:\n+        feff_output = input_values["feff_outputs"][0]\n+        writer.parse_feff_output(\n+            paths_file=feff_output["paths_file"],\n+            selection=feff_output["selection"],\n+        )\n+    else:\n+        zfill_length = len(str(len(input_values["feff_outputs"])))\n+        labels = set()\n+        with ZipFile("merged.zip", "x", ZIP_DEFLATED) as zipfile_out:\n+            for i, feff_output in enumerate(input_values["feff_outputs"]):\n+                label = feff_output.pop("label") or str(i + 1).zfill(\n+                    zfill_length\n+                )\n+                if label in labels:\n+                    raise ValueError(f"Label \'{label}\' is not unique")\n+                labels.add(label)\n+\n+                writer.parse_feff_output(\n+                    directory_label=label,\n+                    paths_file=feff_output["paths_file"],\n+                    selection=feff_output["selection"],\n+                )\n+\n+                with ZipFile(feff_output["paths_zip"]) as z:\n+                    for zipinfo in z.infolist():\n+                        if zipinfo.filename != "feff/":\n+                            zipinfo.filename = zipinfo.filename[5:]\n+                            z.extract(member=zipinfo, path=label)\n+                            zipfile_out.write(\n+                                os.path.join(label, zipinfo.filename)\n+                            )\n+\n+    writer.write()\n+\n+\n+if __name__ == "__main__":\n+    input_values = json.load(open(sys.argv[1], "r", encoding="utf-8"))\n+    main(input_values)\n'
b
diff -r 000000000000 -r 2e827836f0ad larch_select_paths.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/larch_select_paths.xml Tue Nov 14 15:35:52 2023 +0000
[
b'@@ -0,0 +1,294 @@\n+<tool id="larch_select_paths" name="Larch Select Paths" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">\n+    <description>select FEFF paths for XAFS data</description>\n+    <macros>\n+        <!-- version of underlying tool (PEP 440) -->\n+        <token name="@TOOL_VERSION@">0.9.71</token>\n+        <!-- version of this tool wrapper (integer) -->\n+        <token name="@WRAPPER_VERSION@">0</token>\n+        <!-- citation should be updated with every underlying tool version -->\n+        <!-- typical fields to update are version, month, year, and doi -->\n+        <token name="@TOOL_CITATION@">10.1088/1742-6596/430/1/012007</token>\n+        <xml name="name">\n+            <param name="name" type="text" optional="true" label="Name" help="The name of the variable should be unique, and can be used in expressions for other paths. If name is set, will overwrite the default bevaviour for this variable."/>\n+        </xml>\n+        <xml name="expr">\n+            <param name="expr" type="text" optional="true" label="Expression" help="If set, the variable will be \'Defined\' by the expression. This can include other variable name, for example in order to set two paths to use the same variable."/>\n+        </xml>\n+        <xml name="vary">\n+            <param name="vary" type="boolean" checked="true" label="Vary" help="If True, the initial \'Guess\' will be optimised in the fitting. If False, the value will be \'Set\' instead and not optimised."/>\n+        </xml>\n+    </macros>\n+    <creator>\n+        <person givenName="Patrick" familyName="Austin" url="https://github.com/patrick-austin" identifier="https://orcid.org/0000-0002-6279-7823"/>\n+    </creator>\n+    <requirements>\n+        <requirement type="package" version="@TOOL_VERSION@">xraylarch</requirement>\n+        <requirement type="package" version="3.5.2">matplotlib</requirement>\n+    </requirements>\n+    <required_files>\n+        <include type="literal" path="larch_select_paths.py"/>\n+    </required_files>\n+    <command detect_errors="exit_code"><![CDATA[\n+        python \'${__tool_directory__}/larch_select_paths.py\' \'$inputs\'\n+    ]]></command>\n+    <configfiles>\n+        <inputs name="inputs" data_style="paths"/>\n+    </configfiles>\n+    <inputs>\n+        <section name="variables" expanded="false" title="GDS variable defaults" help="Define default values for variables in the EXAFS equation to use for the paths selected below.">\n+            <section name="s02" expanded="false" title="S02: passive electron reduction factor">\n+                <param name="is_common" type="boolean" checked="true" label="Common to all paths" help="If set, a single variable \'s02\' will be used for all paths. Otherwise, each path has a distinct variable."/>\n+                <param name="value" type="float" value="1.0" min="0.0" max="1.0" label="Value" help="The initial value for \'s02\'. This is typically between 0.7 and 1.0."/>\n+                <expand macro="vary"/>\n+            </section>\n+            <section name="e0" expanded="false" title="E0: energy shift">\n+                <param name="is_common" type="boolean" checked="true" label="Common to all paths" help="If set, a single variable \'e0\' will be used for all paths. Otherwise, each path has a distinct variable."/>\n+                <param name="value" type="float" value="0.0" label="Value" help="The initial value for \'e0\'. This should be close to zero, as it represents the difference in the absorption edge positions between simulation and experiment."/>\n+                <expand macro="vary"/>\n+            </section>\n+            <section name="deltar" expanded="false" title="Delta R: change in path length">\n+                <param name="is_common" type="boolean" checked="true" label="Common to all paths" help="If set, a single variable \'alpha*reff\' will be used for all paths (where \'reff\' is the effective path length). Otherwise, each path has a distinct variable."/>\n+           '..b'            <repeat name="feff_outputs">\n+                <param name="paths_zip" value="FEFF_paths.zip"/>\n+                <param name="paths_file" value="[CSV_summary_of_1564889.cif].csv"/>\n+            </repeat>\n+            <repeat name="feff_outputs">\n+                <param name="paths_zip" value="FEFF_paths.zip"/>\n+                <param name="paths_file" value="[CSV_summary_of_1564889.cif].csv"/>\n+            </repeat>\n+            <output name="merged_directories">\n+                <assert_contents>\n+                    <has_size value="206000" delta="100"/>\n+                </assert_contents>\n+            </output>\n+            <output name="gds_csv" file="gds_default.csv"/>\n+            <output name="sp_csv" file="sp_merge_default.csv"/>\n+        </test>\n+        <!-- Test merging custom arguments -->\n+        <test expect_num_outputs="3">\n+            <repeat name="feff_outputs">\n+                <param name="label" value="primary"/>\n+                <param name="paths_zip" value="FEFF_paths.zip"/>\n+                <param name="paths_file" value="[CSV_summary_of_1564889.cif].csv"/>\n+                <conditional name="selection">\n+                    <param name="selection" value="manual"/>\n+                    <repeat name="paths">\n+                        <param name="id" value="3"/>\n+                        <section name="sigma2">\n+                            <param name="name" value="custom_name_1"/>\n+                        </section>\n+                    </repeat>\n+                </conditional>\n+            </repeat>\n+            <repeat name="feff_outputs">\n+                <param name="label" value="secondary"/>\n+                <param name="paths_zip" value="FEFF_paths.zip"/>\n+                <param name="paths_file" value="[CSV_summary_of_1564889.cif].csv"/>\n+                <conditional name="selection">\n+                    <param name="selection" value="manual"/>\n+                    <repeat name="paths">\n+                        <param name="id" value="3"/>\n+                        <section name="sigma2">\n+                            <param name="name" value="custom_name_2"/>\n+                        </section>\n+                    </repeat>\n+                </conditional>\n+            </repeat>\n+            <output name="merged_directories">\n+                <assert_contents>\n+                    <has_size value="206500" delta="100"/>\n+                </assert_contents>\n+            </output>\n+            <output name="gds_csv" file="gds_merge_custom.csv"/>\n+            <output name="sp_csv" file="sp_merge_custom.csv"/>\n+        </test>\n+    </tests>\n+    <help><![CDATA[\n+        Select FEFF scattering paths to use in the fitting process.\n+\n+        If paths from multiple different FEFF outputs are of interest (for example, corresponding to different structural files), then additional FEFF outputs can be added.\n+        Each requires its own zip directory and path summary CSV, and any custom GDS parameters will be uniquely labelled with the label provided or a numerical default.\n+        In this case the zipped directories will also be merged into one output containing all paths and associated files.\n+\n+        If only one set of FEFF outputs is provided, labelling is not required and the existing zip file can be used as the input to Larch Artemis.\n+\n+        If the selection method "All paths" is chosen, or an individual row in the CSV with ``select`` is set to ``1``, it will be automatically used, with the default values defined.\n+        This can be useful when many paths are needed and using the UI can be cumbersome.\n+\n+        It is also possible to manually check and further modify the GDS and SP output CSVs to ensure the values are suitable, as an alternative to re-running this tool.\n+    ]]></help>\n+    <citations>\n+        <citation type="doi">@TOOL_CITATION@</citation>\n+        <citation type="doi">10.1107/S0909049505012719</citation>\n+    </citations>\n+</tool>\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 2e827836f0ad test-data/FEFF_paths.zip
b
Binary file test-data/FEFF_paths.zip has changed
[
diff -r 000000000000 -r 2e827836f0ad test-data/[CSV_summary_of_1564889.cif].csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/[CSV_summary_of_1564889.cif].csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,9 @@
+    file     ,   sig2 ,  amp ratio,    deg  ,  nlegs,  r effective, label                         , select
+ feff0001.dat, 0.00000,   100.000 ,    2.000,     2 ,  2.2366     , S.Fe.1                        ,      1
+ feff0002.dat, 0.00000,   100.000 ,    4.000,     2 ,  2.2549     , S.Fe.2                        ,      1
+ feff0003.dat, 0.00000,    17.561 ,    2.000,     2 ,  3.3852     , Fe.Fe.3                       ,      0
+ feff0004.dat, 0.00000,    16.957 ,    2.000,     2 ,  3.4915     , S.Fe.4                        ,      0
+ feff0005.dat, 0.00000,    31.275 ,    4.000,     2 ,  3.6045     , S.Fe.5                        ,      0
+ feff0006.dat, 0.00000,     7.146 ,    8.000,     3 ,  3.8064     , S.S.Fe.6                      ,      0
+ feff0007.dat, 0.00000,     7.214 ,    8.000,     3 ,  3.8606     , S.S.Fe.7                      ,      0
+ feff0008.dat, 0.00000,    50.180 ,    8.000,     2 ,  3.8958     , Fe.Fe.8                       ,      0
b
diff -r 000000000000 -r 2e827836f0ad test-data/gds_altered_defaults.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gds_altered_defaults.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,5 @@
+  id,                     name, value, expr, vary
+   1,                      s02,   0.1,     , False
+   2,                       e0,   0.1,     , True
+   3,                    alpha,  10.0,     , False
+   4,                   sigma2, 0.003,     , True
b
diff -r 000000000000 -r 2e827836f0ad test-data/gds_default.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gds_default.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,5 @@
+  id,                     name, value, expr, vary
+   1,                      s02,   1.0,     , True
+   2,                       e0,   0.0,     , True
+   3,                    alpha,   0.0,     , True
+   4,                   sigma2, 0.003,     , True
b
diff -r 000000000000 -r 2e827836f0ad test-data/gds_include_path_3_custom_name.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gds_include_path_3_custom_name.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,6 @@
+  id,                     name, value, expr, vary
+   1,                      s02,   1.0,     , True
+   2,                       e0,   0.0,     , True
+   3,                    alpha,   0.0,     , True
+   4,                   sigma2, 0.003,     , True
+   5,              custom_name, 0.003,     , True
b
diff -r 000000000000 -r 2e827836f0ad test-data/gds_include_path_3_custom_name_value.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gds_include_path_3_custom_name_value.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,6 @@
+  id,                     name, value, expr, vary
+   1,                      s02,   1.0,     , True
+   2,                       e0,   0.0,     , True
+   3,                    alpha,   0.0,     , True
+   4,                   sigma2, 0.003,     , True
+   5,              custom_name, 0.005,     , False
b
diff -r 000000000000 -r 2e827836f0ad test-data/gds_merge_custom.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gds_merge_custom.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,7 @@
+  id,                     name, value, expr, vary
+   1,                      s02,   1.0,     , True
+   2,                       e0,   0.0,     , True
+   3,                    alpha,   0.0,     , True
+   4,                   sigma2, 0.003,     , True
+   5,            custom_name_1, 0.003,     , True
+   6,            custom_name_2, 0.003,     , True
b
diff -r 000000000000 -r 2e827836f0ad test-data/sp_default.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sp_default.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,9 @@
+  id,                 filename,                    label, s02,   e0,                   sigma2,     deltar
+   1,        feff/feff0001.dat,                   S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   2,        feff/feff0002.dat,                   S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+   3,        feff/feff0003.dat,                  Fe.Fe.3, s02,   e0,                   sigma2, alpha*reff
+   4,        feff/feff0004.dat,                   S.Fe.4, s02,   e0,                   sigma2, alpha*reff
+   5,        feff/feff0005.dat,                   S.Fe.5, s02,   e0,                   sigma2, alpha*reff
+   6,        feff/feff0006.dat,                 S.S.Fe.6, s02,   e0,                   sigma2, alpha*reff
+   7,        feff/feff0007.dat,                 S.S.Fe.7, s02,   e0,                   sigma2, alpha*reff
+   8,        feff/feff0008.dat,                  Fe.Fe.8, s02,   e0,                   sigma2, alpha*reff
b
diff -r 000000000000 -r 2e827836f0ad test-data/sp_include_path_3.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sp_include_path_3.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,4 @@
+  id,                 filename,                    label, s02,   e0,                   sigma2,     deltar
+   1,        feff/feff0001.dat,                   S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   2,        feff/feff0002.dat,                   S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+   3,        feff/feff0003.dat,                  Fe.Fe.3, s02,   e0,                   sigma2, alpha*reff
b
diff -r 000000000000 -r 2e827836f0ad test-data/sp_include_path_3_custom_name.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sp_include_path_3_custom_name.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,4 @@
+  id,                 filename,                    label, s02,   e0,                   sigma2,     deltar
+   1,        feff/feff0001.dat,                   S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   2,        feff/feff0002.dat,                   S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+   3,        feff/feff0003.dat,                  Fe.Fe.3, s02,   e0,              custom_name, alpha*reff
b
diff -r 000000000000 -r 2e827836f0ad test-data/sp_merge_custom.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sp_merge_custom.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,7 @@
+  id,                 filename,                    label, s02,   e0,                   sigma2,     deltar
+   1,     primary/feff0001.dat,           primary.S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   2,     primary/feff0002.dat,           primary.S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+   3,     primary/feff0003.dat,          primary.Fe.Fe.3, s02,   e0,            custom_name_1, alpha*reff
+   4,   secondary/feff0001.dat,         secondary.S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   5,   secondary/feff0002.dat,         secondary.S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+   6,   secondary/feff0003.dat,        secondary.Fe.Fe.3, s02,   e0,            custom_name_2, alpha*reff
b
diff -r 000000000000 -r 2e827836f0ad test-data/sp_merge_default.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sp_merge_default.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,17 @@
+  id,                 filename,                    label, s02,   e0,                   sigma2,     deltar
+   1,           1/feff0001.dat,                 1.S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   2,           1/feff0002.dat,                 1.S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+   3,           1/feff0003.dat,                1.Fe.Fe.3, s02,   e0,                   sigma2, alpha*reff
+   4,           1/feff0004.dat,                 1.S.Fe.4, s02,   e0,                   sigma2, alpha*reff
+   5,           1/feff0005.dat,                 1.S.Fe.5, s02,   e0,                   sigma2, alpha*reff
+   6,           1/feff0006.dat,               1.S.S.Fe.6, s02,   e0,                   sigma2, alpha*reff
+   7,           1/feff0007.dat,               1.S.S.Fe.7, s02,   e0,                   sigma2, alpha*reff
+   8,           1/feff0008.dat,                1.Fe.Fe.8, s02,   e0,                   sigma2, alpha*reff
+   9,           2/feff0001.dat,                 2.S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+  10,           2/feff0002.dat,                 2.S.Fe.2, s02,   e0,                   sigma2, alpha*reff
+  11,           2/feff0003.dat,                2.Fe.Fe.3, s02,   e0,                   sigma2, alpha*reff
+  12,           2/feff0004.dat,                 2.S.Fe.4, s02,   e0,                   sigma2, alpha*reff
+  13,           2/feff0005.dat,                 2.S.Fe.5, s02,   e0,                   sigma2, alpha*reff
+  14,           2/feff0006.dat,               2.S.S.Fe.6, s02,   e0,                   sigma2, alpha*reff
+  15,           2/feff0007.dat,               2.S.S.Fe.7, s02,   e0,                   sigma2, alpha*reff
+  16,           2/feff0008.dat,                2.Fe.Fe.8, s02,   e0,                   sigma2, alpha*reff
b
diff -r 000000000000 -r 2e827836f0ad test-data/sp_select_all_false.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sp_select_all_false.csv Tue Nov 14 15:35:52 2023 +0000
b
@@ -0,0 +1,3 @@
+  id,                 filename,                    label, s02,   e0,                   sigma2,     deltar
+   1,        feff/feff0001.dat,                   S.Fe.1, s02,   e0,                   sigma2, alpha*reff
+   2,        feff/feff0002.dat,                   S.Fe.2, s02,   e0,                   sigma2, alpha*reff