Skip to content

Commit

Permalink
format base classes and applications in accordance to existing NIAC v…
Browse files Browse the repository at this point in the history
…ersion

# Conflicts:
#	applications/NXarpes.nxdl.xml
#	applications/nyaml/NXarpes.yaml
#	base_classes/NXbeam.nxdl.xml
#	base_classes/NXdata.nxdl.xml
#	base_classes/NXdetector.nxdl.xml
#	base_classes/NXentry.nxdl.xml
#	base_classes/NXenvironment.nxdl.xml
#	base_classes/NXinstrument.nxdl.xml
#	base_classes/NXmonochromator.nxdl.xml
#	base_classes/NXroot.nxdl.xml
#	base_classes/NXsample.nxdl.xml
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/NXsensor.nxdl.xml
#	base_classes/NXsource.nxdl.xml
#	base_classes/NXsubentry.nxdl.xml
#	base_classes/NXtransformations.nxdl.xml
#	base_classes/NXuser.nxdl.xml
#	base_classes/nyaml/NXaperture.yaml
#	base_classes/nyaml/NXbeam.yaml
#	base_classes/nyaml/NXdata.yaml
#	base_classes/nyaml/NXdetector.yaml
#	base_classes/nyaml/NXentry.yaml
#	base_classes/nyaml/NXenvironment.yaml
#	base_classes/nyaml/NXinstrument.yaml
#	base_classes/nyaml/NXmonochromator.yaml
#	base_classes/nyaml/NXprocess.yaml
#	base_classes/nyaml/NXroot.yaml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
#	base_classes/nyaml/NXsensor.yaml
#	base_classes/nyaml/NXsource.yaml
#	base_classes/nyaml/NXsubentry.yaml
#	base_classes/nyaml/NXtransformations.yaml
#	base_classes/nyaml/NXuser.yaml
  • Loading branch information
lukaspie committed Sep 23, 2024
1 parent 67808e2 commit c339f41
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 72 deletions.
21 changes: 2 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ test ::

clean ::
$(RM) -rf $(BUILD_DIR)
$(RM) -rf $(BASE_CLASS_DIR)/$(NYAML_SUBDIR)
$(RM) -rf $(APPDEF_DIR)/$(NYAML_SUBDIR)
$(RM) -rf $(CONTRIB_DIR)/$(NYAML_SUBDIR)

prepare ::
$(PYTHON) -m dev_tools manual --prepare --build-root $(BUILD_DIR)
Expand Down Expand Up @@ -97,24 +94,10 @@ all ::
@echo "HTML built: `ls -lAFgh $(BUILD_DIR)/manual/build/html/index.html`"
@echo "PDF built: `ls -lAFgh $(BUILD_DIR)/manual/build/latex/nexus.pdf`"

$(BASE_CLASS_DIR)/%.nxdl.xml : $(BASE_CLASS_DIR)/$(NYAML_SUBDIR)/%.yaml
nyaml2nxdl $< --output-file $@

$(CONTRIB_DIR)/%.nxdl.xml : $(CONTRIB_DIR)/$(NYAML_SUBDIR)/%.yaml
nyaml2nxdl $< --output-file $@

$(APPDEF_DIR)/%.nxdl.xml : $(APPDEF_DIR)/$(NYAML_SUBDIR)/%.yaml
nyaml2nxdl $< --output-file $@

nxdl: $(YBC_NXDL_TARGETS) $(YCONTRIB_NXDL_TARGETS) $(YAPPDEF_NXDL_TARGETS)

nyaml:
$(MAKE) -f nyaml.mk


# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2008-2024 NeXus International Advisory Committee (NIAC)
# Copyright (C) 2008-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
Expand All @@ -130,4 +113,4 @@ nyaml:
# 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
# For further information, see http://www.nexusformat.org
100 changes: 47 additions & 53 deletions base_classes/NXaperture.nxdl.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<?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)
# Copyright (C) 2008-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
Expand All @@ -27,30 +27,30 @@
</doc>
<!--TODO compare with "screens" in SHADOW-->
<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 &quot;.&quot; if located in the origin. Usually these operations are stored in a
NXtransformations group. But NeXus allows them to be stored anywhere.
The reference point of the aperture is its center in the x and y axis. The reference point on the z axis is the
surface of the aperture pointing towards the source.
In complex (asymmetric) geometries an NXoff_geometry group can be used to provide an unambiguous reference.
.. image:: aperture/aperture.png
:width: 40%
</doc>
<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.

The reference point of the aperture is its center in the x and y axis. The reference point on the z axis is the
surface of the aperture pointing towards the source.

In complex (asymmetric) geometries an NXoff_geometry group can be used to provide an unambiguous reference.

.. image:: aperture/aperture.png
:width: 40%
</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.
</doc>
<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.
</doc>
</group>
<group type="NXpositioner">
<doc>
Expand All @@ -59,32 +59,26 @@
</group>
<group type="NXgeometry" deprecated="Use the field `depends_on` and :ref:`NXtransformations` to position the aperture and :ref:`NXoff_geometry` to describe its shape">
<doc>
location and shape of aperture

.. TODO: documentation needs improvement, contributions welcome

* description of terms is poor and leaves much to interpretation
* Describe what is meant by translation _here_ and ...
* Similar throughout base classes
* Some base classes do this much better
* Such as where is the gap written?
location and shape of aperture

.. TODO: documentation needs improvement, contributions welcome

* description of terms is poor and leaves much to interpretation
* Describe what is meant by translation _here_ and ...
* Similar throughout base classes
* Some base classes do this much better
* Such as where is the gap written?

</doc>
</group>
<group name="BLADE_GEOMETRY" type="NXgeometry" deprecated="Use :ref:`NXoff_geometry` instead to describe the shape of the aperture">
<doc>
location and shape of each blade
</doc>
<doc>location and shape of each blade</doc>
</group>
<field name="material">
<!--TODO Uniformity problem, "type" is used elsewhere for same context-->
<doc>
Absorbing material of the aperture
</doc>
<field name="material"><!-- TODO Uniformity problem, "type" is used elsewhere for same context -->
<doc>Absorbing material of the aperture</doc>
</field>
<field name="description">
<doc>
Description of aperture
</doc>
<doc>Description of aperture</doc>
</field>
<field name="shape">
<doc>
Expand Down Expand Up @@ -116,15 +110,15 @@
</group>
<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.
.. 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.
</doc>
</attribute>
</definition>

0 comments on commit c339f41

Please sign in to comment.