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

Adds NXexperiment and NXmeasurement #71

Draft
wants to merge 2 commits into
base: fairmat
Choose a base branch
from
Draft
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
83 changes: 83 additions & 0 deletions contributed_definitions/NXexperiment.nxdl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?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-2022 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="NXexperiment" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
A general description of any experiment.
</doc>
<group type="NXentry">
<field name="title"/>
<field name="start_time" type="NX_DATE_TIME">
<doc>
Start datetime of the measurement.
</doc>
</field>
<field name="end_time" type="NX_DATE_TIME" recommended="true">
<doc>
Stop datetime of the measurement
</doc>
</field>
<field name="definition"/>
<group type="NXuser" recommended="true">
<field name="name">
<doc>
Name of the user
</doc>
</field>
<field name="affiliation" recommended="true">
<doc>
Name of the affiliation of the user at the
point in time when
the experiment was performed.
</doc>
</field>
<field name="address" recommended="true">
<doc>
Full address of the user's affiliation,
i.e. street, street number, zip, city, country
</doc>
</field>
<field name="email">
<doc>
Email address of the user.
</doc>
</field>
<field name="digital_id" type="NX_CHAR" recommended="true">
<doc>
Digital id of the operatore, e.g. orcid.
</doc>
</field>
</group>
<group type="NXsample">
<field name="sample_id" type="NX_CHAR">
<doc>
A unique sample id
</doc>
</field>
</group>
<group type="NXmeasurement"/>
<group type="NXinstrument"/>
<group type="NXprocess" recommended="true"/>
<group name="data" type="NXdata"/>
</group>
</definition>
41 changes: 41 additions & 0 deletions contributed_definitions/nyaml/NXexperiment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
category: application
doc: |
A general description of any experiment.
type: group
NXexperiment:
(NXentry):
title:
start_time(NX_DATE_TIME):
doc: Start datetime of the measurement.
end_time(NX_DATE_TIME):
exists: recommended
doc: Stop datetime of the measurement
definition:
(NXuser):
exists: recommended
name:
doc: Name of the user
affiliation:
exists: recommended
doc: |
Name of the affiliation of the user at the
point in time when
the experiment was performed.
address:
exists: recommended
doc: |
Full address of the user's affiliation,
i.e. street, street number, zip, city, country
email:
doc: Email address of the user.
digital_id(NX_CHAR):
exists: recommended
doc: Digital id of the operatore, e.g. orcid.
(NXsample):
sample_id(NX_CHAR):
doc: A unique sample id
(NXmeasurement):
(NXinstrument):
(NXprocess):
exists: recommended
data(NXdata):
57 changes: 57 additions & 0 deletions contributed_definitions/nyaml/NXmeasurement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
category: base
symbols:
N_parameters: The number of parameters which got scanned.
(NXmeasurement):
scan_names(NX_CHAR):
doc: Names of the scanned values
# enumeration: In an appdef this should be further specified with an
# enumeration, i.e. which scans are allowed.
dimensions:
rank: 1
dim: [[1, N_parameters]]
scan_indices(NX_NUMBER):
doc: |
An relation to which data index the data at a certain array
position belongs.
dimensions:
rank: 1
dim: [[1, N_parameters]]
scan_length(NX_NUMBER):
doc: The length of a scan axis
dimensions:
rank: 1
dim: [[1, N_parameters]]
scan_unit(NX_CHAR):
doc: The unit of a scan axis
dimensions:
rank: 1
dim: [[1, N_parameters]]
scan_values(NX_CHAR):
doc: Description of the scanned values
dimensions:
rank: N_parameters
alternate_axis_SCANNAME(NX_NUMBER):
original_entry(NX_CHAR):
doc: Pointer to where the original measurement data is stored.
derived_from(NX_CHAR):
doc: A pointer to the axis this alternate axis is derived from.
dimensions:
rank: 1
dim: [[1, scan_length[N]]]
# axisN has to exist for every value of scan_names
axis_SCANNAME(NX_NUMBER):
doc: |
The scan axis values. This should contain actually measured values.
If you want to store set parameters as well please use the
alternate_axis field.
original_entry(NX_CHAR):
doc: Pointer to where the original measurement data is stored.
dimensions:
rank: 1
dim: [[1, scan_length[N]]]
signal(NX_NUMBER):
original_entry(NX_CHAR):
doc: Pointer to where the original measurement data is stored.
dimensions:
rank: N_parameters
dim: [[1, scan_length1], [2, scan_length2], ...]]