diff --git a/.gitignore b/.gitignore index 1e25594542..fbf3fd897e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Hidden files .* !.github +!.readthedocs.yaml # Python byte / compiled / optimized *.py[cod] diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000000..fe110f1895 --- /dev/null +++ b/.readthedocs.yaml @@ -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/ diff --git a/applications/NXxas_new.nxdl.xml b/applications/NXxas_new.nxdl.xml new file mode 100644 index 0000000000..1c2df512ee --- /dev/null +++ b/applications/NXxas_new.nxdl.xml @@ -0,0 +1,162 @@ + + + + + + + The symbol(s) listed here will be used below to coordinate datasets with the same shape. + + + Number of energy data points + + + Number of electronic transitions + + + + This is an application definition for X-ray absorption spectroscopy. + + + + Official NeXus NXDL schema to which this file conforms. TODO: replace NXxas + + + + + + + + + Excited element + + + Absorption edge + + + Specify if the data commes from a calculation + + + TODO + + + + + + TODO + + + + + + TODO + + + + + + + Descriptive name of the sample + + + + + Description on how :ref:`energy </NXxas_new/ENTRY/energy-field>` + and :ref:`intensity </NXxas_new/ENTRY/intensity-field>` were obtained + from the raw data. + + + + + + + + + + + + + + + + + + + + + spacing between crystal planes of the reflection + + + Type or material of monochromating substance (Si, Ge, Multilayer). + + + Miller indices (hkl) values of nominal reflection + + + + + + + + + + + + + + + + + + + + + + + XAS intensity versus energy plot + + + + + + Table like data structure common in the XAS domain. + + + + + + + + + + + + + + + + + + + diff --git a/base_classes/NXedge.nxdl.xml b/base_classes/NXedge.nxdl.xml new file mode 100644 index 0000000000..ef8a3e61ae --- /dev/null +++ b/base_classes/NXedge.nxdl.xml @@ -0,0 +1,140 @@ + + + + + + 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. + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Energy of the absorption edge. + + + diff --git a/base_classes/NXelement.nxdl.xml b/base_classes/NXelement.nxdl.xml new file mode 100644 index 0000000000..19237a8d29 --- /dev/null +++ b/base_classes/NXelement.nxdl.xml @@ -0,0 +1,171 @@ + + + + + Definition of a chemical element. + + + For each symbol, the atomic number, common English name, and standard atomic weight are also given. + + + Z=1, name="hydrogen", standard_atomic_weight=1.0078 + Z=2, name="helium", standard_atomic_weight=4.0026 + Z=3, name="lithium", standard_atomic_weight=6.94 + Z=4, name="beryllium", standard_atomic_weight=9.0122 + Z=5, name="boron", standard_atomic_weight=10.81 + Z=6, name="carbon", standard_atomic_weight=12.011 + Z=7, name="nitrogen", standard_atomic_weight=14.007 + Z=8, name="oxygen", standard_atomic_weight=15.999 + Z=9, name="fluorine", standard_atomic_weight=18.9984 + Z=10, name="neon", standard_atomic_weight=20.1797 + Z=11, name="sodium", standard_atomic_weight=22.9898 + Z=12, name="magnesium", standard_atomic_weight=24.305 + Z=13, name="aluminum", standard_atomic_weight=26.9815 + Z=14, name="silicon", standard_atomic_weight=28.085 + Z=15, name="phosphorus", standard_atomic_weight=30.9738 + Z=16, name="sulfur", standard_atomic_weight=32.06 + Z=17, name="chlorine", standard_atomic_weight=35.453 + Z=18, name="argon", standard_atomic_weight=39.948 + Z=19, name="potassium", standard_atomic_weight=39.0983 + Z=20, name="calcium", standard_atomic_weight=40.078 + Z=21, name="scandium", standard_atomic_weight=44.9559 + Z=22, name="titanium", standard_atomic_weight=47.867 + Z=23, name="vanadium", standard_atomic_weight=50.9415 + Z=24, name="chromium", standard_atomic_weight=51.996 + Z=25, name="manganese", standard_atomic_weight=54.938 + Z=26, name="iron", standard_atomic_weight=55.845 + Z=27, name="cobalt", standard_atomic_weight=58.9332 + Z=28, name="nickel", standard_atomic_weight=58.6934 + Z=29, name="copper", standard_atomic_weight=63.546 + Z=30, name="zinc", standard_atomic_weight=65.38 + Z=31, name="gallium", standard_atomic_weight=69.72 + Z=32, name="germanium", standard_atomic_weight=72.63 + Z=33, name="arsenic", standard_atomic_weight=74.9216 + Z=34, name="selenium", standard_atomic_weight=78.971 + Z=35, name="bromine", standard_atomic_weight=79.904 + Z=36, name="krypton", standard_atomic_weight=83.798 + Z=37, name="rubidium", standard_atomic_weight=85.4678 + Z=38, name="strontium", standard_atomic_weight=87.62 + Z=39, name="yttrium", standard_atomic_weight=88.9058 + Z=40, name="zirconium", standard_atomic_weight=91.224 + Z=41, name="niobium", standard_atomic_weight=92.9064 + Z=42, name="molybdenum", standard_atomic_weight=95.95 + Z=43, name="technetium", standard_atomic_weight=97.907 + Z=44, name="ruthenium", standard_atomic_weight=101.07 + Z=45, name="rhodium", standard_atomic_weight=102.906 + Z=46, name="palladium", standard_atomic_weight=106.42 + Z=47, name="silver", standard_atomic_weight=107.868 + Z=48, name="cadmium", standard_atomic_weight=112.414 + Z=49, name="indium", standard_atomic_weight=114.818 + Z=50, name="tin", standard_atomic_weight=118.71 + Z=51, name="antimony", standard_atomic_weight=121.76 + Z=52, name="tellurium", standard_atomic_weight=127.6 + Z=53, name="iodine", standard_atomic_weight=126.905 + Z=54, name="xenon", standard_atomic_weight=131.293 + Z=55, name="cesium", standard_atomic_weight=132.905 + Z=56, name="barium", standard_atomic_weight=137.327 + Z=57, name="lanthanum", standard_atomic_weight=138.905 + Z=58, name="cerium", standard_atomic_weight=140.116 + Z=59, name="praseodymium", standard_atomic_weight=140.908 + Z=60, name="neodymium", standard_atomic_weight=144.242 + Z=61, name="promethium", standard_atomic_weight=145.0 + Z=62, name="samarium", standard_atomic_weight=150.36 + Z=63, name="europium", standard_atomic_weight=151.96 + Z=64, name="gadolinium", standard_atomic_weight=157.25 + Z=65, name="terbium", standard_atomic_weight=158.925 + Z=66, name="dysprosium", standard_atomic_weight=162.5 + Z=67, name="holmium", standard_atomic_weight=164.93 + Z=68, name="erbium", standard_atomic_weight=167.259 + Z=69, name="thulium", standard_atomic_weight=168.934 + Z=70, name="ytterbium", standard_atomic_weight=173.045 + Z=71, name="lutetium", standard_atomic_weight=174.967 + Z=72, name="hafnium", standard_atomic_weight=178.49 + Z=73, name="tantalum", standard_atomic_weight=180.948 + Z=74, name="tungsten", standard_atomic_weight=183.84 + Z=75, name="rhenium", standard_atomic_weight=186.207 + Z=76, name="osmium", standard_atomic_weight=190.23 + Z=77, name="iridium", standard_atomic_weight=192.217 + Z=78, name="platinum", standard_atomic_weight=195.084 + Z=79, name="gold", standard_atomic_weight=196.967 + Z=80, name="mercury", standard_atomic_weight=200.592 + Z=81, name="thallium", standard_atomic_weight=204.383 + Z=82, name="lead", standard_atomic_weight=207.2 + Z=83, name="bismuth", standard_atomic_weight=208.98 + Z=84, name="polonium", standard_atomic_weight=209.0 + Z=85, name="astatine", standard_atomic_weight=210.0 + Z=86, name="radon", standard_atomic_weight=222.0 + Z=87, name="francium", standard_atomic_weight=223.0 + Z=88, name="radium", standard_atomic_weight=226.0 + Z=89, name="actinium", standard_atomic_weight=227.0 + Z=90, name="thorium", standard_atomic_weight=232.038 + Z=91, name="protactinium", standard_atomic_weight=231.036 + Z=92, name="uranium", standard_atomic_weight=238.029 + Z=93, name="neptunium", standard_atomic_weight=237.048 + Z=94, name="plutonium", standard_atomic_weight=239.052 + Z=95, name="americium", standard_atomic_weight=243.0 + Z=96, name="curium", standard_atomic_weight=247.0 + Z=97, name="berkelium", standard_atomic_weight=247.0 + Z=98, name="californium", standard_atomic_weight=251.0 + Z=99, name="einsteinium", standard_atomic_weight=252 + Z=100, name="fermium", standard_atomic_weight=257 + Z=101, name="mendelevium", standard_atomic_weight=258 + Z=102, name="nobelium", standard_atomic_weight=259 + Z=103, name="lawrencium", standard_atomic_weight=266 + Z=104, name="rutherfordium", standard_atomic_weight=267 + Z=105, name="dubnium", standard_atomic_weight=268 + Z=106, name="seaborgium", standard_atomic_weight=269 + Z=107, name="bohrium", standard_atomic_weight=270 + Z=108, name="hassium", standard_atomic_weight=269 + Z=109, name="meitnerium", standard_atomic_weight=278 + Z=110, name="darmstadtium", standard_atomic_weight=281 + Z=111, name="roentgenium", standard_atomic_weight=282 + Z=112, name="copernicium", standard_atomic_weight=285 + Z=113, name="nihonium", standard_atomic_weight=286 + Z=114, name="flerovium", standard_atomic_weight=289 + Z=115, name="moscovium", standard_atomic_weight=290 + Z=116, name="livermorium", standard_atomic_weight=293 + Z=117, name="tennessine", standard_atomic_weight=294 + Z=118, name="oganesson", standard_atomic_weight=294 + + + + The charge number *Z* of the atomic nucleus. + + + + *Relative atomic mass* of the element in *amu*. It can be but is not restricted to the + *standard atomic weight* (using the natural abundance of isotopes). + + + + The charge of the atom after ionic approximation of its heteronuclear bonds. + + diff --git a/base_classes/NXemission_line.nxdl.xml b/base_classes/NXemission_line.nxdl.xml new file mode 100644 index 0000000000..12c11aa89f --- /dev/null +++ b/base_classes/NXemission_line.nxdl.xml @@ -0,0 +1,626 @@ + + + + + + An emission line is a spectral line with a discrete frequency that is + characteristic of the emitting atom. + + + + The emission line name using either the `IUPAC notation`_, i.e. initial and final + edge separated by a hyphen (e.g. ``K-L3``), or the Latinized Siegbahn + notation (e.g. ``Ka1``). + + Correspondence between IUPAC and Siegbahn notations: + + .. list-table:: + :header-rows: 1 + + * - IUPAC + - Siegbahn + - Latinized Siegbahn + * - K-L3 + - :math:`K\alpha_1` + - Ka1 + * - K-L2 + - :math:`K\alpha_2` + - Ka2 + * - K-L1 + - :math:`K\alpha_3` + - Ka3 + * - K-M3 + - :math:`K\beta_1` + - Kb1 + * - K-N3 + - :math:`K\beta_2'` + - Kb2\' + * - K-N2 + - :math:`K\beta_2''` + - Kb2\'\' + * - K-M2 + - :math:`K\beta_3` + - Kb3 + * - K-N5 + - :math:`K\beta_4'` + - Kb4\' + * - K-N4 + - :math:`K\beta_4''` + - Kb4\'\' + * - K-N4 + - :math:`K\beta_{4x}` + - Kb4x + * - K-M5 + - :math:`K\beta_5'` + - Kb5\' + * - K-M4 + - :math:`K\beta_5''` + - Kb5\'\' + * - L3-M5 + - :math:`L\alpha_1` + - La1 + * - L3-M4 + - :math:`L\alpha_2` + - La2 + * - L2-M4 + - :math:`L\beta_1` + - Lb1 + * - L3-N5 + - :math:`L\beta_2` + - Lb2 + * - L1-M3 + - :math:`L\beta_3` + - Lb3 + * - L1-M2 + - :math:`L\beta_4` + - Lb4 + * - L3-O4,5 + - :math:`L\beta_5` + - Lb5 + * - L3-N1 + - :math:`L\beta_6` + - Lb6 + * - L3-O1 + - :math:`L\beta_7` + - Lb7 + * - L3-N6,7 + - :math:`L\beta_7'` + - Lb7\' + * - L1-M5 + - :math:`L\beta_9` + - Lb9 + * - L1-M4 + - :math:`L\beta_{10}` + - Lb10 + * - L3-N4 + - :math:`L\beta_{15}` + - Lb15 + * - L2-M3 + - :math:`L\beta_{17}` + - Lb17 + * - L2-N4 + - :math:`L\gamma_1` + - Lg1 + * - L1-N2 + - :math:`L\gamma_2` + - Lg2 + * - L1-N3 + - :math:`L\gamma_3` + - Lg3 + * - L1-O3 + - :math:`L\gamma_4` + - Lg4 + * - L1-O2 + - :math:`L\gamma_4'` + - Lg4\' + * - L2-N1 + - :math:`L\gamma_5` + - Lg5 + * - L2-O4 + - :math:`L\gamma_6` + - Lg6 + * - L2-O1 + - :math:`L\gamma_8` + - Lg8 + * - L2-N6,7 + - :math:`L\gamma_8'` + - Lg8\' + * - L2-M1 + - :math:`L\eta` + - Ln + * - L3-M1 + - :math:`Ll` + - Ll + * - L3-M3 + - :math:`Ls` + - Ls + * - L3-M2 + - :math:`Lt` + - Lt + * - L3-N6,7 + - :math:`Lu` + - Lu + * - L2-N6,7 + - :math:`Lv` + - Lv + * - M5-N7 + - :math:`M\alpha_1` + - Ma1 + * - M5-N6 + - :math:`M\alpha_2` + - Ma2 + * - M4-N6 + - :math:`M\beta` + - Mb + * - M3-N5 + - :math:`M\gamma` + - Mg + * - M4,5-N2,3 + - :math:`M\zeta` + - Mz + + .. _IUPAC notation: https://doi.org/10.1002/xrs.1300200308 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Energy of the emission line. + + + diff --git a/base_classes/NXxas_mode.nxdl.xml b/base_classes/NXxas_mode.nxdl.xml new file mode 100644 index 0000000000..02da979ea5 --- /dev/null +++ b/base_classes/NXxas_mode.nxdl.xml @@ -0,0 +1,145 @@ + + + + + XAS measurement mode + + + X-ray absorption spectroscopy (XAS) is a technique that measures the absorption coefficient :math:`\mu(E)` of a material as a function of energy. + + The name of the XAS mode indicates the type of process being monitored to obtain the spectrum. Below is a description of the available modes, with emphasis on the expected values for the `intensity` and `monitor` fields. + + 1. Transmission + + The absorption coefficient is obtained by measuring the intensity of the incident :math:`I_0` and transmitted beam :math:`I`. + + .. math:: + \mu(E) = -\ln(I/I_0) + + 2. Total fluorescence yield (TFY) + + The absorption coefficient is obtained by measuring the intensity of the emitted fluorescence :math:`I_f` and the incident beam :math:`I_0`. + + .. math:: + \mu(E) \propto I_f/I_0 + + 3. Partial fluorescence yield (PFY) + + 4. Inverse partial fluorescence yield (IPFY) + + 5. High-energy resolution fluorescence detection (HERFD) + + 6. Total electron yield (TEY) + + 7. Partial electron yield (PEY) + + 8. Electron energy loss (EELS) + + 9. X-ray Raman Scattering (XRS) + + 10. Diffraction Anomalous Fine Structure (DAFS) + + 11. X-ray Excited Optical Luminescence (XEOL) + + 12. Grazing Angle Reflection Extended X-ray Absorption Fine Structure (ReflEXAFS) + + 13. Other + + + + + Transmission + + + + + Total Fluorescence Yield + + + + + Partial Fluorescence Yield + + + + + Inverse Partial Fluorescence Yield + + + + + High Energy Resolution Fluorescence Detected + + + + + Total Electron Yield + + + + + Partial Electron Yield + + + + + Electron Energy Loss + + + + + X-ray Raman Scattering + + + + + Diffraction Anomalous Fine Structure + + + + + X-ray Excited Optical Luminescence + + + + + Grazing Angle Reflection Extended X-ray Absorption Fine Structure + + + + + Other + + + + + + + Collection of emission lines detected or used in this measurement. + + + + +