-
Notifications
You must be signed in to change notification settings - Fork 67
NXxas refactoring #1352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
NXxas refactoring #1352
Changes from all commits
17850c6
c6dc90c
7d26247
02e43f7
302f4d5
68314c9
44e0f73
cf489f8
96197ac
424a6b2
e9269b8
a569c40
3e46fe1
5ffe42b
a850c68
4198517
c8ecc5d
8a05745
fafb8e1
cb619db
f01648c
82d3484
786109e
85a2c84
dd1905a
ba5c583
f488b28
01edb08
9327f24
31497e8
29e34af
5a9afa2
8df42cd
e8a7510
3394ffd
99af555
8eb8cb2
b527d7d
f688001
9c9d672
b4d8d90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| # Hidden files | ||
| .* | ||
| !.github | ||
| !.readthedocs.yaml | ||
|
|
||
| # Python byte / compiled / optimized | ||
| *.py[cod] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| version: 2 | ||
|
|
||
| build: | ||
| os: ubuntu-22.04 | ||
| tools: | ||
| python: "3.12" | ||
| commands: | ||
| - pip install -r requirements.txt | ||
| - make prepare | ||
| - make html | ||
| - mkdir -p $READTHEDOCS_OUTPUT/html | ||
| - cp -r build/manual/build/html/* $READTHEDOCS_OUTPUT/html/ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,162 @@ | ||||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?> | ||||||
| <!-- | ||||||
| # NeXus - Neutron and X-ray Common Data Format | ||||||
| # | ||||||
| # Copyright (C) 2008-2022 NeXus International Advisory Committee (NIAC) | ||||||
| # | ||||||
| # This library is free software; you can redistribute it and/or | ||||||
| # modify it under the terms of the GNU Lesser General Public | ||||||
| # License as published by the Free Software Foundation; either | ||||||
| # version 3 of the License, or (at your option) any later version. | ||||||
| # | ||||||
| # This library is distributed in the hope that it will be useful, | ||||||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||||
| # Lesser General Public License for more details. | ||||||
| # | ||||||
| # You should have received a copy of the GNU Lesser General Public | ||||||
| # License along with this library; if not, write to the Free Software | ||||||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||||
| # | ||||||
| # For further information, see http://www.nexusformat.org | ||||||
| --> | ||||||
| <definition name="NXxas_new" extends="NXobject" type="group" category="application" | ||||||
| xmlns="http://definition.nexusformat.org/nxdl/3.1" | ||||||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd "> | ||||||
| <symbols> | ||||||
| <doc> | ||||||
| The symbol(s) listed here will be used below to coordinate datasets with the same shape. | ||||||
| </doc> | ||||||
| <symbol name="nEnergy"> | ||||||
| <doc>Number of energy data points</doc> | ||||||
| </symbol> | ||||||
| <symbol name="nTransitions"> | ||||||
| <doc>Number of electronic transitions</doc> | ||||||
| </symbol> | ||||||
| </symbols> | ||||||
| <doc> | ||||||
| This is an application definition for X-ray absorption spectroscopy. | ||||||
| </doc> | ||||||
| <group type="NXentry"> | ||||||
| <field name="definition"> | ||||||
| <doc> Official NeXus NXDL schema to which this file conforms. TODO: replace NXxas </doc> | ||||||
| <enumeration> | ||||||
| <item value="NXxas_new"></item> | ||||||
| </enumeration> | ||||||
| </field> | ||||||
| <group type="NXxas_mode" name="mode"> | ||||||
| <doc></doc> | ||||||
| </group> | ||||||
| <group type="NXelement" name="element"> | ||||||
| <doc>Excited element</doc> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if I want to do a scan that includes multiple absorption edges (e.g. Carbon K-edge and K L-edge)? Can I specify multiple elements? |
||||||
| </group> | ||||||
| <group type="NXedge" name="edge"> | ||||||
| <doc>Absorption edge</doc> | ||||||
| </group> | ||||||
| <field name="calculated" type="NX_BOOLEAN" units="NX_UNITLESS" optional="true"> | ||||||
| <doc>Specify if the data commes from a calculation</doc> | ||||||
| </field> | ||||||
| <field name="energy" type="NX_FLOAT" units="NX_ENERGY"> | ||||||
| <doc>TODO</doc> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| <field name="intensity" type="NX_FLOAT" units="NX_ANY"> | ||||||
| <doc>TODO</doc> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| <field name="intensity_errors" type="NX_FLOAT" units="NX_ANY"> | ||||||
| <doc>TODO</doc> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| <group type="NXsample"> | ||||||
| <field name="name"> | ||||||
| <doc>Descriptive name of the sample</doc> | ||||||
| </field> | ||||||
| </group> | ||||||
| <group type="NXprocess" optional="true"> | ||||||
| <doc> | ||||||
| Description on how :ref:`energy </NXxas_new/ENTRY/energy-field>` | ||||||
| and :ref:`intensity </NXxas_new/ENTRY/intensity-field>` were obtained | ||||||
| from the raw data. | ||||||
| </doc> | ||||||
| </group> | ||||||
| <group type="NXinstrument" optional="true"> | ||||||
| <group type="NXsource"> | ||||||
| <field name="type"/> | ||||||
| <field name="name"/> | ||||||
| <field name="probe"> | ||||||
| <enumeration> | ||||||
| <item value="x-ray"/> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to allow the "electron energy loss" mode, then you should also allow an "electron" probe type. |
||||||
| </enumeration> | ||||||
| </field> | ||||||
| </group> | ||||||
| <group type="NXmonochromator" name="monochromator" optional="true"> | ||||||
| <field name="energy" type="NX_FLOAT" units="NX_ENERGY" optional="true"> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| <group type="NXcrystal" name ="crystal" optional="true"> | ||||||
| <field name="d_spacing" type="NX_FLOAT" units="NX_LENGTH"> | ||||||
| <doc>spacing between crystal planes of the reflection</doc> | ||||||
| </field> | ||||||
| <field name="type"> | ||||||
| <doc>Type or material of monochromating substance (Si, Ge, Multilayer).</doc> | ||||||
| </field> | ||||||
| <field name="reflection" type="NX_INT" units="NX_UNITLESS"> | ||||||
| <doc>Miller indices (hkl) values of nominal reflection</doc> | ||||||
| <dimensions> | ||||||
| <dim index="1" value="3"/> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| </group> | ||||||
| </group> | ||||||
| <group type="NXdetector" minOccurs="0" maxOccurs="unbounded"> | ||||||
| <field name="data" type="NX_NUMBER"> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| </group> | ||||||
| <group type="NXdetector" name="i0" optional="true"> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The i0 should have a corresponding NXmonitor group. There are also many ways of measuring an i0 that is useful to document in the file. For example, is the i0 measured in parallel with the sample absorption (or its proxy), or is it measured in sequence (e.g. before or after the sample), or is it sequential, but interleaved? There is also question of how "clean" the i0 data is, as in how directly/accurately does the i0 measurement follow the ideal incident flux signal? This issue is particularly significant for C K-edge measurements - one can read my article on the topic to further understand this issue. |
||||||
| <field name="data" type="NX_NUMBER"> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| </group> | ||||||
| </group> | ||||||
| <group type="NXdata" optional="true"> | ||||||
| <doc>XAS intensity versus energy plot</doc> | ||||||
| <link name="energy" target="/NXentry/energy"/> | ||||||
| <link name="intensity" target="/NXentry/intensity"/> | ||||||
| </group> | ||||||
| <group type="NXCollection" optional="true"> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| <group type="NXdata" optional="true"> | ||||||
| <doc>Table like data structure common in the XAS domain.</doc> | ||||||
| <field name="data" type="NX_NUMBER"> | ||||||
| <dimensions rank="2"> | ||||||
| <dim index="1" value="nChan" /> | ||||||
| <dim index="2" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| <field name="columns" type="NX_CHAR"> | ||||||
| <dimensions rank="1"> | ||||||
| <dim index="1" value="nEnergy" /> | ||||||
| </dimensions> | ||||||
| </field> | ||||||
| <group type="NXuser" name="data_collector" optional="true"> | ||||||
| <field name="name"></field> | ||||||
| <field name="orcid"></field> | ||||||
| </group> | ||||||
| </group> | ||||||
| </group> | ||||||
| </group> | ||||||
| </definition> | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?> | ||
| <!-- | ||
| # NeXus - Neutron and X-ray Common Data Format | ||
| # | ||
| # Copyright (C) 2008-2022 NeXus International Advisory Committee (NIAC) | ||
| # | ||
| # This library is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU Lesser General Public | ||
| # License as published by the Free Software Foundation; either | ||
| # version 3 of the License, or (at your option) any later version. | ||
| # | ||
| # This library is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| # Lesser General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU Lesser General Public | ||
| # License along with this library; if not, write to the Free Software | ||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| # | ||
| # For further information, see http://www.nexusformat.org | ||
| --> | ||
| <definition name="NXedge" type="group" extends="NXobject" category="base" | ||
| xmlns="http://definition.nexusformat.org/nxdl/3.1" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"> | ||
| <doc> | ||
| An absorption edge is a sharp discontinuity in the X-ray absorption spectrum | ||
| of an element that occurs when the incident photon energy equals the binding | ||
| energy of a core electron, enabling photoionization of that shell. | ||
| </doc> | ||
| <field name="name" type="NX_CHAR" minOccurs="1" maxOccurs="1"> | ||
| <doc> | ||
| Name of the absorption edge specified using | ||
| `IUPAC notation`_ (e.g., ``K``, ``L2``, ``M5``), which identifies the | ||
| shell and sub-shell from which the electron is ejected. | ||
|
|
||
| Correspondence between IUPAC and electronic level notations: | ||
|
|
||
| .. list-table:: | ||
| :header-rows: 1 | ||
|
|
||
| * - IUPAC | ||
| - Electronic level | ||
| * - K | ||
| - 1s | ||
| * - L1 | ||
| - 2s | ||
| * - L2 | ||
| - :math:`2p_{1/2}` | ||
| * - L3 | ||
| - :math:`2p_{3/2}` | ||
| * - M1 | ||
| - 3s | ||
| * - M2 | ||
| - :math:`3p_{1/2}` | ||
| * - M3 | ||
| - :math:`3p_{3/2}` | ||
| * - M4 | ||
| - :math:`3d_{3/2}` | ||
| * - M5 | ||
| - :math:`3d_{5/2}` | ||
| * - N1 | ||
| - 4s | ||
| * - N2 | ||
| - :math:`4p_{1/2}` | ||
| * - N3 | ||
| - :math:`4p_{3/2}` | ||
| * - N4 | ||
| - :math:`4d_{3/2}` | ||
| * - N5 | ||
| - :math:`4d_{5/2}` | ||
| * - N6 | ||
| - :math:`4f_{5/2}` | ||
| * - N7 | ||
| - :math:`4f_{7/2}` | ||
| * - O1 | ||
| - 5s | ||
| * - O2 | ||
| - :math:`5p_{1/2}` | ||
| * - O3 | ||
| - :math:`5p_{3/2}` | ||
| * - O4 | ||
| - :math:`5d_{3/2}` | ||
| * - O5 | ||
| - :math:`5d_{5/2}` | ||
| * - O6 | ||
| - :math:`5f_{5/2}` | ||
| * - O7 | ||
| - :math:`5f_{7/2}` | ||
| * - P1 | ||
| - 6s | ||
| * - P2 | ||
| - :math:`6p_{1/2}` | ||
| * - P3 | ||
| - :math:`6p_{3/2}` | ||
| * - P4 | ||
| - :math:`6d_{3/2}` | ||
| * - P5 | ||
| - :math:`6d_{5/2}` | ||
|
|
||
| .. _IUPAC notation: https://doi.org/10.1002/xrs.1300200308 | ||
| </doc> | ||
| <enumeration> | ||
| <item value="K"></item> | ||
| <item value="L1"></item> | ||
| <item value="L2"></item> | ||
| <item value="L3"></item> | ||
| <item value="M1"></item> | ||
| <item value="M2"></item> | ||
| <item value="M3"></item> | ||
| <item value="M4"></item> | ||
| <item value="M5"></item> | ||
| <item value="N1"></item> | ||
| <item value="N2"></item> | ||
| <item value="N3"></item> | ||
| <item value="N4"></item> | ||
| <item value="N5"></item> | ||
| <item value="N6"></item> | ||
| <item value="N7"></item> | ||
| <item value="O1"></item> | ||
| <item value="O2"></item> | ||
| <item value="O3"></item> | ||
| <item value="O4"></item> | ||
| <item value="O5"></item> | ||
| <item value="O6"></item> | ||
| <item value="O7"></item> | ||
| <item value="P1"></item> | ||
| <item value="P2"></item> | ||
| <item value="P3"></item> | ||
| <item value="P4"></item> | ||
| <item value="P5"></item> | ||
| </enumeration> | ||
| </field> | ||
| <field name="energy" type="NX_FLOAT" units="NX_ENERGY"> | ||
| <doc> | ||
| Energy of the absorption edge. | ||
| </doc> | ||
| </field> | ||
| </definition> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This symbol is not used