Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fairmat 2024: actuators and sensors in NXenvironment #1414

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
669c018
Add NXactuator base class
lukaspie Sep 22, 2023
02819a4
make NXenvironment.nxdl.xml
lukaspie Jan 5, 2024
4c7d06e
change starting data in NXenvironment
lukaspie Jan 5, 2024
5543e03
Regenerate nxdls
domna Jan 10, 2024
32114f3
add generic NXactuator to NXenvironment
lukaspie Jan 15, 2024
e5e0380
add default attribute to MPES-related base classes
lukaspie May 13, 2024
2bbf029
small modifications to clarify NXmpes
lukaspie Jul 9, 2024
20c2153
format base classes and applications in accordance to existing NIAC v…
lukaspie Sep 16, 2024
90ee8c9
revert unintentional changes from cherry-pick
lukaspie Sep 23, 2024
5a8d6d6
lukaspie Sep 23, 2024
6bf33c3
Add NXfabrication to all MPES instrument-related base classes
lukaspie Sep 27, 2023
66f0edc
make nxdls
lukaspie Jan 5, 2024
ba029c0
Recompiled NXdata and NXsensor with nyaml==0.0.9 as they showed issue…
atomprobe-tc Feb 29, 2024
36f1c46
Reverted unintentional change NXsensor.nxdl.xml
mkuehbach Mar 1, 2024
70fae95
format base classes and applications in accordance to existing NIAC v…
lukaspie Sep 16, 2024
2286702
revert unintentional changes from cherry-pick
lukaspie Sep 23, 2024
d814a87
move NXfabrication to base_classes
lukaspie Sep 23, 2024
ca0479a
bring in NXidentifier
lukaspie Sep 23, 2024
8679407
Apply suggestions from NIAC review
lukaspie Oct 1, 2024
838b858
reviewed changes to NXfabrication
lukaspie Oct 1, 2024
c038847
remove NXidentifier
lukaspie Oct 1, 2024
05f5c72
move NXpid to base_classes
lukaspie Oct 1, 2024
5a7f730
implement suggestions on NXactuator
lukaspie Oct 1, 2024
2a26f2a
remove default from NXenvironment
lukaspie Oct 1, 2024
1820ea0
remove default from NXactuator
lukaspie Oct 1, 2024
eed11b2
remove NXpid
lukaspie Dec 11, 2024
d2139be
restore NXpid in contributed
lukaspie Dec 11, 2024
14532fa
Apply suggestions from code review
lukaspie Dec 19, 2024
f144570
actuation_target in NXactuator
lukaspie Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions base_classes/NXactuator.nxdl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?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="attached_to">
<doc>
Describe where the actuator is attached to.
This could be an instance of NXsample or a device on NXinstrument.
</doc>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attached_to --> actuation_target

Should be a NeXus path as opposed to a description

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

</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_FLOAT" units="NX_ANY" nameType="partial">
lukaspie marked this conversation as resolved.
Show resolved Hide resolved
<doc>
Any output that the actuator produces.
For example, a heater can have the field heater_power(NX_FLOAT).
lukaspie marked this conversation as resolved.
Show resolved Hide resolved
</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_year" type="NX_DATE_TIME">
<doc>
lukaspie marked this conversation as resolved.
Show resolved Hide resolved
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.
It is recommended to add an explicit time zone.
</doc>
lukaspie marked this conversation as resolved.
Show resolved Hide resolved
</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>

Loading