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

Include spm to contribution #305

Open
wants to merge 8 commits into
base: fairmat-2024-contributed
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
139 changes: 82 additions & 57 deletions base_classes/NXpositioner.nxdl.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?>
<?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) 2008-2024 NeXus International Advisory Committee (NIAC)
#
#
# 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
Expand All @@ -21,89 +21,114 @@
#
# For further information, see http://www.nexusformat.org
-->
<definition
name="NXpositioner"
type="group"
extends="NXobject"
category="base"
xmlns="http://definition.nexusformat.org/nxdl/3.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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="NXpositioner" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
A generic positioner such as a motor or piezo-electric transducer.
A generic positioner such as a motor or piezo-electric transducer.
</doc>
<field name="name">
<doc>symbolic or mnemonic name (one word)</doc>
<doc>
symbolic or mnemonic name (one word)
</doc>
</field>
<field name="description">
<doc>description of positioner</doc>
<doc>
description of positioner
</doc>
</field>
<field name="value" type="NX_NUMBER" units="NX_ANY">
<doc>best known value of positioner - need [n] as may be scanned</doc>
<dimensions rank="1"><dim index="1" value="n"/></dimensions>
<doc>
best known value of positioner - need [n] as may be scanned
</doc>
<dimensions rank="1">
<dim index="1" value="n"/>
</dimensions>
</field>
<field name="raw_value" type="NX_NUMBER" units="NX_ANY">
<doc>raw value of positioner - need [n] as may be scanned</doc>
<dimensions rank="1"><dim index="1" value="n"/></dimensions>
<doc>
raw value of positioner - need [n] as may be scanned
</doc>
<dimensions rank="1">
<dim index="1" value="n"/>
</dimensions>
</field>
<field name="target_value" type="NX_NUMBER" units="NX_ANY">
<doc>targeted (commanded) value of positioner - need [n] as may be scanned</doc>
<dimensions rank="1"><dim index="1" value="n"/></dimensions>
<doc>
targeted (commanded) value of positioner - need [n] as may be scanned
</doc>
<dimensions rank="1">
<dim index="1" value="n"/>
</dimensions>
</field>
<field name="tolerance" type="NX_NUMBER" units="NX_ANY">
<doc>maximum allowable difference between target_value and value</doc>
<dimensions rank="1"><dim index="1" value="n"/></dimensions>
<doc>
maximum allowable difference between target_value and value
</doc>
<dimensions rank="1">
<dim index="1" value="n"/>
</dimensions>
</field>
<field name="soft_limit_min" type="NX_NUMBER" units="NX_ANY">
<doc>minimum allowed limit to set value</doc>
<doc>
minimum allowed limit to set value
</doc>
</field>
<field name="soft_limit_max" type="NX_NUMBER" units="NX_ANY">
<doc>maximum allowed limit to set value</doc>
<doc>
maximum allowed limit to set value
</doc>
</field>
<field name="velocity" type="NX_NUMBER" units="NX_ANY">
<doc>velocity of the positioner (distance moved per unit time)</doc>
<doc>
velocity of the positioner (distance moved per unit time)
</doc>
</field>
<field name="acceleration_time" type="NX_NUMBER" units="NX_ANY">
<doc>time to ramp the velocity up to full speed</doc>
<doc>
time to ramp the velocity up to full speed
</doc>
</field>
<!-- TODO other parameters: settling time, backlash, link to readback channel -->
<!--TODO other parameters: settling time, backlash, link to readback channel-->
<field name="controller_record">
<doc>Hardware device record, e.g. EPICS process variable, taco/tango ...</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.
Hardware device record, e.g. EPICS process variable, taco/tango.
</doc>
</attribute>
</field>
<field name="depends_on" type="NX_CHAR">
<doc>
NeXus positions components by applying a set of translations and rotations
to apply to the component starting from 0, 0, 0. The order of these operations
is critical and forms what NeXus calls a dependency chain. The depends_on
field defines the path to the top most operation of the dependency chain or the
string "." if located in the origin. Usually these operations are stored in a
NXtransformations group. But NeXus allows them to be stored anywhere.

.. todo::
Add a definition for the reference point of a positioner.

NeXus positions components by applying a set of translations and rotations
to apply to the component starting from 0, 0, 0. The order of these operations
is critical and forms what NeXus calls a dependency chain. The depends_on
field defines the path to the top most operation of the dependency chain or the
string "." if located in the origin. Usually these operations are stored in a
NXtransformations group. But NeXus allows them to be stored anywhere.

.. todo::
Add a definition for the reference point of a positioner.
</doc>
</field>
<group type="NXtransformations">
<doc>
This is the group recommended for holding the chain of translation
and rotation operations necessary to position the component within
the instrument. The dependency chain may however traverse similar groups in
other component groups.
This is the group recommended for holding the chain of translation
and rotation operations necessary to position the component within
the instrument. The dependency chain may however traverse similar groups in
other component groups.
</doc>
</group>
<group name="actuator" type="NXactuator">
<doc>
The actuator of the positioner which is responsible for the movement of the
probe.
</doc>
<group name="feedback" type="NXpid">
<doc>
The feedback of the actual position of the positioner.
</doc>
<group name="pv_sensor" type="NXsensor">
<doc>
If present, the value and the value_log of this pv_sensor is the same as
the value and raw_value of the position itself.
</doc>
</group>
</group>
</group>
</definition>
171 changes: 171 additions & 0 deletions contributed_definitions/NXafm.nxdl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<?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="application" type="group" name="NXafm" extends="NXspm" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
An application definition to describe atomic force microscopy (AFM) scanning
technique.
</doc>
<group type="NXentry">
<field name="definition">
<doc>
Name of the definition that is used for the application.
</doc>
<enumeration>
<item value="NXafm"/>
</enumeration>
</field>
<field name="scan_mode">
<doc>
The mode of the scan.
</doc>
<enumeration>
<item value="contact mode"/>
<item value="tapping mode"/>
<item value="non-contact mode"/>
<item value="Kelvin probe"/>
<item value="electric force"/>
</enumeration>
</field>
<group name="experiment_instrument" type="NXinstrument">
<doc>
The group explains the core instruments' setup of the AFM experiment as well as the environment of the corresponding
instruments.
</doc>
<group name="photo_detector" type="NXdetector" optional="true">
<doc>
Information about the quadrant photodiode deflection detector.
</doc>
</group>
<group type="NXcantilever_spm" optional="true">
<doc>
The cantilever information.

Generally speaking, the cantilever resembles a leaf spring, which behaves as a simple harmonic oscillator.
When the probe (tip or particle) on the end of the cantilever is close to the surface of the sample,
an attractive or repulsive force appears between the cantilever and the sample, deforming the cantilever.
The detector (typically a light pointer hitting a quadrant photodiode) measures this deformation and, therefore,
the force acting on the cantilever.
In a typical AFM scan cantilever moves toward the surface of the sample until a user-defined value of force acting
on the cantilever is reached. The measured force is used as an input of a PID feedback loop, and the output of
this loop controls the vertical position of the cantilever.
</doc>
<group name="cantilever_oscillator" type="NXobject" optional="true">
<doc>
When a cantilever is oscillated close to its resonance, this describes the oscillator properties.

A cantilever can be used in direct contact mode to detect interaction forces or oscillated close to its
resonance frequency. Changes in the oscillation amplitude, phase (between oscillated tail and moving tip)
or resonance frequency are very sensitive to changes in the interction potential field, giving rise of
various measurement modes, such as non-contact or intermittent-contact (tapping) modes.
</doc>
<field name="oscillator_excitation" type="NX_NUMBER" optional="true" units="NX_ANY">
<!--is this correct? I would expect a driving voltage...-->
<doc>
The threshold voltage for oscillator excitation.
</doc>
</field>
<group name="phase_lock_loop" type="NXlockin" optional="true">
<doc>
Phase locked loop for cantilever lock-in device.
</doc>
<field name="amplitude_excitation" type="NX_NUMBER" optional="true" units="NX_ANY">
<doc>
The reference amplitude (also called drive amplitude) of the cantilever.
</doc>
</field>
</group>
</group>
</group>
<group name="scan_environment" type="NXenvironment">
<doc>
The environment information.
</doc>
<group name="height_piezo_sensor" type="NXsensor">
<doc>
Link to the group ENTRY[entry]/experiment_instrument/height_piezo_sensor.
</doc>
</group>
<group name="XY_piezo_sensor" type="NXsensor">
<doc>
Link to the group ENTRY[entry]/experiment_instrument/XY_piezo_sensor.
</doc>
</group>
<group name="tip_temp_sensor" type="NXsensor">
<doc>
Link to the group ENTRY[entry]/experiment_instrument/cantilever_temperature.
</doc>
</group>
</group>
<group name="height_piezo_sensor" type="NXsensor" optional="true">
<doc>
The sensor information for the height piezo device.
</doc>
<group name="piezo_configuration" type="NXpiezo_config_spm">
<doc>
The piezo configuration information like piezoelectric calibration and material
properties.
</doc>
<group name="piezo_material" type="NXpiezoelectric_material" optional="true">
<doc>
The material description and properties of the piezoelectric scanner materials.
</doc>
</group>
</group>
<group type="NXpositioner_spm">
<doc>
The positioner information like the position of the tip, the position of the
sample, PID loop feedback etc.
</doc>
</group>
</group>
<group name="XY_piezo_sensor" type="NXsensor" optional="true">
<doc>
The sensor information for the xy piezo device.
</doc>
<group name="piezo_configuration" type="NXpiezo_config_spm">
<doc>
The piezo configuration information like piezoelectric calibration and material
properties.
</doc>
<group name="piezo_material" type="NXpiezoelectric_material" optional="true">
<doc>
The material description and properties of the piezoelectric scanner materials.
</doc>
</group>
</group>
<group type="NXpositioner_spm">
<doc>
The positioner information like the position of the end of the cantilever, the position of the
sample, PID loop feedback etc.
</doc>
</group>
</group>
<group name="tip_temp_sensor" type="NXsensor" optional="true">
<doc>
The temperature of the scan environment or tip of the cantilever.
</doc>
</group>
</group>
</group>
</definition>
Loading