Skip to content

Commit

Permalink
Merge pull request #1414 from FAIRmat-NFDI/fairmat-2024-nxenvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie authored Jan 8, 2025
2 parents cd41cf2 + f144570 commit f2d9d4b
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 15 deletions.
88 changes: 88 additions & 0 deletions base_classes/NXactuator.nxdl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?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" type="group" name="NXactuator" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
An actuator used to control an external condition.

The condition itself is described in :ref:`NXenvironment`.
</doc>
<field name="name">
<doc>
Name of the actuator
</doc>
</field>
<field name="short_name">
<doc>
Short name of actuator used e.g. on monitor display program
</doc>
</field>
<field name="actuation_target">
<doc>
The physical component on which this actuator acts.
This should be a path in the NeXus tree structure.
For example, this could be an instance of NXsample or a device on NXinstrument.
</doc>
</field>
<field name="physical_quantity">
<doc>
Name for the physical quantity effected by the actuation

Examples:
temperature | pH | magnetic_field | electric_field | current | conductivity | resistance | voltage |
pressure | flow | stress | strain | shear | surface_pressure
</doc>
</field>
<field name="type">
<doc>
The type of hardware used for the actuation.

Examples (suggestions, but not restrictions):

:Temperature: laser | gas lamp | filament | resistive
:Pressure: anvil cell
:Voltage: potentiostat
</doc>
</field>
<field name="outputVALUE" type="NX_NUMBER" units="NX_ANY" nameType="partial">
<doc>
Any output that the actuator produces.
For example, a heater can have the field output_power(NX_NUMBER).
</doc>
</field>
<field name="depends_on" type="NX_CHAR">
<doc>
Refers to the last transformation specifying the position of the actuator
in the NXtransformations chain.
</doc>
</field>
<group type="NXtransformations">
<doc>
This is the group recommended for holding the chain of translation
and rotation operations necessary to position the actuator within
the instrument. The dependency chain may however traverse similar groups in
other component groups.
</doc>
</group>
<group type="NXfabrication"/>
</definition>
25 changes: 23 additions & 2 deletions base_classes/NXenvironment.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@
Note, it is recommended to use NXtransformations instead.
</doc>
</group>
<field name="value" type="NX_FLOAT" units="NX_ANY">
<doc>
This is to be used if there is no actuator/sensor that controls/measures
the environment parameters, but the user would still like to give a value for
it. An example would be a room temperature experiment where the temperature is
not actively measured, but rather estimated.

Note that this method for recording the environment parameters is not advised,
but using NXsensor and NXactuator is strongly recommended instead.
</doc>
</field>
<field name="depends_on" type="NX_CHAR">
<doc>
NeXus positions components by applying a set of translations and rotations
Expand All @@ -69,6 +80,16 @@
<group type="NXnote">
<doc>Additional information, LabView logs, digital photographs, etc</doc>
</group>
<group type="NXsensor"/>
<group type="NXactuator">
<doc>
Any actuator used to control the environment. This can be linked to an actuator
defined in an NXinstrument instance.
</doc>
</group>
<group type="NXsensor">
<doc>
Any sensor used to monitor the environment. This can be linked to a sensor
defined in an NXinstrument instance.
</doc>
</group>
</definition>

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?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
Expand All @@ -21,31 +21,42 @@
#
# 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="NXfabrication" extends="NXobject" type="group" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXfabrication" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
Details about a component as defined by its manufacturer.
Details about a component as it is defined by its manufacturer.
</doc>
<field name="vendor">
<field name="vendor" type="NX_CHAR">
<doc>
Company name of the manufacturer.
</doc>
</field>
<field name="model">
<field name="model" type="NX_CHAR">
<doc>
Version or model of the component named by the manufacturer.
</doc>
<attribute name="version" type="NX_CHAR">
<doc>
If it is possible that different versions exist, the value in this field should be made
specific enough to resolve the version.
</doc>
</attribute>
</field>
<field name="identifier">
<field name="serial_number" type="NX_CHAR">
<doc>
Ideally, (globally) unique persistent identifier, i.e.
a serial number or hash identifier of the component.
Serial number of the component.
</doc>
</field>
<field name="capability">
<field name="construction_date" type="NX_DATE_TIME">
<doc>
Free-text list with eventually multiple terms of
functionalities which the component offers.
Datetime of component's initial construction. This refers to the date of
first measurement after new construction or to the relocation date,
if it describes a multicomponent/custom-build setup.
Just the year is often sufficient, but if a full date/time is used, it is recommended to add an explicit time zone.
</doc>
</field>
<field name="capability" type="NX_CHAR">
<doc>
Free-text list of functionalities which the component offers.
</doc>
</field>
<!--NEW ISSUE: Define a bag of controlled words and use only these. Examples are Feg, Astar, OmegaFilter.-->
</definition>
3 changes: 2 additions & 1 deletion base_classes/NXsensor.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<item value="pH" />
<item value="magnetic_field" />
<item value="electric_field" />
<item value="current" />
<item value="conductivity" />
<item value="resistance" />
<item value="voltage" />
Expand Down Expand Up @@ -154,6 +155,7 @@
This group describes the shape of the sensor when necessary.
</doc>
</group>
<group type="NXfabrication"/>
<attribute name="default">
<doc>
.. index:: plotting
Expand Down Expand Up @@ -190,4 +192,3 @@
</doc>
</group>
</definition>

0 comments on commit f2d9d4b

Please sign in to comment.