forked from nexusformat/definitions
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nexus definitions/files for beam path description (#183)
* Add nexus definitions/files for beam path description * Update base_classes/nyaml/NXopt_assembly.yaml Co-authored-by: Lukas Pielsticker <[email protected]> * Update base_classes/nyaml/NXopt_assembly.yaml Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * Apply suggestions from code review Co-authored-by: Lukas Pielsticker <[email protected]> * add_NX_defs_for_beam_path * modifying_yaml_files * fixing_nyaml_make_file * Adjusted files with Sandor together according to earlier hardcoded .nxs file * Added the missing nxdl.xml files via nyaml2nxdl Version=0.0.8 was used for nyaml. * moved created nxdl.xml files to correct directory * Suggestions to fix ci/cd by in NXtransfer_matrix_table.yaml Co-authored-by: Florian Dobener <[email protected]> * renaming transfer_matrix_table to beam_transfermatrix_table and opt_element to beam_device; also merging NXopt_beam to NXbeam * remove old nxdl files --------- Co-authored-by: Ron Hildebrandt <[email protected]> Co-authored-by: Lukas Pielsticker <[email protected]> Co-authored-by: Florian Dobener <[email protected]>
- Loading branch information
1 parent
09a962f
commit ffc7196
Showing
7 changed files
with
338 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?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" name="NXbeam_device" extends="NXobject" type="group" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"> | ||
<doc> | ||
Properties of generic beam device in an experimental setup. | ||
|
||
Any beam related devices like source, detector, filter, mirror, | ||
beamsplitter, ... which may modifies a beam in an experimental setup | ||
can be described here with its experimental position and relationship | ||
to the other beam devices in the setup. | ||
</doc> | ||
<field name="previous_devices"> | ||
<doc> | ||
Single device or list of devices pointing to the devices from which an | ||
beam originated to reach this device. | ||
This is used to describe a logical order of devices and for the whole setup. | ||
In this way, a "beam path" can be described (i.e., with starting point (light source) | ||
and end point (photo detector)). | ||
|
||
Example: /entry/instrument/detector. | ||
</doc> | ||
</field> | ||
<field name="purpose" type="NX_CHAR"> | ||
<doc> | ||
Description of the intended purpose of this device for | ||
the experimental setup. | ||
</doc> | ||
</field> | ||
<field name="group" type="NX_CHAR"> | ||
<doc> | ||
Name of the group with which this device can be associated. | ||
For example, if a group of devices is used for second harmonic generation, | ||
all these devices have the group name "second harmonic generation". | ||
Is used for simplified setup vizualization (or description?). | ||
</doc> | ||
</field> | ||
<group type="NXtransformations"> | ||
<doc> | ||
Location and orientation of the device. Note that even a | ||
simple distance can be given as a translation. | ||
|
||
You can use the @depends_on to describe from which device | ||
the transformation needs to be applied. | ||
</doc> | ||
</group> | ||
</definition> |
120 changes: 120 additions & 0 deletions
120
contributed_definitions/NXbeam_transfer_matrix_table.nxdl.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?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" name="NXbeam_transfer_matrix_table" extends="NXobject" type="group" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"> | ||
<symbols> | ||
<doc> | ||
Variables used throughout the document, e.g. dimensions or parameters. | ||
</doc> | ||
<symbol name="N_variables"> | ||
<doc> | ||
Length of the array associated to the data type. | ||
</doc> | ||
</symbol> | ||
</symbols> | ||
<doc> | ||
Contains datastructures of an experimental optical setup (i.e., multiple | ||
transfermatrix tables). These datastructures are used to relate physical | ||
properties of two beams (NXbeam) which have one common optical element | ||
(NXopt_element) (one specific transfermatrix). | ||
One of these beams in an input beam and the other one is an output beam. | ||
|
||
The data describes the change of beam properties, e.g. the intensity of a | ||
beam is reduced because the transmission coefficient of the beam device is | ||
lower than 1. | ||
</doc> | ||
<field name="datatype_N"> | ||
<doc> | ||
Select which type of data was recorded, for example aperture and | ||
focal length. | ||
It is possible to have multiple selections. This selection defines | ||
how many columns (N_variables) are stored in the data array. | ||
N in the name, is the index number in which order the given | ||
property is listed. | ||
</doc> | ||
<enumeration> | ||
<item value="aperture"/> | ||
<item value="focallength"/> | ||
<item value="orientation"/> | ||
<item value="jones matrix"/> | ||
</enumeration> | ||
</field> | ||
<field name="matrix_elements"> | ||
<doc> | ||
Please list in this array the column and row names used in your actual data. | ||
That is in the case of aperture ['diameter'] or focal length ['focal_length_value'] | ||
and for orientation matrix ['OM1', 'OM2', 'OM3'] or for jones matrix | ||
['JM1','JM2'] | ||
</doc> | ||
<dimensions rank="1"> | ||
<dim index="1" value="N_variables"/> | ||
</dimensions> | ||
</field> | ||
<field name="TRANSFER_MATRIX" type="NX_NUMBER"> | ||
<doc> | ||
Contains the datastructure which relates beam properties of an | ||
input and output beam as result of the input beam interaction | ||
with the beam device. | ||
|
||
Transfermatrix relationship between N input beams and M output beams. | ||
It contains a table with the relevant matricis to be used for different | ||
transmissitted properties (such as polarization, intensity, phase). | ||
|
||
Data structure for all transfermatrices of an beam device in a setup. | ||
For each combination of N input and M output beams and for L physical | ||
concept (i.e. beam intensity), one matrix can be defined. | ||
|
||
In this way, the transfermatrix table has the dimension NxM. | ||
|
||
For each entry, in this transfermatrix, there are L formalisms. | ||
Each formalism has the dimension math:`dim(L_i)xdim(L_i)`, | ||
whereby math:`L_i` is the specific physical concept (Intensity, polarization, direction). | ||
|
||
A beamsplitter with two input laser beams can have a total of | ||
four transfermatrices (2 Input x 2 Output). | ||
|
||
The dimension of the transfermatrix depends on the parameters. | ||
Examples are: | ||
1x1 for intensity/power | ||
2x2 for jones formalism | ||
3x3 for direction | ||
</doc> | ||
<attribute name="input"> | ||
<doc> | ||
Specific name of input beam which the transfermatrix table is related to. | ||
</doc> | ||
</attribute> | ||
<attribute name="output"> | ||
<doc> | ||
Specific name of output beam which the transfermatrix table is related to. | ||
</doc> | ||
</attribute> | ||
<dimensions rank="2"> | ||
<doc> | ||
Square matrix with dimension N_variables x N_variables | ||
</doc> | ||
<dim index="1" value="N_variables"/> | ||
<dim index="2" value="N_variables"/> | ||
</dimensions> | ||
</field> | ||
</definition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
category: base | ||
doc: | | ||
Properties of generic beam device in an experimental setup. | ||
Any beam related devices like source, detector, filter, mirror, | ||
beamsplitter, ... which may modifies a beam in an experimental setup | ||
can be described here with its experimental position and relationship | ||
to the other beam devices in the setup. | ||
NXbeam_device(NXobject): | ||
|
||
previous_devices: | ||
doc: | | ||
Single device or list of devices pointing to the devices from which an | ||
beam originated to reach this device. | ||
This is used to describe a logical order of devices and for the whole setup. | ||
In this way, a "beam path" can be described (i.e., with starting point (light source) | ||
and end point (photo detector)). | ||
Example: /entry/instrument/detector. | ||
purpose(NX_CHAR): | ||
doc: | | ||
Description of the intended purpose of this device for | ||
the experimental setup. | ||
group(NX_CHAR): | ||
doc: | | ||
Name of the group with which this device can be associated. | ||
For example, if a group of devices is used for second harmonic generation, | ||
all these devices have the group name "second harmonic generation". | ||
Is used for simplified setup vizualization (or description?). | ||
(NXtransformations): | ||
doc: | | ||
Location and orientation of the device. Note that even a | ||
simple distance can be given as a translation. | ||
You can use the @depends_on to describe from which device | ||
the transformation needs to be applied. |
85 changes: 85 additions & 0 deletions
85
contributed_definitions/nyaml/NXbeam_transfer_matrix_table.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
category: base | ||
doc: | | ||
Contains datastructures of an experimental optical setup (i.e., multiple | ||
transfermatrix tables). These datastructures are used to relate physical | ||
properties of two beams (NXbeam) which have one common optical element | ||
(NXopt_element) (one specific transfermatrix). | ||
One of these beams in an input beam and the other one is an output beam. | ||
The data describes the change of beam properties, e.g. the intensity of a | ||
beam is reduced because the transmission coefficient of the beam device is | ||
lower than 1. | ||
symbols: | ||
doc: | | ||
Variables used throughout the document, e.g. dimensions or parameters. | ||
N_variables: | | ||
Length of the array associated to the data type. | ||
NXbeam_transfer_matrix_table(NXobject): | ||
datatype_N: | ||
doc: | | ||
Select which type of data was recorded, for example aperture and | ||
focal length. | ||
It is possible to have multiple selections. This selection defines | ||
how many columns (N_variables) are stored in the data array. | ||
N in the name, is the index number in which order the given | ||
property is listed. | ||
enumeration: | ||
[ | ||
aperture, | ||
focallength, | ||
orientation, | ||
jones matrix, | ||
] | ||
matrix_elements: | ||
doc: | | ||
Please list in this array the column and row names used in your actual data. | ||
That is in the case of aperture ['diameter'] or focal length ['focal_length_value'] | ||
and for orientation matrix ['OM1', 'OM2', 'OM3'] or for jones matrix | ||
['JM1','JM2'] | ||
dimensions: | ||
rank: 1 | ||
dim: [[1, N_variables]] | ||
|
||
TRANSFER_MATRIX(NX_NUMBER): | ||
doc: | | ||
Contains the datastructure which relates beam properties of an | ||
input and output beam as result of the input beam interaction | ||
with the beam device. | ||
Transfermatrix relationship between N input beams and M output beams. | ||
It contains a table with the relevant matricis to be used for different | ||
transmissitted properties (such as polarization, intensity, phase). | ||
Data structure for all transfermatrices of an beam device in a setup. | ||
For each combination of N input and M output beams and for L physical | ||
concept (i.e. beam intensity), one matrix can be defined. | ||
In this way, the transfermatrix table has the dimension NxM. | ||
For each entry, in this transfermatrix, there are L formalisms. | ||
Each formalism has the dimension math:`dim(L_i)xdim(L_i)`, | ||
whereby math:`L_i` is the specific physical concept (Intensity, polarization, direction). | ||
A beamsplitter with two input laser beams can have a total of | ||
four transfermatrices (2 Input x 2 Output). | ||
The dimension of the transfermatrix depends on the parameters. | ||
Examples are: | ||
1x1 for intensity/power | ||
2x2 for jones formalism | ||
3x3 for direction | ||
\@input: | ||
doc: | | ||
Specific name of input beam which the transfermatrix table is related to. | ||
\@output: | ||
doc: | | ||
Specific name of output beam which the transfermatrix table is related to. | ||
dimensions: | ||
doc: | | ||
Square matrix with dimension N_variables x N_variables | ||
rank: 2 | ||
dim: | ||
[ | ||
[1, N_variables], | ||
[2, N_variables], | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters