Skip to content

Commit

Permalink
Merge pull request #301 from FAIRmat-NFDI/small-xps-changes
Browse files Browse the repository at this point in the history
small updates for XPS peak fitting
  • Loading branch information
lukaspie authored Nov 22, 2024
2 parents fd58c03 + 4a596fc commit a5c0012
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 110 deletions.
13 changes: 13 additions & 0 deletions contributed_definitions/NXfit_background.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,17 @@
The functional form of the background.
</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/NXpeak.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,17 @@
Total area under the curve.
</doc>
</field>
<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>
60 changes: 21 additions & 39 deletions contributed_definitions/NXxps.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
x- and y-axes lie in the plane of the sample stage.
</doc>
</field>
<group name="coordinate_system_transformations" type="NXtransformations">
<group name="coordinate_system_transformations" type="NXtransformations" optional="true">
<doc>
Set of transformations, describing the orientation of the XPS coordinate system
with respect to the beam coordinate system (.) or any other coordinate system.
Expand Down Expand Up @@ -436,6 +436,12 @@
.. _3.16: https://www.iso.org/obp/ui/en/#iso:std:iso:18115:-1:ed-3:v1:en:term:3.16
</doc>
</field>
<field name="relative_atomic_concentration" type="NX_FLOAT" optional="true" units="NX_ANY">
<doc>
Atomic concentration of the species defined by this peak. This should be a value
between 0 and 1.
</doc>
</field>
</group>
<group name="backgroundBACKGROUND" type="NXfit_background">
<doc>
Expand All @@ -452,37 +458,20 @@
</group>
<group name="function" type="NXfit_function" recommended="true">
<field name="description">
<enumeration>
<item value="linear">
<doc>
Linear background, i.e., a simple straight line from the minimal to
the maximal abscissa value.
</doc>
</item>
<item value="Shirley">
<doc>
Shirley background. In the Shirley background, the background intensity at any
given binding energy is proportional to the intensity of the total peak area
above the background in the lower binding energy peak range (i.e., the
background goes up in proportion to the total number of photoelectrons below its
binding energy position).
</doc>
</item>
<item value="Tougaard">
<doc>
Tougaard background (or Tougaard universal cross-section approach) which is a
methodology for integrating the intensity of the background at a given binding
energy from the spectral intensities to higher kinetic energies
</doc>
</item>
<item value="other">
<doc>
In case none of the enumeration items apply, description should be _other_
and the functional form of the background should be given by the `formula`
field.
</doc>
</item>
</enumeration>
<doc>
Human-readable description of the background fit function.

.. csv-table:: Examples for background descriptions
:header: "Background Type", "Description"

"Linear", "Linear background, i.e., a simple straight line from the minimal to the maximal abscissa value."
"Shirley", "Shirley background. In the Shirley background, the background intensity at any given binding energy is proportional to the intensity of the total peak area above the background in the lower binding energy peak range (i.e., the background goes up in proportion to the total number of photoelectrons below its binding energy position)."
"Tougaard", "Tougaard background (or Tougaard universal cross-section approach) which is a methodology for integrating the intensity of the background at a given binding energy from the spectral intensities to higher kinetic energies."
"Step Down/Step Up", "Background function for fitting a complementary error function to an edge, used for fitting a step in the data."

In case none of these examples apply, the functional form of the background should be given by the `formula`
field.
</doc>
</field>
<field name="formula" recommended="true"/>
</group>
Expand All @@ -498,13 +487,6 @@
<field name="figure_of_meritMETRIC" type="NX_NUMBER" recommended="true">
<attribute name="metric"/>
</field>
<field name="relative_concentration" type="NX_FLOAT" units="NX_ANY">
<doc>
Atomic concentration of each species defined by one peak in the peak model.
This should be an array with the indices pointing to the individual peaks
(i.e, peak_0, peak_1, etc.)
</doc>
</field>
</group>
</group>
</definition>
26 changes: 25 additions & 1 deletion contributed_definitions/nyaml/NXfit_background.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,20 @@ NXfit_background(NXobject):
function(NXfit_function):
doc: |
The functional form of the background.
\@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 ++++++++++++++++++++++++++++++++++
# f2aa053cf2efec41fdae311ac6df33ac71072aeb03ff3d640b641c1e8b1f2be6
# 9a4d4ac46db43ca47279c7428378f823daf4fb06691781b52facf6e59de2b108
# <?xml version='1.0' encoding='UTF-8'?>
# <?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
# <!--
Expand Down Expand Up @@ -125,4 +136,17 @@ NXfit_background(NXobject):
# The functional form of the background.
# </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>
26 changes: 25 additions & 1 deletion contributed_definitions/nyaml/NXpeak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,20 @@ NXpeak(NXobject):
unit: NX_ANY
doc: |
Total area under the curve.
\@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 ++++++++++++++++++++++++++++++++++
# 68e3d1c34fd21241aad36095e5b4bd937b868e7ff36860025bb55a6e78e4d0bb
# da45c0be6c47cb9a65ba67a60a90e85e61d05ab90dc790c1f7ca7001204a59a3
# <?xml version='1.0' encoding='UTF-8'?>
# <?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
# <!--
Expand Down Expand Up @@ -136,4 +147,17 @@ NXpeak(NXobject):
# Total area under the curve.
# </doc>
# </field>
# <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>
Loading

0 comments on commit a5c0012

Please sign in to comment.