/
NXcalibration.nxdl.xml
111 lines (108 loc) · 4.14 KB
/
NXcalibration.nxdl.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?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="base" name="NXcalibration" extends="NXobject" type="group" 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="ncoeff">
<doc>
Number of coefficients of the calibration function
</doc>
</symbol>
<symbol name="nfeat">
<doc>
Number of features used to fit the calibration function
</doc>
</symbol>
<symbol name="ncal">
<doc>
Number of points of the calibrated and uncalibrated axes
</doc>
</symbol>
</symbols>
<doc>
Subclass of NXprocess to describe post-processing calibrations.
</doc>
<field name="last_process" type="NX_CHAR">
<doc>
Indicates the name of the last operation applied in the NXprocess sequence.
</doc>
</field>
<field name="applied" type="NX_BOOLEAN">
<doc>
Has the calibration been applied?
</doc>
</field>
<field name="coefficients" type="NX_FLOAT" units="NX_ANY">
<doc>
For non-linear energy calibrations, e.g. in a TOF, a polynomial function is fit
to a set of features (peaks) at well defined energy positions to determine
E(TOF). Here we can store the array of fit coefficients.
</doc>
<dimensions rank="1">
<dim index="1" value="ncoeff"/>
</dimensions>
</field>
<field name="fit_function" type="NX_CHAR">
<doc>
For non-linear energy calibrations. Here we can store the formula of the
fit function.
Use a0, a1, ..., an for the coefficients, corresponding to the values in the coefficients field.
Use x0, x1, ..., xn for the variables.
The formula should be numpy compliant.
</doc>
</field>
<field name="scaling" type="NX_FLOAT" units="NX_ANY">
<doc>
For linear calibration. Scaling parameter.
</doc>
</field>
<field name="offset" type="NX_FLOAT" units="NX_ANY">
<doc>
For linear calibration. Offset parameter.
</doc>
</field>
<field name="calibrated_axis" type="NX_FLOAT" units="NX_ANY">
<doc>
A vector representing the axis after calibration, matching the data length
</doc>
<dimensions rank="1">
<dim index="1" value="ncal"/>
</dimensions>
</field>
<field name="original_axis" type="NX_FLOAT" units="NX_ANY">
<doc>
Vector containing the data coordinates in the original uncalibrated axis
</doc>
<dimensions rank="1">
<dim index="1" value="ncal"/>
</dimensions>
</field>
<field name="description" type="NX_CHAR">
<doc>
A description of the procedures employed.
</doc>
</field>
</definition>