comparison larch_athena.xml @ 4:a0d3b0fe0fa3 draft

planemo upload for repository https://github.com/MaterialsGalaxy/larch-tools/tree/main/larch_athena commit 3fe6078868efd0fcea0fb5eea8dcd4b152d9c0a8
author muon-spectroscopy-computational-project
date Thu, 11 Apr 2024 09:01:59 +0000
parents 82e9dd980916
children 27015eaf9a78
comparison
equal deleted inserted replaced
3:82e9dd980916 4:a0d3b0fe0fa3
1 <tool id="larch_athena" name="Larch Athena" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT"> 1 <tool id="larch_athena" name="Larch Athena" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.05" license="MIT">
2 <description>generate Athena projects from XAFS data</description> 2 <description>generate Athena projects from XAFS data</description>
3 <macros> 3 <macros>
4 <!-- version of underlying tool (PEP 440) --> 4 <!-- version of underlying tool (PEP 440) -->
5 <token name="@TOOL_VERSION@">0.9.74</token> 5 <token name="@TOOL_VERSION@">0.9.75</token>
6 <!-- version of this tool wrapper (integer) --> 6 <!-- version of this tool wrapper (integer) -->
7 <token name="@WRAPPER_VERSION@">1</token> 7 <token name="@WRAPPER_VERSION@">0</token>
8 <!-- citation should be updated with every underlying tool version --> 8 <!-- citation should be updated with every underlying tool version -->
9 <!-- typical fields to update are version, month, year, and doi --> 9 <!-- typical fields to update are version, month, year, and doi -->
10 <token name="@TOOL_CITATION@">10.1088/1742-6596/430/1/012007</token> 10 <token name="@TOOL_CITATION@">10.1088/1742-6596/430/1/012007</token>
11 <xml name="format"> 11 <xml name="format">
12 <param name="format" type="select" display="radio" label="Input format" help="Whether data is in plaintext or already saved as an Athena project"> 12 <param name="format" type="select" display="radio" label="Input format" help="Whether data is in tabular or NeXus (h5) format, or has already saved as an Athena project">
13 <option value="plaintext" selected="true">Plaintext</option> 13 <option value="plaintext" selected="true">NeXus/tabular</option>
14 <option value="athena">Athena project</option> 14 <option value="athena">Athena project</option>
15 </param> 15 </param>
16 </xml> 16 </xml>
17 <xml name="extract_group"> 17 <xml name="extract_group">
18 <conditional name="extract_group"> 18 <conditional name="extract_group">
31 </when> 31 </when>
32 <when value="all"/> 32 <when value="all"/>
33 </conditional> 33 </conditional>
34 </xml> 34 </xml>
35 <xml name="columns"> 35 <xml name="columns">
36 <param name="energy_column" type="text" optional="true" label="Energy column" help="If set, this column we be used as 'energy'. Otherwise, will identify the first column ending with 'energy' or labelled 'col1' 'Ef'."/> 36 <conditional name="energy_column">
37 <param name="mu_column" type="text" optional="true" label="μ column" help="If set, this column we be used as 'mu'. Otherwise, will identify the first column labelled as either 'col2', 'xmu', 'lni0it', 'FFI0' or 'FF/I1'."/> 37 <param name="energy_column" type="select" label="Energy column" help="If set, this column will be used as 'energy'. Otherwise, will identify the first column ending with 'energy' or labelled 'col1' 'Ef'.">
38 <option value="auto" selected="true">Automatic</option>
39 <option value="qexafs_energy" selected="true">qexafs_energy</option>
40 <option value="Ef" selected="true">Ef</option>
41 <option value="other" selected="true">Other</option>
42 </param>
43 <when value="auto"/>
44 <when value="qexafs_energy"/>
45 <when value="Ef"/>
46 <when value="other">
47 <param name="energy_column_text" type="text" label="Energy column" help="The column to be used as 'energy'."/>
48 </when>
49 </conditional>
50 <conditional name="mu_column">
51 <param name="mu_column" type="select" label="μ column" help="If set, this column will be used as 'mu'. Otherwise, will identify the first column labelled as either 'col2', 'xmu', 'lni0it', 'FFI0' or 'FF/I1'.">
52 <option value="auto" selected="true">Automatic</option>
53 <option value="lnI0It" selected="true">lnI0It</option>
54 <option value="FFI0" selected="true">FFI0</option>
55 <option value="FF/I1" selected="true">FF/I1</option>
56 <option value="other" selected="true">Other</option>
57 </param>
58 <when value="auto"/>
59 <when value="lnI0It"/>
60 <when value="FFI0"/>
61 <when value="FF/I1"/>
62 <when value="other">
63 <param name="mu_column_text" type="text" optional="true" label="μ column" help="The column to be used as 'mu'."/>
64 </when>
65 </conditional>
38 </xml> 66 </xml>
39 <xml name="is_zipped"> 67 <xml name="is_zipped">
40 <param name="is_zipped" type="select" display="radio" label="Inputs Zipped" help="Whether plaintext input files are zipped together into one directory, or not."> 68 <param name="is_zipped" type="select" display="radio" label="Inputs Zipped" help="Whether input files are zipped together into one directory, or not.">
41 <option value="" selected="true">No</option> 69 <option value="" selected="true">No</option>
42 <option value="true">Yes</option> 70 <option value="true">Yes</option>
43 </param> 71 </param>
44 </xml> 72 </xml>
45 <import>macros.xml</import> 73 <import>macros.xml</import>
88 <expand macro="format"/> 116 <expand macro="format"/>
89 <when value="plaintext"> 117 <when value="plaintext">
90 <conditional name="is_zipped" > 118 <conditional name="is_zipped" >
91 <expand macro="is_zipped"/> 119 <expand macro="is_zipped"/>
92 <when value=""> 120 <when value="">
93 <param name="dat_file" type="data" format="h5,tabular" label="XAFS data file" help="X-ray Absorption Fine Structure (XAFS) data, either in h5 or plaintext."/> 121 <param name="dat_file" type="data" format="h5,tabular" label="XAFS data file" help="X-ray Absorption Fine Structure (XAFS) data, either in NeXus (h5) or tabular format."/>
94 </when> 122 </when>
95 <when value="true"> 123 <when value="true">
96 <param name="dat_file" type="data" format="zip" label="Zipped XAFS data files" help="Zipped X-ray Absorption Fine Structure (XAFS) data, either in h5 or plaintext."/> 124 <param name="dat_file" type="data" format="zip" label="Zipped XAFS data files" help="Zipped X-ray Absorption Fine Structure (XAFS) data, either in NeXus (h5) or tabular format."/>
97 </when> 125 </when>
98 </conditional> 126 </conditional>
99 <expand macro="columns"/> 127 <expand macro="columns"/>
100 </when> 128 </when>
101 <when value="athena"> 129 <when value="athena">
109 <expand macro="format"/> 137 <expand macro="format"/>
110 <when value="plaintext"> 138 <when value="plaintext">
111 <conditional name="is_zipped" > 139 <conditional name="is_zipped" >
112 <expand macro="is_zipped"/> 140 <expand macro="is_zipped"/>
113 <when value=""> 141 <when value="">
114 <param name="dat_file" type="data" format="h5,txt" multiple="true" label="XAFS data file" help="X-ray Absorption Fine Structure (XAFS) data, either in h5 or plaintext, which will be merged. Accepts individual files or a zip."/> 142 <param name="dat_file" type="data" format="h5,txt" multiple="true" label="XAFS data file" help="X-ray Absorption Fine Structure (XAFS) data, either in NeXus (h5) or tabular format, which will be merged. Accepts individual files or a zip."/>
115 </when> 143 </when>
116 <when value="true"> 144 <when value="true">
117 <param name="dat_file" type="data" format="zip" label="Zipped XAFS data files" help="Zipped X-ray Absorption Fine Structure (XAFS) data, either in h5 or plaintext. All files in the zip will be merged."/> 145 <param name="dat_file" type="data" format="zip" label="Zipped XAFS data files" help="Zipped X-ray Absorption Fine Structure (XAFS) data, either in NeXus (h5) or tabular format. All files in the zip will be merged."/>
118 </when> 146 </when>
119 </conditional> 147 </conditional>
120 <expand macro="columns"/> 148 <expand macro="columns"/>
121 </when> 149 </when>
122 <when value="athena"> 150 <when value="athena">
127 </when> 155 </when>
128 </conditional> 156 </conditional>
129 <param name="annotation" type="text" label="Annotation" optional="true" help="If set, will annotate the output project(s) with this string. This will be used to generate legends when plotting data."/> 157 <param name="annotation" type="text" label="Annotation" optional="true" help="If set, will annotate the output project(s) with this string. This will be used to generate legends when plotting data."/>
130 <section name="processing" expanded="true" title="Processing Options" help="By default, the following processing steps will be performed either with default values, or those contained in the input Athena project (if used). If specified here, these values will be used instead for process in sequence."> 158 <section name="processing" expanded="true" title="Processing Options" help="By default, the following processing steps will be performed either with default values, or those contained in the input Athena project (if used). If specified here, these values will be used instead for process in sequence.">
131 <conditional name="calibrate"> 159 <conditional name="calibrate">
132 <param name="calibrate" type="select" label="Calibrate energy" help="If set, will shift the spectrum so that its (automatically determined) edge occurs at the specified value, and any values outside the range will be discarded."> 160 <param name="calibrate" type="select" display="radio" label="Calibrate energy" help="If set, will shift the spectrum so that its (automatically determined) edge occurs at the specified value, and any values outside the range will be discarded.">
133 <option value="" selected="true">False</option> 161 <option value="" selected="true">False</option>
134 <option value="true">True</option> 162 <option value="true">True</option>
135 </param> 163 </param>
136 <when value=""/> 164 <when value=""/>
137 <when value="true"> 165 <when value="true">
140 <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 (after re-calibrating)."/> 168 <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 (after re-calibrating)."/>
141 </when> 169 </when>
142 </conditional> 170 </conditional>
143 <param name="rebin" type="boolean" label="Re-bin data" help="Whether to re-bin along the energy axis to automatically ensure appropriate levels of precision in the pre-edge, near-edge and extended region of the spectrum."/> 171 <param name="rebin" type="boolean" label="Re-bin data" help="Whether to re-bin along the energy axis to automatically ensure appropriate levels of precision in the pre-edge, near-edge and extended region of the spectrum."/>
144 <conditional name="pre_edge"> 172 <conditional name="pre_edge">
145 <param name="pre_edge" type="select" label="Pre-edge normalization" help="If set, will (re)perform forward pre-edge normalization using provided values."> 173 <param name="pre_edge" type="select" display="radio" label="Pre-edge normalization" help="If set, will (re)perform forward pre-edge normalization using provided values.">
146 <option value="" selected="true">False</option> 174 <option value="" selected="true">Use default values</option>
147 <option value="true">True</option> 175 <option value="ref">Use reference channel</option>
176 <option value="manual">Use manual values</option>
148 </param> 177 </param>
149 <when value=""/> 178 <when value=""/>
150 <when value="true"> 179 <when value="ref">
180 <param name="ref_channel" type="text" label="Reference channel" help="The channel to be used as a refernce to determine the pre-edge settings which are then used for the main signal. This can help when the main signal is affected by signal noise."/>
181 </when>
182 <when value="manual">
151 <param argument="e0" type="float" label="Edge energy (eV)" optional="true" help="If set, normalization will use this as the location of the edge rather than automatically determining it."/> 183 <param argument="e0" type="float" label="Edge energy (eV)" optional="true" help="If set, normalization will use this as the location of the edge rather than automatically determining it."/>
152 <param argument="pre1" type="float" max="0" label="Pre-edge fit lower energy (eV)" optional="true" help="The lower end of the region used for the pre-edge fitting, relative to the edge energy (and therefore negative)."/> 184 <param argument="pre1" type="float" max="0" label="Pre-edge fit lower energy (eV)" optional="true" help="The lower end of the region used for the pre-edge fitting, relative to the edge energy (and therefore negative)."/>
153 <param argument="pre2" type="float" max="0" label="Pre-edge fit upper energy (eV)" optional="true" help="The upper end of the region used for the pre-edge fitting, relative to the edge energy (and therefore negative)."/> 185 <param argument="pre2" type="float" max="0" label="Pre-edge fit upper energy (eV)" optional="true" help="The upper end of the region used for the pre-edge fitting, relative to the edge energy (and therefore negative)."/>
154 <param argument="norm1" type="float" min="0" label="Post-edge fit lower energy (eV)" optional="true" help="The lower end of the region used for the post-edge fitting, relative to the edge energy (and therefore positive)."/> 186 <param argument="norm1" type="float" min="0" label="Post-edge fit lower energy (eV)" optional="true" help="The lower end of the region used for the post-edge fitting, relative to the edge energy (and therefore positive)."/>
155 <param argument="norm2" type="float" min="0" label="Post-edge fit upper energy (eV)" optional="true" help="The upper end of the region used for the post-edge fitting, relative to the edge energy (and therefore positive)."/> 187 <param argument="norm2" type="float" min="0" label="Post-edge fit upper energy (eV)" optional="true" help="The upper end of the region used for the post-edge fitting, relative to the edge energy (and therefore positive)."/>
157 <param argument="step" type="float" min="0" label="Edge step" optional="true" help="Magnitude of the step in μ between the pre and post-edge regions at the edge energy."/> 189 <param argument="step" type="float" min="0" label="Edge step" optional="true" help="Magnitude of the step in μ between the pre and post-edge regions at the edge energy."/>
158 <param argument="nvict" type="integer" label="Energy exponent" optional="true" help="Edge fitting will be performed against μ*E**n where n is defined here. This is 0 by default."/> 190 <param argument="nvict" type="integer" label="Energy exponent" optional="true" help="Edge fitting will be performed against μ*E**n where n is defined here. This is 0 by default."/>
159 </when> 191 </when>
160 </conditional> 192 </conditional>
161 <conditional name="xftf"> 193 <conditional name="xftf">
162 <param name="xftf" type="select" label="XFTF" help="If set, will (re)perform forward Fourier Transform using provided values."> 194 <param name="xftf" type="select" display="radio" label="XFTF" help="If set, will (re)perform forward Fourier Transform using provided values.">
163 <option value="" selected="true">False</option> 195 <option value="" selected="true">False</option>
164 <option value="true">True</option> 196 <option value="true">True</option>
165 </param> 197 </param>
166 <when value=""/> 198 <when value=""/>
167 <when value="true"> 199 <when value="true">
252 <has_size value="5400" delta="100"/> 284 <has_size value="5400" delta="100"/>
253 </assert_contents> 285 </assert_contents>
254 </output> 286 </output>
255 <output name="plot"> 287 <output name="plot">
256 <assert_contents> 288 <assert_contents>
257 <has_size value="134972" delta="20"/> 289 <has_size value="138100" delta="100"/>
258 </assert_contents> 290 </assert_contents>
259 </output> 291 </output>
260 </test> 292 </test>
261 <!-- 5 --> 293 <!-- 5 -->
262 <test expect_num_outputs="2"> 294 <test expect_num_outputs="2">
301 <has_size value="3300" delta="50"/> 333 <has_size value="3300" delta="50"/>
302 </assert_contents> 334 </assert_contents>
303 </output> 335 </output>
304 <output name="plot"> 336 <output name="plot">
305 <assert_contents> 337 <assert_contents>
306 <has_size value="134700" delta="100"/> 338 <has_size value="137700" delta="100"/>
307 </assert_contents> 339 </assert_contents>
308 </output> 340 </output>
309 </test> 341 </test>
310 <!-- 9 --> 342 <!-- 9 -->
311 <test expect_num_outputs="1"> 343 <test expect_num_outputs="1">
362 <has_size value="4500" delta="100"/> 394 <has_size value="4500" delta="100"/>
363 </assert_contents> 395 </assert_contents>
364 </output> 396 </output>
365 <output name="plot"> 397 <output name="plot">
366 <assert_contents> 398 <assert_contents>
367 <has_size value="135000" delta="100"/> 399 <has_size value="145700" delta="100"/>
368 </assert_contents> 400 </assert_contents>
369 </output> 401 </output>
370 </test> 402 </test>
371 <!-- 14 --> 403 <!-- 14 -->
372 <test expect_num_outputs="1"> 404 <test expect_num_outputs="1">
404 <assert_contents> 436 <assert_contents>
405 <has_size value="26000" delta="100"/> 437 <has_size value="26000" delta="100"/>
406 </assert_contents> 438 </assert_contents>
407 </output> 439 </output>
408 </test> 440 </test>
441 <!-- 18: Use ref channel -->
442 <test expect_num_outputs="1">
443 <param name="dat_file" value="ffi0.tabular"/>
444 <param name="pre_edge" value="ref"/>
445 <param name="ref_channel" value="lnitiref"/>
446 <output name="athena_project_file">
447 <assert_contents>
448 <has_size value="34400" delta="100"/>
449 </assert_contents>
450 </output>
451 </test>
409 </tests> 452 </tests>
410 <help><![CDATA[ 453 <help><![CDATA[
411 Using Larch, create an Athena project file from the input X-ray Absorption Fine Structure (XAFS) data file. 454 Using Larch, create an Athena project file from the input X-ray Absorption Fine Structure (XAFS) data file.
412 455
413 Accepts both plaintext and HDF5 formatted data or a zip file containing these formats. 456 Accepts both tabular and NeXus/HDF5 formatted data or a zip file containing these formats.
414 If column names are not present in plaintext data, then the first column is treated as `energy` and the second as `mu`. 457 If column names are not present in tabular data, then the first column is treated as `energy` and the second as `mu`.
415 Note that in order to ensure a consistent output, once unzipped all files will sorted first by their parent directories (alphabetically). 458 Note that in order to ensure a consistent output, once unzipped all files will sorted first by their parent directories (alphabetically).
416 Within a given directory, if all filenames contain digits then the last block of digits will be used to sort the files numerically. 459 Within a given directory, if all filenames contain digits then the last block of digits will be used to sort the files numerically.
417 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). 460 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).
418 Care should therefore be taken to ensure input data is consistent with this treatment. 461 Care should therefore be taken to ensure input data is consistent with this treatment.
419 462