Skip to content

Commit

Permalink
Merge branch 'fairmat' into 158-xps-peak-fitting-in-nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed May 22, 2024
2 parents f37220a + ea6b7b2 commit 6bfa90f
Show file tree
Hide file tree
Showing 90 changed files with 5,418 additions and 2,961 deletions.
13 changes: 7 additions & 6 deletions base_classes/NXdetector.nxdl.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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) 2014-2022 NeXus International Advisory Committee (NIAC)
#
#
# Copyright (C) 2014-2024 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
Expand Down Expand Up @@ -587,6 +587,7 @@
<item value="event"/>
<item value="histogrammed"/>
<item value="decimated"/>
<item value="pulse counting"/>
</enumeration>
</field>
<field name="angular_calibration_applied" type="NX_BOOLEAN">
Expand Down Expand Up @@ -689,7 +690,7 @@
</field>
<field name="image_key" type="NX_INT">
<doc>
This field allow to distinguish different types of exposure to the same detector &quot;data&quot; field.
This field allow to distinguish different types of exposure to the same detector "data" field.
Some techniques require frequent (re-)calibration inbetween measuremnts and this way of
recording the different measurements preserves the chronological order with is important for
correct processing.
Expand Down Expand Up @@ -977,7 +978,7 @@
to apply to the component starting from 0, 0, 0. The order of these operations
is critical and forms what NeXus calls a dependency chain. The depends_on
field defines the path to the top most operation of the dependency chain or the
string &quot;.&quot; if located in the origin. Usually these operations are stored in a
string "." if located in the origin. Usually these operations are stored in a
NXtransformations group. But NeXus allows them to be stored anywhere.

The reference point of the detector is the center of the first pixel.
Expand Down
13 changes: 13 additions & 0 deletions base_classes/NXenvironment.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,17 @@
defined in an NXinstrument instance.
</doc>
</group>
<attribute name="default">
<doc>
.. index:: plotting

Declares which child group contains a path leading
to a :ref:`NXdata` group.

It is recommended (as of NIAC2014) to use this attribute
to help define the path to the default dataset to be plotted.
See https://www.nexusformat.org/2014_How_to_find_default_data.html
for a summary of the discussion.
</doc>
</attribute>
</definition>
17 changes: 9 additions & 8 deletions base_classes/nyaml/NXdetector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ type: group
acquisition_mode(NX_CHAR):
doc: |
The acquisition mode of the detector.
enumeration: [gated, triggered, summed, event, histogrammed, decimated]
enumeration: [gated, triggered, summed, event, histogrammed, decimated, pulse counting]
angular_calibration_applied(NX_BOOLEAN):
doc: |
True when the angular calibration has been applied in the
Expand Down Expand Up @@ -753,14 +753,14 @@ type: group
other component groups.
# ++++++++++++++++++++++++++++++++++ SHA HASH ++++++++++++++++++++++++++++++++++
# cf337a792e12304ca6fa5767928b3a58b6527152c48a24d0406e227efc050cb7
# <?xml version="1.0" encoding="UTF-8"?>
# b8de5d6816422ae746c681a5bb5ad0f66038bc11cc71512ca38258d1132d7262
# <?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) 2014-2022 NeXus International Advisory Committee (NIAC)
# #
# #
# # Copyright (C) 2014-2024 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
Expand Down Expand Up @@ -1343,6 +1343,7 @@ type: group
# <item value="event"/>
# <item value="histogrammed"/>
# <item value="decimated"/>
# <item value="pulse counting"/>
# </enumeration>
# </field>
# <field name="angular_calibration_applied" type="NX_BOOLEAN">
Expand Down Expand Up @@ -1445,7 +1446,7 @@ type: group
# </field>
# <field name="image_key" type="NX_INT">
# <doc>
# This field allow to distinguish different types of exposure to the same detector &quot;data&quot; field.
# This field allow to distinguish different types of exposure to the same detector "data" field.
# Some techniques require frequent (re-)calibration inbetween measuremnts and this way of
# recording the different measurements preserves the chronological order with is important for
# correct processing.
Expand Down Expand Up @@ -1733,7 +1734,7 @@ type: group
# to apply to the component starting from 0, 0, 0. The order of these operations
# is critical and forms what NeXus calls a dependency chain. The depends_on
# field defines the path to the top most operation of the dependency chain or the
# string &quot;.&quot; if located in the origin. Usually these operations are stored in a
# string "." if located in the origin. Usually these operations are stored in a
# NXtransformations group. But NeXus allows them to be stored anywhere.
#
# The reference point of the detector is the center of the first pixel.
Expand Down
26 changes: 25 additions & 1 deletion base_classes/nyaml/NXenvironment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,20 @@ NXenvironment(NXobject):
doc: |
Any sensor used to monitor the environment. This can be linked to a sensor
defined in an NXinstrument instance.
\@default:
doc: |
.. index:: plotting
Declares which child group contains a path leading
to a :ref:`NXdata` group.
It is recommended (as of NIAC2014) to use this attribute
to help define the path to the default dataset to be plotted.
See https://www.nexusformat.org/2014_How_to_find_default_data.html
for a summary of the discussion.
# ++++++++++++++++++++++++++++++++++ SHA HASH ++++++++++++++++++++++++++++++++++
# edb4357785f3ad2e7c84849c787be220920b9eef3a18ee1c8d251327873c87b7
# 4e4bd4fe380d78389677def141557774db0580c77850b6cfe755ba06e7b57cef
# <?xml version='1.0' encoding='UTF-8'?>
# <?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
# <!--
Expand Down Expand Up @@ -148,4 +159,17 @@ NXenvironment(NXobject):
# defined in an NXinstrument instance.
# </doc>
# </group>
# <attribute name="default">
# <doc>
# .. index:: plotting
#
# Declares which child group contains a path leading
# to a :ref:`NXdata` group.
#
# It is recommended (as of NIAC2014) to use this attribute
# to help define the path to the default dataset to be plotted.
# See https://www.nexusformat.org/2014_How_to_find_default_data.html
# for a summary of the discussion.
# </doc>
# </attribute>
# </definition>
13 changes: 13 additions & 0 deletions contributed_definitions/NXactuator.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,18 @@
other component groups.
</doc>
</group>
<attribute name="default">
<doc>
.. index:: plotting

Declares which child group contains a path leading
to a :ref:`NXdata` group.

It is recommended (as of NIAC2014) to use this attribute
to help define the path to the default dataset to be plotted.
See https://www.nexusformat.org/2014_How_to_find_default_data.html
for a summary of the discussion.
</doc>
</attribute>
<group type="NXfabrication"/>
</definition>
20 changes: 10 additions & 10 deletions contributed_definitions/NXapm.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ schema for heat treatment
<item value="weight_percent"/>
</enumeration>
</field>
<group type="NXion" minOccurs="1" maxOccurs="118">
<group name="ionID" type="NXion" minOccurs="1" maxOccurs="118">
<field name="chemical_symbol" type="NX_CHAR">
<doc>
Human-readable name of the element (e.g. Fe).
Expand Down Expand Up @@ -781,7 +781,7 @@ i number of hits after hits finding but prior calibrations-->

Identifiers can be defined either implicitly or explicitly.
For implicit indexing identifiers are defined on the interval
:math:`[identifier_offset, identifier_offset + c - 1]`.
:math:`[identifier\_offset, identifier\_offset + c - 1]`.

Therefore, implicit identifier are completely defined by the value of
identifier_offset and cardinality. For example if identifier run from
Expand Down Expand Up @@ -913,7 +913,7 @@ results-->
</dimensions>
</field>
<group name="naive_discretization" type="NXprocess">
<group type="NXprogram" minOccurs="1" maxOccurs="unbounded">
<group name="programID" type="NXprogram" minOccurs="1" maxOccurs="unbounded">
<field name="program" type="NX_CHAR">
<attribute name="version" type="NX_CHAR"/>
</field>
Expand Down Expand Up @@ -1045,15 +1045,15 @@ in an e.g. work of A. London et al.-->
<doc>
Category for the peak offering a qualitative statement of the location of the peak
in light of limited mass-resolving power that is relevant for
composition quantification. See `D. Larson et al. &lt;https://doi.org/10.1007/978-1-4614-8721-0&gt;`_
composition quantification. See `D. Larson et al. (p172) &lt;https://doi.org/10.1007/978-1-4614-8721-0&gt;`_
for examples of each category:

* 0, well-separated, 10^B +, 28^Si ++
* 1, close, but typically sufficiently separated with LEAP system, 14^N +, 28^Si ++
* 2, closely overlapping, demands better than LEAP4000X MRP, 14^N +, 28^Si ++
* 3, overlapped, multi-charge state, 16^O 16^O ++, 16^O +
* 4, overlapped, same charge state, not discriminatable with a LEAP4000X, 14^N 14^N + 28^Si +
* 5, overlapped, same charge state, any expectation of resolvability, 54^Cr ++, 54^Fe ++
* 0, well-separated, :math:`^{10}B^{+}`, :math:`^{28}Si^{2+}`
* 1, close, but can be sufficiently separated for quantification in a LEAP system, :math:`^{94}Mo^{3+}`, :math:`^{63}Cu^{2+}`
* 2, closely overlapping, demands better than LEAP4000X MRP can provide :math:`^{14}N^{+}`, :math:`^{28}Si^{2+}` at different charge states
* 3, overlapped exactly due to multi-charge molecular species, :math:`^{16}{O_{2}}^{2+}`, :math:`^{16}O^{+}`
* 4, overlapped, same charge state, cannot as of 2013 be discriminated with a LEAP4000X, :math:`^{14}{N_{2}}^{+}`, :math:`^{28}Si^{+}`
* 5, overlapped, same charge state, any expectation of resolvability, :math:`^{54}Cr^{2+}`, :math:`^{54}Fe^{2+}`
</doc>
<enumeration>
<item value="0"/>
Expand Down
4 changes: 2 additions & 2 deletions contributed_definitions/NXapm_charge_state_analysis.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ input/config-->
Nuclides are encoded using the hashing rule that is defined in :ref:`NXion`.

As an example, a ranging definition H:2 O:1 is configured by setting nuclides to
a list with entries :math:`1 + 256 * 0`, :math:`1 + 256 * 0`, :math:`8 + 256 * 0`.
a list with entries :math:`1 + 0 \cdot 256`, :math:`1 + 0 \cdot 256`, :math:`8 + 0 \cdot 256`.
An empty list does not release the constraint. Instead, a list with all elements
in the periodic table (encoded as nuclide_hash values) should be used, i.e.
:math:`1 + 256 * 0`, :math:`2 + 256 * 0`, and so on and so forth.
:math:`1 + 0 \cdot 256`, :math:`2 + 0 \cdot 256`, and so on and so forth.

Keep in mind that with a weakly constrained parameter space the combinatorial
analysis may become very time consuming!
Expand Down
152 changes: 152 additions & 0 deletions contributed_definitions/NXapm_compositionspace_config.nxdl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<?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) 2014-2024 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 xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="application" type="group" name="NXapm_compositionspace_config" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<symbols>
<doc>
The symbols used in the schema to specify e.g. dimensions of arrays.
</doc>
<symbol name="n_voxel">
<doc>
Number of voxel of discretized domain for analyzed part of the dataset.
</doc>
</symbol>
<symbol name="d">
<doc>
The dimensionality of the grid.
</doc>
</symbol>
<symbol name="c">
<doc>
The cardinality or total number of cells/grid points.
</doc>
</symbol>
<symbol name="n_clst_dict">
<doc>
Number of terms in the composition clustering dictionary
</doc>
</symbol>
<symbol name="n_spat_dict">
<doc>
Number of terms in the position clustering dictionary
</doc>
</symbol>
</symbols>
<doc>
Config for a run with Alaukik Saxena's composition space tool.

This is an initial draft application definition for the common NFDI-MatWerk,
FAIRmat infrastructure use case IUC09 how to improve the organization and
results storage of the composition space tool and make these data at the
same time directly understandable for research data management systems
like NOMAD Oasis.
</doc>
<!--by default for appdefs the value of the exists keyword is required unless it is explicitly specified differently-->
<group type="NXentry" minOccurs="1" maxOccurs="1">
<field name="definition" type="NX_CHAR">
<attribute name="version" type="NX_CHAR"/>
<enumeration>
<item value="NXapm_compositionspace_config"/>
</enumeration>
</field>
<group name="config" type="NXobject">
<group type="NXidentifier" optional="true"/>
<field name="analysis_identifier" type="NX_UINT" recommended="true"/>
<group name="reconstruction" type="NXserialized">
<field name="type" type="NX_CHAR"/>
<field name="path" type="NX_CHAR"/>
<field name="checksum" type="NX_CHAR"/>
<field name="algorithm" type="NX_CHAR"/>
<field name="position" type="NX_CHAR"/>
<field name="mass_to_charge" type="NX_CHAR"/>
</group>
<group name="ranging" type="NXserialized">
<field name="type" type="NX_CHAR"/>
<field name="path" type="NX_CHAR"/>
<field name="checksum" type="NX_CHAR"/>
<field name="algorithm" type="NX_CHAR"/>
<field name="ranging_definitions" type="NX_CHAR"/>
</group>
<field name="edge_length" type="NX_FLOAT" units="NX_LENGTH">
<doc>
Edge length of the cubic voxels that is used for discretizing the point cloud in
the voxelization step.
</doc>
</field>
<field name="bics_clusters" type="NX_UINT" units="NX_UNITLESS">
<doc>
The maximum number of components configured for the segmentation of the voxel
set into a mixture of voxels with that many different chemical compositions.
</doc>
</field>
<group name="ml_models" type="NXobject">
<doc>
The configuration of the machine learning model used in the segmentation step.
</doc>
<!--name(NX_CHAR):
doc: |
Name of the model to be used.-->
<group name="gaussian_mixture" type="NXobject">
<doc>
Configuration for the Gaussian mixture model that is used in the segmentation
step.
</doc>
</group>
<!--random_forest(NXobject):
doc: |
Configuration for the random forest model.-->
<group name="dbscan" type="NXobject">
<doc>
Configuration for the DBScan algorithm that is used in the clustering step.
</doc>
<field name="eps" type="NX_FLOAT" units="NX_LENGTH">
<doc>
The maximum distance between two samples for one to
be considered as in the neighborhood of the other.
</doc>
</field>
<field name="min_samples" type="NX_UINT" units="NX_UNITLESS">
<doc>
The number of samples (or total weight) in a neighborhood
for a point to be considered as a core point.
</doc>
</field>
</group>
</group>
</group>
<group name="common" type="NXobject">
<field name="status" type="NX_CHAR"/>
<group name="programID" type="NXprogram" minOccurs="1" maxOccurs="unbounded">
<field name="program" type="NX_CHAR">
<attribute name="version" type="NX_CHAR"/>
</field>
</group>
<group name="profiling" type="NXcs_profiling" recommended="true">
<field name="start_time" type="NX_DATE_TIME"/>
<field name="end_time" type="NX_DATE_TIME"/>
<field name="total_elapsed_time" type="NX_FLOAT"/>
<field name="current_working_directory" type="NX_CHAR"/>
</group>
</group>
</group>
</definition>
Loading

0 comments on commit 6bfa90f

Please sign in to comment.