| Next changeset 1:2b3115342fef (2023-12-06) |
|
Commit message:
planemo upload for repository https://github.com/MaterialsGalaxy/larch-tools/tree/main/larch_athena commit 5be486890442dedfb327289d597e1c8110240735 |
|
added:
common.py larch_athena.py larch_athena.xml macros.xml test-data/262875_PtSn_OCO_Abu_1.nxs test-data/262876_PtSn_OCO_Abu_2.nxs test-data/ffi0.tabular test-data/h5.zip test-data/test.prj test-data/test.xmu test-data/test.zip |
| b |
| diff -r 000000000000 -r ae2f265ecf8e common.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common.py Tue Nov 14 15:34:40 2023 +0000 |
| [ |
| @@ -0,0 +1,46 @@ +from typing import Iterable + +from larch.io import extract_athenagroup, read_athena +from larch.io.athena_project import AthenaGroup +from larch.symboltable import Group +from larch.xafs import autobk, pre_edge, xftf + + +def get_group(athena_group: AthenaGroup, key: str = None) -> Group: + if key is None: + group_keys = list(athena_group._athena_groups.keys()) + key = group_keys[0] + return extract_athenagroup(athena_group._athena_groups[key]) + + +def read_group(dat_file: str, key: str = None, xftf_params: dict = None): + athena_group = read_athena(dat_file) + group = get_group(athena_group, key) + bkg_parameters = group.athena_params.bkg + print(group.athena_params.fft) + print(group.athena_params.fft.__dict__) + pre_edge( + group, + e0=bkg_parameters.e0, + pre1=bkg_parameters.pre1, + pre2=bkg_parameters.pre2, + norm1=bkg_parameters.nor1, + norm2=bkg_parameters.nor2, + nnorm=bkg_parameters.nnorm, + make_flat=bkg_parameters.flatten, + ) + autobk(group) + if xftf_params is None: + xftf(group) + else: + print(xftf_params) + xftf(group, **xftf_params) + xftf_details = Group() + setattr(xftf_details, "call_args", xftf_params) + group.xftf_details = xftf_details + return group + + +def read_groups(dat_files: "list[str]", key: str = None) -> Iterable[Group]: + for dat_file in dat_files: + yield read_group(dat_file=dat_file, key=key) |
| b |
| diff -r 000000000000 -r ae2f265ecf8e larch_athena.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/larch_athena.py Tue Nov 14 15:34:40 2023 +0000 |
| [ |
| b'@@ -0,0 +1,396 @@\n+import gc\n+import json\n+import os\n+import re\n+import sys\n+\n+from common import read_group\n+\n+from larch.io import (\n+ create_athena,\n+ h5group,\n+ merge_groups,\n+ read_ascii,\n+ set_array_labels,\n+)\n+from larch.symboltable import Group\n+from larch.xafs import autobk, pre_edge, rebin_xafs, xftf\n+\n+import matplotlib\n+import matplotlib.pyplot as plt\n+\n+import numpy as np\n+\n+\n+class Reader:\n+ def __init__(\n+ self,\n+ energy_column: str,\n+ mu_column: str,\n+ xftf_params: dict,\n+ data_format: str,\n+ extract_group: str = None,\n+ ):\n+ self.energy_column = energy_column\n+ self.mu_column = mu_column\n+ self.xftf_params = xftf_params\n+ self.data_format = data_format\n+ self.extract_group = extract_group\n+\n+ def load_data(\n+ self,\n+ dat_file: str,\n+ merge_inputs: bool,\n+ is_zipped: bool,\n+ ) -> "dict[str, Group]":\n+ if merge_inputs:\n+ out_group = self.merge_files(\n+ dat_files=dat_file, is_zipped=is_zipped\n+ )\n+ return {"out": out_group}\n+ else:\n+ return self.load_single_file(\n+ filepath=dat_file, is_zipped=is_zipped\n+ )\n+\n+ def merge_files(\n+ self,\n+ dat_files: str,\n+ is_zipped: bool,\n+ ) -> Group:\n+ if is_zipped:\n+ all_groups = list(self.load_zipped_files().values())\n+ else:\n+ all_groups = []\n+ for filepath in dat_files.split(","):\n+ group = self.load_single_file(filepath)["out"]\n+ all_groups.append(group)\n+\n+ return merge_groups(all_groups, xarray="energy", yarray="mu")\n+\n+ def load_single_file(\n+ self,\n+ filepath: str,\n+ is_zipped: bool = False,\n+ ) -> "dict[str,Group]":\n+ if is_zipped:\n+ return self.load_zipped_files()\n+\n+ print(f"Attempting to read from {filepath}")\n+ if self.data_format == "athena":\n+ group = read_group(filepath, self.extract_group, self.xftf_params)\n+ else:\n+ # Try ascii anyway\n+ try:\n+ group = self.load_ascii(filepath)\n+ if not group.array_labels:\n+ # In later versions of larch, won\'t get a type error it\n+ # will just fail to load any data\n+ group = self.load_h5(filepath)\n+ except (UnicodeDecodeError, TypeError):\n+ # Indicates this isn\'t plaintext, try h5\n+ group = self.load_h5(filepath)\n+ return {"out": group}\n+\n+ def load_ascii(self, dat_file):\n+ with open(dat_file) as f:\n+ labels = None\n+ last_line = None\n+ line = f.readline()\n+ while line:\n+ if not line.startswith("#"):\n+ if last_line is not None and last_line.find("\\t") > 0:\n+ labels = []\n+ for label in last_line.split("\\t"):\n+ labels.append(label.strip())\n+ break\n+\n+ last_line = line\n+ line = f.readline()\n+\n+ xas_data = read_ascii(filename=dat_file, labels=labels)\n+ xas_data = self.rename_cols(xas_data)\n+ return xas_data\n+\n+ def load_h5(self, dat_file):\n+ h5_group = h5group(fname=dat_file, mode="r")\n+ energy = h5_group.entry1.instrument.qexafs_energy.qexafs_energy\n+ mu = h5_group.entry1.instrument.qexafs_counterTimer01.lnI0It\n+ xafs_group = Group(data=np.array([energy[:], mu[:]]))\n+ set_array_labels(xafs_group, ["energy", "mu"])\n+ return xafs_group\n+\n+ def load_zipped_files(self) -> "dict[str, Group]":\n+ def sorting_key(filename: str) -> str:\n+ return re.findall(r"\\d+", filename)[-1]\n+\n+ all_paths = list(os.walk("dat_files"))\n+ all_paths.sort(key=lambda x: x[0])\n+ fil'..b' "This may occur if the edge is not included in the above ranges."\n+ ) from e\n+ xftf(xas_data, **xftf_params)\n+\n+ if input_values["plot_graph"]:\n+ plot_edge_fits(f"edge/{path_key}.png", xas_data)\n+ plot_flattened(f"flat/{path_key}.png", xas_data)\n+ plot_derivative(f"derivative/{path_key}.png", xas_data)\n+\n+ xas_project = create_athena(f"prj/{path_key}.prj")\n+ xas_project.add_group(xas_data)\n+ if input_values["annotation"]:\n+ group = next(iter(xas_project.groups.values()))\n+ group.args["annotation"] = input_values["annotation"]\n+ xas_project.save()\n+\n+ # Ensure that we do not run out of memory when running on large zips\n+ gc.collect()\n+\n+\n+def validate_pre(pre, energy_0, energy_format):\n+ if pre is not None and energy_format == "absolute":\n+ if energy_0 is None:\n+ raise ValueError(\n+ "Edge energy must be set manually or be present in the "\n+ "existing Athena project if using absolute format."\n+ )\n+ pre -= energy_0\n+\n+ return pre\n+\n+\n+def plot_derivative(plot_path: str, xafs_group: Group):\n+ plt.figure()\n+ plt.plot(xafs_group.energy, xafs_group.dmude)\n+ plt.grid(color="r", linestyle=":", linewidth=1)\n+ plt.xlabel("Energy (eV)")\n+ plt.ylabel("Derivative normalised to x$\\mu$(E)") # noqa: W605\n+ plt.savefig(plot_path, format="png")\n+ plt.close("all")\n+\n+\n+def plot_edge_fits(plot_path: str, xafs_group: Group):\n+ plt.figure()\n+ plt.plot(xafs_group.energy, xafs_group.pre_edge, "g", label="pre-edge")\n+ plt.plot(xafs_group.energy, xafs_group.post_edge, "r", label="post-edge")\n+ plt.plot(xafs_group.energy, xafs_group.mu, "b", label="fit data")\n+ plt.grid(color="r", linestyle=":", linewidth=1)\n+ plt.xlabel("Energy (eV)")\n+ plt.ylabel("x$\\mu$(E)") # noqa: W605\n+ plt.title("pre-edge and post_edge fitting to $\\mu$") # noqa: W605\n+ plt.legend()\n+ plt.savefig(plot_path, format="png")\n+ plt.close("all")\n+\n+\n+def plot_flattened(plot_path: str, xafs_group: Group):\n+ plt.figure()\n+ plt.plot(xafs_group.energy, xafs_group.flat)\n+ plt.grid(color="r", linestyle=":", linewidth=1)\n+ plt.xlabel("Energy (eV)")\n+ plt.ylabel("normalised x$\\mu$(E)") # noqa: W605\n+ plt.savefig(plot_path, format="png")\n+ plt.close("all")\n+\n+\n+if __name__ == "__main__":\n+ # larch imports set this to an interactive backend, so need to change it\n+ matplotlib.use("Agg")\n+\n+ dat_file = sys.argv[1]\n+ input_values = json.load(open(sys.argv[2], "r", encoding="utf-8"))\n+ merge_inputs = input_values["merge_inputs"]["merge_inputs"]\n+ data_format = input_values["merge_inputs"]["format"]["format"]\n+ if "is_zipped" in input_values["merge_inputs"]["format"]:\n+ is_zipped = bool(\n+ input_values["merge_inputs"]["format"]["is_zipped"]["is_zipped"]\n+ )\n+ else:\n+ is_zipped = False\n+ xftf_params = input_values["variables"]["xftf"]\n+ extract_group = None\n+\n+ if "extract_group" in input_values["merge_inputs"]["format"]:\n+ extract_group = input_values["merge_inputs"]["format"]["extract_group"]\n+\n+ energy_column = None\n+ mu_column = None\n+ if "energy_column" in input_values["merge_inputs"]["format"]:\n+ energy_column = input_values["merge_inputs"]["format"]["energy_column"]\n+ if "mu_column" in input_values["merge_inputs"]["format"]:\n+ mu_column = input_values["merge_inputs"]["format"]["mu_column"]\n+\n+ reader = Reader(\n+ energy_column=energy_column,\n+ mu_column=mu_column,\n+ xftf_params=xftf_params,\n+ data_format=data_format,\n+ extract_group=extract_group,\n+ )\n+ keyed_data = reader.load_data(\n+ dat_file=dat_file,\n+ merge_inputs=merge_inputs,\n+ is_zipped=is_zipped,\n+ )\n+ for key, group in keyed_data.items():\n+ main(\n+ group,\n+ input_values=input_values,\n+ path_key=key,\n+ )\n' |
| b |
| diff -r 000000000000 -r ae2f265ecf8e larch_athena.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/larch_athena.xml Tue Nov 14 15:34:40 2023 +0000 |
| [ |
| b'@@ -0,0 +1,342 @@\n+<tool id="larch_athena" name="Larch Athena" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">\n+ <description>generate Athena projects from 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="format">\n+ <param name="format" type="select" display="radio" label="Input format" help="Whether data is in plaintext or already saved as an Athena project">\n+ <option value="plaintext" selected="true">Plaintext</option>\n+ <option value="athena">Athena project</option>\n+ </param> \n+ </xml>\n+ <xml name="extract_group">\n+ <param name="extract_group" type="text" optional="true" label="Extract group" help="Which group to extract and process from the Athena project (will use first group in file if unset)"/>\n+ </xml>\n+ <xml name="columns">\n+ <param name="energy_column" type="text" optional="true" label="Energy column" help="If set, this column we be used as \'energy\'. Otherwise, will identify columns ending with \'energy\' or labelled \'col1\'."/>\n+ <param name="mu_column" type="text" optional="true" label="\xce\xbc column" help="If set, this column we be used as \'mu\'. Otherwise, will identify the first column labelled as either \'col2\', \'xmu\', \'lni0it\' or \'FFI0\'."/>\n+ </xml>\n+ <xml name="is_zipped">\n+ <param name="is_zipped" type="select" display="radio" label="Inputs Zipped" help="Whether plaintext input files are zipped together into one directory, or not.">\n+ <option value="" selected="true">No</option>\n+ <option value="true">Yes</option>\n+ </param>\n+ </xml>\n+ <import>macros.xml</import>\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+ <requirement type="package" version="3.0">zip</requirement>\n+ <requirement type="package" version="6.0">unzip</requirement>\n+ </requirements>\n+ <required_files>\n+ <include type="literal" path="larch_athena.py"/>\n+ </required_files>\n+ <command detect_errors="exit_code"><![CDATA[\n+ mkdir prj edge flat derivative\n+ #if $merge_inputs.format.format=="plaintext":\n+ #if $merge_inputs.format.is_zipped.is_zipped=="true":\n+ && echo Unzipping \'$merge_inputs.format.is_zipped.dat_file.name\'\n+ && unzip \'$merge_inputs.format.is_zipped.dat_file\' -d dat_files\n+ && python \'${__tool_directory__}/larch_athena.py\' dat_files \'$inputs\'\n+ #else\n+ && python \'${__tool_directory__}/larch_athena.py\' \'$merge_inputs.format.is_zipped.dat_file\' \'$inputs\'\n+ #end if\n+ #else\n+ && python \'${__tool_directory__}/larch_athena.py\' \'$merge_inputs.format.dat_file\' \'$inputs\'\n+ #end if\n+ #if $zip_outputs:\n+ && zip out_zip.zip prj/* edge/* flat/* derivative/*\n+ #end if\n+ ]]></command>\n+ <configfiles>\n+ <inputs name="inputs"/>\n+ </configfiles>\n+ <inputs>\n+ <conditional name="merge_inputs" >\n+ <param name="merge_inputs" type="select" display="radio" label="Merge multiple inputs" help="Whether to merg'..b'\n+ </assert_contents>\n+ </output>\n+ <output name="edge_plot">\n+ <assert_contents>\n+ <has_size value="44430" delta="10"/>\n+ </assert_contents>\n+ </output>\n+ <output name="flat_plot">\n+ <assert_contents>\n+ <has_size value="37310" delta="10"/>\n+ </assert_contents>\n+ </output>\n+ <output name="derivative_plot">\n+ <assert_contents>\n+ <has_size value="46390" delta="10"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ <test expect_num_outputs="1">\n+ <param name="dat_file" value="test.xmu"/>\n+ <param name="energy_format" value="absolute"/>\n+ <param name="energy_0" value="7050"/>\n+ <param name="energy_min" value="7000"/>\n+ <param name="energy_max" value="7200"/>\n+ <output name="athena_project_file">\n+ <assert_contents>\n+ <has_size value="3300" delta="50"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ <test expect_num_outputs="1">\n+ <param name="dat_file" value="test.xmu"/>\n+ <param name="rebin" value="true"/>\n+ <output name="athena_project_file">\n+ <assert_contents>\n+ <has_size value="8413" delta="10"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ <test expect_num_outputs="1">\n+ <param name="merge_inputs" value="true"/>\n+ <param name="dat_file" value="262875_PtSn_OCO_Abu_1.nxs,262876_PtSn_OCO_Abu_2.nxs"/>\n+ <output name="athena_project_file">\n+ <assert_contents>\n+ <has_size value="37550" delta="50"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ <test expect_num_outputs="1">\n+ <param name="merge_inputs" value="true"/>\n+ <param name="is_zipped" value="true"/>\n+ <param name="dat_file" value="test.zip"/>\n+ <output name="athena_project_file">\n+ <assert_contents>\n+ <has_size value="18000" delta="50"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ <test expect_num_outputs="1">\n+ <param name="format" value="athena"/>\n+ <param name="dat_file" value="test.prj"/>\n+ <output name="athena_project_file">\n+ <assert_contents>\n+ <has_size value="5400" delta="200"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ </tests>\n+ <help><![CDATA[\n+ Using Larch, create an Athena project file from the input X-ray Absorption Fine Structure (XAFS) data file.\n+ \n+ Accepts both plaintext and HDF5 formatted data or a zip file containing these formats.\n+ If column names are not present in plaintext data, then the first column is treated as `energy` and the second as `mu`.\n+ Note that in order to ensure a consistent output, once unzipped all files will sorted first by their parent directories (alphabetically).\n+ Within a given directory, if all filenames contain digits then the last block of digits will be used to sort the files numerically.\n+ In the output, all files (regardless of initial filepath) are output in a flat hierarchy, with the number in which it was processed as the file name (zero-padded).\n+ Care should therefore be taken to ensure input data is consistent with this treatment.\n+\n+ Optionally, plot the x\xce\xbc data along with pre and post edge fitting lines for visual inspection. \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 ae2f265ecf8e macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Tue Nov 14 15:34:40 2023 +0000 |
| b |
| @@ -0,0 +1,26 @@ +<macros> + <xml name="energy_limits"> + <param name="energy_format" type="select" display="radio" label="Energy limits" help="Whether to limit the energy relative to the absorption edge or with absolute values."> + <option value="relative" selected="true">Relative</option> + <option value="absolute">Absolute</option> + </param> + <param name="energy_min" type="float" label="Minimum energy (eV)" optional="true" help="If set, data will be cropped below this value in electron volts."/> + <param name="energy_max" type="float" label="Maximum energy (eV)" optional="true" help="If set, data will be cropped above this value in electron volts."/> + </xml> + <xml name="xftf_params"> + <param argument="kmin" type="float" value="0" min="0.0" help="Minimum k value."/> + <param argument="kmax" type="float" value="20" min="0.0" help="Maximum k value."/> + <param argument="kweight" type="float" value="2" help="Exponent for weighting spectra by raising k to this power."/> + <param argument="dk" type="float" value="4" help="Tapering parameter for Fourier Transform window."/> + <param argument="window" type="select" help="Fourier Transform window type."> + <option value="hanning">Hanning (cosine-squared taper)</option> + <option value="parzen">Parzen (linear taper)</option> + <option value="welch">Welch (quadratic taper)</option> + <option value="gaussian">Gaussian function window</option> + <option value="sine">Sine function window</option> + <option value="kaiser" selected="true">Kaiser-Bessel function-derived window</option> + </param> + <param argument="rmin" type="float" value="0.0" min="0.0" help="Minimum radial distance."/> + <param argument="rmax" type="float" value="10.0" min="0.0" help="Maximum radial distance."/> + </xml> +</macros> \ No newline at end of file |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/262875_PtSn_OCO_Abu_1.nxs |
| b |
| Binary file test-data/262875_PtSn_OCO_Abu_1.nxs has changed |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/262876_PtSn_OCO_Abu_2.nxs |
| b |
| Binary file test-data/262876_PtSn_OCO_Abu_2.nxs has changed |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/ffi0.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/ffi0.tabular Tue Nov 14 15:34:40 2023 +0000 |
| b |
| b'@@ -0,0 +1,3497 @@\n+# qexafs_energy\t time\t I0\t It\t Iref\t lnI0It\t lnItIref\tElement 0\tElement 1\tElement 2\tElement 3\tElement 4\tElement 5\tElement 6\tElement 7\tElement 8\tElement 9\tElement 10\tElement 11\tElement 12\tElement 13\tElement 14\tElement 15\tElement 16\tElement 17\tElement 18\tElement 19\tElement 20\tElement 21\tElement 22\tElement 23\tElement 24\tElement 25\tElement 26\tElement 27\tElement 28\tElement 29\tElement 30\tElement 31\tElement 32\tElement 33\tElement 34\tElement 35\t FF\t FFI0\n+ 8133.13\t0.050687\t738634.0\t198287.0\t446957.0\t1.31509\t-0.812747\t 648.1\t 731.3\t 697.7\t 667.5\t 675.9\t 604.5\t 730.4\t 714.6\t 704.2\t 671.8\t 699.3\t 682.7\t 743.2\t 727.3\t 739.5\t 781.7\t 680.0\t 650.8\t 708.6\t 674.8\t 731.5\t 657.0\t 613.2\t 636.2\t 629.0\t 581.6\t 677.3\t 644.8\t 570.6\t 601.6\t 517.1\t 622.2\t 601.3\t 556.2\t 574.9\t 521.4\t2.367e+04\t0.032045138\n+ 8133.40\t0.044525\t648877.0\t174263.0\t392950.0\t1.31468\t-0.813117\t 568.7\t 616.2\t 605.1\t 600.5\t 593.5\t 518.8\t 616.1\t 736.1\t 700.1\t 580.7\t 605.5\t 603.8\t 643.7\t 624.6\t 668.4\t 624.3\t 599.7\t 582.6\t 638.8\t 668.9\t 611.5\t 570.8\t 580.2\t 529.8\t 571.5\t 552.9\t 539.7\t 571.5\t 566.5\t 566.4\t 520.3\t 506.3\t 520.4\t 496.5\t 517.9\t 470.6\t2.109e+04\t0.032500898\n+ 8133.66\t0.044532\t648834.0\t174351.0\t393126.0\t1.31411\t-0.813060\t 617.1\t 625.3\t 579.0\t 629.4\t 584.6\t 510.4\t 655.1\t 725.2\t 636.0\t 598.7\t 590.3\t 604.0\t 640.6\t 633.2\t 624.8\t 671.3\t 609.8\t 497.8\t 565.3\t 581.3\t 603.5\t 602.1\t 581.1\t 568.9\t 574.5\t 580.8\t 582.4\t 572.6\t 550.7\t 522.0\t 473.1\t 518.7\t 572.3\t 463.4\t 505.0\t 462.1\t2.091e+04\t0.032230969\n+ 8133.93\t0.040231\t586129.0\t157551.0\t355229.0\t1.31379\t-0.813013\t 560.4\t 542.4\t 566.3\t 557.1\t 506.3\t 470.2\t 576.0\t 612.4\t 611.9\t 552.8\t 510.3\t 516.7\t 562.7\t 585.5\t 598.2\t 583.7\t 550.2\t 497.0\t 543.0\t 554.7\t 544.2\t 476.5\t 528.8\t 483.3\t 539.5\t 524.5\t 505.0\t 492.3\t 513.7\t 496.5\t 421.3\t 477.3\t 437.8\t 417.0\t 478.2\t 411.6\t1.881e+04\t0.032083698\n+ 8134.19\t0.048931\t712875.0\t191692.0\t432571.0\t1.31342\t-0.813857\t 647.0\t 642.4\t 668.3\t 663.3\t 597.1\t 614.1\t 655.1\t 753.7\t 701.7\t 679.0\t 642.7\t 700.8\t 659.3\t 701.4\t 691.8\t 713.0\t 673.5\t 590.0\t 648.3\t 687.5\t 691.5\t 633.8\t 658.1\t 602.8\t 636.9\t 576.3\t 607.3\t 619.8\t 610.9\t 545.7\t 598.0\t 564.6\t 597.9\t 556.4\t 524.3\t 550.6\t2.290e+04\t0.032130351\n+ 8134.46\t0.046559\t678293.0\t182524.0\t411820.0\t1.31270\t-0.813705\t 620.2\t 640.0\t 630.5\t 597.9\t 619.9\t 580.4\t 645.3\t 682.7\t 677.5\t 641.5\t 589.1\t 606.1\t 705.6\t 667.9\t 648.6\t 690.1\t 638.5\t 578.5\t 595.3\t 674.2\t 626.4\t 668.3\t 561.5\t 574.0\t 584.9\t 620.1\t 632.6\t 612.5\t 586.1\t 585.4\t 501.8\t 583.8\t 565.5\t 504.2\t 486.9\t 487.4\t2.191e+04\t0.032303522\n+ 8134.72\t0.059257\t863193.0\t232288.0\t524307.0\t1.31266\t-0.814099\t 781.0\t 809.9\t 853.7\t 766.3\t 760.4\t 685.5\t 821.8\t 917.8\t 861.2\t 836.9\t 781.3\t 769.4\t 837.1\t 857.5\t 841.4\t 864.8\t 771.5\t 725.0\t 817.6\t 771.3\t 823.2\t 812.7\t 766.9\t 760.1\t 734.9\t 769.1\t 770.6\t 781.9\t 779.5\t 786.8\t 673.1\t 717.4\t 699.5\t 667.9\t 617.8\t 665.6\t2.796e+04\t0.032389310\n+ 8134.99\t0.038476\t560346.0\t150862.0\t340507.0\t1.31219\t-0.814070\t 468.6\t 506.0\t 535.4\t 521.4\t 506.0\t 467.1\t 531.3\t 600.7\t 569.7\t '..b' 5484\t 5190\t 5201\t 5304\t 5421\t 5285\t 4996\t 4959\t 4258\t 4705\t 4583\t 4626\t 4468\t 4250\t2.005e+05\t0.357144382\n+ 9180.31\t0.044944\t535591.0\t431368.0\t506314.0\t0.216409\t-0.160195\t 5633\t 5972\t 6109\t 5545\t 5516\t 4785\t 5801\t 6085\t 6109\t 5935\t 5543\t 5250\t 5872\t 6217\t 6164\t 6019\t 5619\t 4954\t 5442\t 5694\t 5627\t 5406\t 5362\t 5011\t 4866\t 5010\t 5153\t 5105\t 4794\t 4558\t 4008\t 4399\t 4562\t 4408\t 4049\t 3868\t1.904e+05\t0.355584999\n+ 9180.65\t0.041622\t495881.0\t399630.0\t469346.0\t0.215797\t-0.160801\t 5256\t 5155\t 5494\t 5347\t 5096\t 4458\t 5434\t 5705\t 5439\t 5522\t 5073\t 4778\t 5450\t 5845\t 5562\t 5502\t 5041\t 4695\t 5068\t 5337\t 5509\t 4991\t 4854\t 4561\t 4571\t 4678\t 4728\t 4688\t 4522\t 4216\t 3843\t 4021\t 4203\t 3962\t 3983\t 3637\t1.762e+05\t0.355371140\n+ 9180.99\t0.040477\t482139.0\t388692.0\t456364.0\t0.215445\t-0.160503\t 5049\t 5267\t 5352\t 4979\t 5150\t 4440\t 5347\t 5516\t 5585\t 5284\t 4989\t 4735\t 5320\t 5605\t 5444\t 5204\t 5112\t 4608\t 5078\t 5179\t 5161\t 4939\t 4769\t 4418\t 4452\t 4476\t 4826\t 4536\t 4288\t 4219\t 3646\t 4089\t 3916\t 3904\t 3773\t 3627\t1.723e+05\t0.357327028\n+ 9181.33\t0.052876\t629919.0\t507980.0\t596293.0\t0.215149\t-0.160290\t 6591\t 6729\t 6860\t 6696\t 6577\t 5663\t 7057\t 7308\t 7076\t 6903\t 6556\t 6179\t 6947\t 7047\t 7378\t 6947\t 6561\t 5826\t 6671\t 6819\t 6619\t 6276\t 6145\t 5711\t 5831\t 5770\t 6133\t 5922\t 5748\t 5508\t 4777\t 5174\t 5243\t 5048\t 5007\t 4535\t2.238e+05\t0.355344022\n+ 9181.67\t0.043449\t517552.0\t417394.0\t490545.0\t0.215079\t-0.161486\t 5418\t 5582\t 5734\t 5488\t 5339\t 4768\t 5742\t 6084\t 5781\t 5804\t 5444\t 5103\t 5619\t 6037\t 5824\t 5763\t 5398\t 4750\t 5384\t 5589\t 5606\t 5285\t 5146\t 4681\t 4730\t 4883\t 5045\t 4891\t 4771\t 4468\t 3919\t 4188\t 4468\t 4232\t 4067\t 3833\t1.849e+05\t0.357190382\n+ 9182.01\t0.052313\t623049.0\t502675.0\t590548.0\t0.214681\t-0.161107\t 6424\t 6800\t 6876\t 6481\t 6427\t 5547\t 6853\t 7170\t 7020\t 6867\t 6520\t 6019\t 6765\t 7084\t 7146\t 6929\t 6356\t 5742\t 6340\t 6593\t 6676\t 6436\t 6119\t 5852\t 5678\t 5745\t 6126\t 5814\t 5528\t 5425\t 4739\t 5076\t 5207\t 4877\t 4956\t 4582\t2.208e+05\t0.354380459\n+ 9182.35\t0.043665\t519948.0\t419721.0\t493398.0\t0.214139\t-0.161726\t 5459\t 5695\t 5736\t 5467\t 5310\t 4670\t 5673\t 5932\t 5776\t 5677\t 5356\t 4993\t 5644\t 6114\t 5864\t 5798\t 5389\t 4711\t 5483\t 5764\t 5541\t 5385\t 5209\t 4671\t 4715\t 4896\t 5206\t 4873\t 4522\t 4546\t 3845\t 4276\t 4444\t 4196\t 4145\t 3876\t1.849e+05\t0.355533065\n+ 9182.69\t0.050977\t606958.0\t490132.0\t576188.0\t0.213785\t-0.161759\t 6400\t 6688\t 6847\t 6300\t 6236\t 5517\t 6826\t 6911\t 6888\t 6671\t 6345\t 5962\t 6817\t 7021\t 7059\t 6754\t 6301\t 5651\t 6175\t 6547\t 6622\t 6226\t 6021\t 5703\t 5551\t 5793\t 5964\t 5748\t 5469\t 5358\t 4709\t 4975\t 5021\t 5001\t 4812\t 4599\t2.175e+05\t0.358318001\n' |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/h5.zip |
| b |
| Binary file test-data/h5.zip has changed |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/test.prj |
| b |
| Binary file test-data/test.prj has changed |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/test.xmu --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/test.xmu Tue Nov 14 15:34:40 2023 +0000 |
| b |
| b'@@ -0,0 +1,369 @@\n+#%name: FeS2 powder Room Temperature\n+#%atom: FeS2\n+#%edge: K\n+#%xtal: FeS2.inp\n+#%prep: powder on tape, 4 layers\n+#%ref: none\n+#%misc: Energy drive values recorded (encoder used, not recorded)\n+#%det: I0=N2 15cm; I1=N2 15cm\n+#%temp: Room Temperature\n+#%beam: GSECARS 13BM, vert slits = 2mm (at 45m)\n+#%mono: Si(111) unfocussed, detuned 50%\n+#%date: Sat Mar 16 15:13:22 2002\n+#%cols: 348 E XMU I0\n+#------------------------\n+# energy xmu i0\n+ 6911.8277 0.80926541 272002.00\n+ 6916.9236 0.80418730 270032.00\n+ 6921.7638 0.79959074 268827.00\n+ 6926.8750 0.79459529 267514.00\n+ 6931.7907 0.79004613 255214.00\n+\n+ 6962.0000 0.78791063 305150.00\n+ 6972.0000 0.77475191 306445.00\n+ 6982.0000 0.76169076 306446.00\n+ 6992.0000 0.74992551 306744.00\n+ 7002.0000 0.73660315 306246.00\n+ 7012.0000 0.72423404 306358.00\n+ 7022.0000 0.71196509 306309.00\n+ 7032.0000 0.70002723 306019.00\n+ 7042.0000 0.68735767 306529.00\n+ 7052.0000 0.67439453 306124.00\n+ 7062.0000 0.66235517 306188.00\n+ 7072.0000 0.65022361 306119.00\n+ 7082.0000 0.63942705 306143.00\n+ 7092.0000 0.62824650 306098.00\n+ 7092.5000 0.62753795 305825.00\n+ 7093.0000 0.62748380 305756.00\n+ 7093.5000 0.62785219 305745.00\n+ 7094.0000 0.62636441 305717.00\n+ 7094.5000 0.62575793 305670.00\n+ 7095.0000 0.62551244 305666.00\n+ 7095.5000 0.62515947 305631.00\n+ 7096.0000 0.62492947 305585.00\n+ 7096.5000 0.62367544 305536.00\n+ 7097.0000 0.62332504 305539.00\n+ 7097.5000 0.62259547 305510.00\n+ 7098.0000 0.62252464 305466.00\n+ 7098.5000 0.62240279 305494.00\n+ 7099.0000 0.62172416 305432.00\n+ 7099.5000 0.62098768 305503.00\n+ 7100.0000 0.62118707 305402.00\n+ 7100.5000 0.62045272 305414.00\n+ 7101.0000 0.62040785 305391.00\n+ 7101.5000 0.62002332 305400.00\n+ 7102.0000 0.61932445 305952.00\n+ 7102.5000 0.61954721 305420.00\n+ 7103.0000 0.61934375 304860.00\n+ 7103.5000 0.61907141 305180.00\n+ 7104.0000 0.61843263 305180.00\n+ 7104.5000 0.61879967 305435.00\n+ 7105.0000 0.61854579 305144.00\n+ 7105.5000 0.61837948 305045.00\n+ 7106.0000 0.61887282 304943.00\n+ 7106.5000 0.61837848 305015.00\n+ 7107.0000 0.61844121 305023.00\n+ 7107.5000 0.61908174 304990.00\n+ 7108.0000 0.62025344 305117.00\n+ 7108.5000 0.62083284 305305.00\n+ 7109.0000 0.62279082 304852.00\n+ 7109.5000 0.62484776 304938.00\n+ 7110.0000 0.63029578 305214.00\n+ 7110.5000 0.63827614 304831.00\n+ 7111.0000 0.65354125 304668.00\n+ 7111.5000 0.67171017 304489.00\n+ 7112.0000 0.68465719 304804.00\n+ 7112.5000 0.68977450 304821.00\n+ 7113.0000 0.68982223 304700.00\n+ 7113.5000 0.68880150 304652.00\n+ 7114.0000 0.68631667 304907.00\n+ 7114.5000 0.68636382 304536.00\n+ 7115.0000 0.69345881 305540.00\n+ 7115.5000 0.71368054 306249.00\n+ 7116.0000 0.75470012 306100.00\n+ 7116.5000 0.82334644 305917.00\n+ 7117.0000 0.91897755 306536.00\n+ 7117.5000 1.0048919 306925.00\n+ 7118.0000 1.0613446 306741.00\n+ 7118.5000 1.1171460 306475.00\n+ 7119.0000 1.1598287 306428.00\n+ 7119.5000 1.1845153 306460.00\n+ 7120.0000 1.1839175 306450.'..b'.00\n+ 7556.1560 0.75093523 305560.00\n+ 7560.2820 0.74539760 305668.00\n+ 7564.4270 0.74088376 305785.00\n+ 7568.5910 0.73831944 305684.00\n+ 7572.7740 0.73529922 305582.00\n+ 7576.9770 0.73187551 305523.00\n+ 7581.1980 0.72922440 305558.00\n+ 7585.4390 0.72676436 305647.00\n+ 7589.6980 0.72359612 305208.00\n+ 7593.9770 0.71807714 306038.00\n+ 7598.2750 0.71252104 305315.00\n+ 7602.5920 0.70549579 305573.00\n+ 7606.9280 0.69954396 305378.00\n+ 7611.2830 0.69265029 305425.00\n+ 7615.6570 0.68689223 305488.00\n+ 7620.0500 0.68092659 305297.00\n+ 7624.4620 0.67499882 305001.00\n+ 7628.8940 0.66889046 305246.00\n+ 7633.3440 0.66341014 305391.00\n+ 7637.8130 0.65798296 305277.00\n+ 7642.3020 0.65352747 305129.00\n+ 7646.8100 0.64842668 305185.00\n+ 7651.3360 0.64433064 305107.00\n+ 7655.8820 0.64130624 304968.00\n+ 7660.4470 0.63726602 303292.00\n+ 7665.0300 0.63282645 306701.00\n+ 7669.6340 0.62771419 304931.00\n+ 7674.2550 0.62136047 304917.00\n+ 7678.8960 0.61572914 304978.00\n+ 7683.5570 0.61094428 305007.00\n+ 7688.2360 0.60604922 304909.00\n+ 7692.9350 0.60062272 304867.00\n+ 7697.6520 0.59482509 304843.00\n+ 7702.3890 0.58954937 304732.00\n+ 7707.1440 0.58505148 304761.00\n+ 7711.9190 0.58034243 304780.00\n+ 7716.7120 0.57641028 304730.00\n+ 7721.5250 0.57240859 304752.00\n+ 7726.3570 0.56757710 304652.00\n+ 7731.2080 0.56298530 304949.00\n+ 7736.0780 0.55790407 301749.00\n+ 7740.9670 0.55415072 309843.00\n+ 7745.8750 0.55025596 306494.00\n+ 7750.8030 0.54458907 306086.00\n+ 7755.7500 0.53968840 306137.00\n+ 7760.7150 0.53400917 306150.00\n+ 7765.6990 0.52848485 306231.00\n+ 7770.7030 0.52243506 306178.00\n+ 7775.7260 0.51730921 305604.00\n+ 7780.7670 0.51119667 306396.00\n+ 7785.8280 0.50502129 306122.00\n+ 7790.9080 0.49915279 306044.00\n+ 7796.0070 0.49353357 305959.00\n+ 7801.1250 0.48866156 305944.00\n+ 7806.2620 0.48323724 305753.00\n+ 7811.4180 0.47782882 305897.00\n+ 7816.5940 0.47305934 305849.00\n+ 7821.7880 0.46837192 305834.00\n+ 7827.0010 0.46392860 305216.00\n+ 7832.2340 0.45913400 306347.00\n+ 7837.4850 0.45441121 305718.00\n+ 7842.7560 0.44961359 305672.00\n+ 7848.0460 0.44433501 305591.00\n+ 7853.3540 0.43874661 305721.00\n+ 7858.6830 0.43362602 305761.00\n+ 7864.0300 0.42833655 305543.00\n+ 7869.3960 0.42287776 305580.00\n+ 7874.7810 0.41790268 305561.00\n+ 7880.1850 0.41331540 305567.00\n+ 7885.6080 0.40736809 305548.00\n+ 7891.0510 0.40162419 305485.00\n+ 7896.5120 0.39641156 305410.00\n+ 7901.9920 0.39158402 305454.00\n+ 7907.4920 0.38664929 305471.00\n+ 7913.0110 0.38183248 305389.00\n+ 7918.5480 0.37664824 305311.00\n+ 7924.1050 0.37186542 305383.00\n+ 7929.6810 0.36622348 305224.00\n+ 7935.2760 0.36059857 305309.00\n+ 7940.8900 0.35529935 304801.00\n+ 7946.5230 0.34983333 305709.00\n+ 7952.1750 0.34434706 305185.00\n+ 7957.8470 0.33897801 305134.00\n+ 7963.5370 0.33392445 305037.00\n+ 7969.2470 0.32835579 305340.00\n' |
| b |
| diff -r 000000000000 -r ae2f265ecf8e test-data/test.zip |
| b |
| Binary file test-data/test.zip has changed |