Skip to content

Commit 4f2c9f0

Browse files
author
lukaspie
committed
Merge remote-tracking branch 'upstream/main' into bring-back-patch-release
2 parents 0cbc766 + d18b8e2 commit 4f2c9f0

File tree

20 files changed

+231
-137
lines changed

20 files changed

+231
-137
lines changed

.github/workflows/ci.yaml

100755100644
File mode changed.

NXDL_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2024.02
1+
v2025.11

base_classes/NXentry.nxdl.xml

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
A small image that is representative of the entry. An example of this is a 640x480
239239
jpeg image automatically produced by a low resolution plot of the NXdata.
240240
</doc>
241-
<attribute name="type">
241+
<attribute name="type" deprecated="Use the `type` field instead">
242242
<doc>The mime type should be an ``image/*``</doc>
243243
<enumeration>
244244
<!--

base_classes/NXfit_function.nxdl.xml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,30 +58,14 @@ and a BNF of valid grammar.-->
5858
<group name="fit_parameters" type="NXparameters">
5959
<field name="PARAMETER" nameType="any" type="NX_CHAR_OR_NUMBER" units="NX_ANY">
6060
<doc>
61-
A parameter for a fit function.
62-
This would typically be a variable that
63-
is optimized in a fit.
61+
A parameter for a fit function. This would typically be
62+
a variable that is optimized in a fit.
6463
</doc>
6564
<attribute name="description" type="NX_CHAR">
6665
<doc>
6766
A description of what this parameter represents.
6867
</doc>
6968
</attribute>
70-
<attribute name="fixed" type="NX_BOOLEAN">
71-
<doc>
72-
If the parameter is held constant, then this attribute should be True.
73-
</doc>
74-
</attribute>
75-
<attribute name="min_value" type="NX_NUMBER">
76-
<doc>
77-
The minimal value of the parameter, to be used as a constraint during fitting.
78-
</doc>
79-
</attribute>
80-
<attribute name="max_value" type="NX_NUMBER">
81-
<doc>
82-
The maximal value of the parameter, to be used as a constraint during fitting.
83-
</doc>
84-
</attribute>
8569
</field>
8670
</group>
8771
</definition>

base_classes/NXparameters.nxdl.xml

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,77 @@
2424
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" category="base"
2525
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2626
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
27-
name="NXparameters"
28-
type="group" extends="NXobject">
29-
<doc>Container for parameters, usually used in processing or analysis.</doc>
30-
<field name="PARAMETER" nameType="any" type="NX_CHAR_OR_NUMBER" units="NX_ANY" minOccurs="0" maxOccurs="unbounded">
31-
<!-- maxOccurs="unbounded" is intended but is not allowed by current syntax -->
32-
<doc>A parameter (also known as a term) that is used in or results from processing.</doc>
33-
<attribute name="units"/>
27+
name="NXparameters" type="group" extends="NXobject">
28+
29+
<doc>
30+
Container for parameters used in processing or analysing data.
31+
32+
Typically, this group is stored in a :ref:`NXprocess` group in
33+
order to contain parameters that are either inputs to or
34+
resulting from the process defined by the parent group. However,
35+
this base class can also be added to other groups for use in
36+
other contexts.
37+
38+
Although this base class can be used to store any kind of
39+
parameter, one possible use case is to store parameters that are
40+
refined by a fitting function or model. A number of attributes
41+
have been defined to store metadata associated with such a
42+
refinement.
43+
</doc>
44+
<attribute name="model">
45+
<doc>
46+
The name of the model used in optimizing the parameter
47+
values. Fitting packages such as LMFIT
48+
(https://lmfit.github.io/lmfit-py/) provide models, which
49+
instantiate functions to be fitted to the data. If this
50+
attribute is provided, it is assumed that all the parameters
51+
in this group are associated with this model.
52+
</doc>
53+
</attribute>
54+
<field name="PARAMETER" type="NX_CHAR_OR_NUMBER" nameType="any">
55+
<doc>
56+
A parameter that is used in or results from processing.
57+
</doc>
58+
<attribute name="units" />
59+
<attribute name="error" type="NX_NUMBER">
60+
<doc>
61+
The standard deviation of the parameter after optimizing
62+
its value.
63+
</doc>
64+
</attribute>
65+
<attribute name="description">
66+
<doc>
67+
A description of what this parameter represents.
68+
</doc>
69+
</attribute>
70+
<attribute name="expression">
71+
<doc>
72+
A string representing an expression that can be used to
73+
relate the parameter to another parameter's value. The
74+
format of this string is dependent on the program used
75+
to optimize the parameters and is not specified by
76+
NeXus.
77+
</doc>
78+
</attribute>
79+
<attribute name="initial" type="NX_NUMBER">
80+
<doc>
81+
The initial value of the parameter used in optimization.
82+
</doc>
83+
</attribute>
84+
<attribute name="max" type="NX_NUMBER">
85+
<doc>
86+
The upper bound of the parameter used in optimization.
87+
</doc>
88+
</attribute>
89+
<attribute name="min" type="NX_NUMBER">
90+
<doc>
91+
The lower bound of the parameter used in optimization.
92+
</doc>
93+
</attribute>
94+
<attribute name="vary" type="NX_BOOLEAN">
95+
<doc>
96+
True if the parameter was varied during optimization.
97+
</doc>
98+
</attribute>
3499
</field>
35100
</definition>
36-

base_classes/NXsource.nxdl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,4 @@
263263

264264
</doc>
265265
</field>
266-
</definition>
266+
</definition>

contributed_definitions/NXquadrupole_magnet.nxdl.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@
2626
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2727
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
2828
>
29-
<doc>definition for a quadrupole magnet.</doc>
29+
<doc>Base class for a quadrupole magnet.</doc>
3030
<field name="description" type="NX_CHAR">
31-
<doc>extended description of the magnet.</doc>
31+
<doc>Extended description of the magnet.</doc>
3232
</field>
3333
<field name="beamline_distance" type="NX_FLOAT" units="NX_LENGTH"
3434
minOccurs="0" maxOccurs="1">
35-
<doc>define position of beamline element relative to production target</doc>
35+
<doc>Define position of beamline element relative to production target</doc>
3636
</field>
3737
<field name="set_current" type="NX_FLOAT" units="NX_CURRENT"
3838
minOccurs="0" maxOccurs="1">
39-
<doc>current set on supply.</doc>
39+
<doc>Current set on supply.</doc>
4040
</field>
4141
<group name="read_current" type="NXlog"
4242
minOccurs="0" maxOccurs="1">
43-
<doc>current read from supply.</doc>
43+
<doc>Current read from supply.</doc>
4444
<field name="value" units="NX_CURRENT" />
4545
</group>
4646
<group name="read_voltage" type="NXlog"
4747
minOccurs="0" maxOccurs="1">
48-
<doc>voltage read from supply.</doc>
48+
<doc>Voltage read from supply.</doc>
4949
<field name="value" units="NX_VOLTAGE" />
5050
</group>
5151
</definition>

contributed_definitions/NXseparator.nxdl.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2727
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
2828
>
29-
<doc>definition for an electrostatic separator.</doc>
29+
<doc>Base class for an electrostatic separator.</doc>
3030
<field name="description" type="NX_CHAR">
31-
<doc>extended description of the separator.</doc>
31+
<doc>Extended description of the separator.</doc>
3232
</field>
3333
<field name="beamline_distance" type="NX_FLOAT" units="NX_LENGTH" minOccurs="0" maxOccurs="1">
34-
<doc>define position of beamline element relative to production target</doc>
34+
<doc>Define position of beamline element relative to production target</doc>
3535
</field>
3636
<field name="set_Bfield_current" type="NX_FLOAT" nameType="specified" units="NX_CURRENT" minOccurs="0" maxOccurs="1">
3737
<doc>current set on magnet supply.</doc>

contributed_definitions/NXspin_rotator.nxdl.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2727
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
2828
>
29-
<doc>definition for a spin rotator.</doc>
29+
<doc>Base class for a spin rotator.</doc>
3030
<field name="description" type="NX_CHAR">
31-
<doc>extended description of the spin rotator.</doc>
31+
<doc>Extended description of the spin rotator.</doc>
3232
</field>
3333
<field name="beamline_distance" type="NX_FLOAT" units="NX_LENGTH" minOccurs="0" maxOccurs="1">
34-
<doc>define position of beamline element relative to production target</doc>
34+
<doc>Define position of beamline element relative to production target</doc>
3535
</field>
3636
<field name="set_Bfield_current" type="NX_FLOAT" nameType="specified" units="NX_CURRENT" minOccurs="0" maxOccurs="1">
3737
<doc>current set on magnet supply.</doc>

dev_tools/docs/anchor_list.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,10 @@ def write(self):
112112
"""Write the in-memory registry to files"""
113113
if not self._writing_enabled:
114114
return
115+
utcnow = datetime.datetime.now(datetime.timezone.utc).isoformat()
115116
contents = dict(
116117
_metadata=dict(
117-
# datetime=datetime.datetime.now(datetime.UTC).isoformat(),
118-
# the next line is the py3.9 supported way of getting the datetime
119-
# this will become deprecated however in py3.12 for which the
120-
# line above-mentioned is a fix, which however does not work in py3.9
121-
datetime=datetime.datetime.utcnow().isoformat(),
118+
datetime=utcnow,
122119
title="NeXus NXDL vocabulary.",
123120
subtitle="Anchors for all NeXus fields, groups, "
124121
"attributes, and links.",

0 commit comments

Comments
 (0)