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

added more specific guidelines to symbols intro definition #1074

Merged
merged 4 commits into from
Jun 15, 2022
Merged
Changes from 3 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
61 changes: 56 additions & 5 deletions manual/source/defs_intro.rst
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,62 @@ General documentation if this NXDL file.
Symbols table
=============

The symbols table describes
keywords used in this NXDL file to designate array dimensions.
At present, this list is not guaranteed to be complete
(some array dimension names appear only in a *Structure*
description and not here).
The ``Symbols`` table describes keywords used in this NXDL file to designate
array dimensions. For reasons of avoiding naming collisions and to facilitate
readbility and comprehension for those whom are new to an NXDL file, the following
guidelines are strongly encouraged:

* All symbols used in the application definition are defined in a single ``Symbols`` table.
* The :ref:`name <validItemName>` of a symbol uses camel case without any white space or underscores.

examples:

**nP**: Total number of scan points

**nE**: Number of photon energies scanned

**nFrames**: Number of frames

**detectorRank**: Rank of data array provided by the detector for a single measurement

* the ``Symbols`` table appears early in the .nxdl file above the ``NXentry`` group

example from `NXtomo.nxdl.xml <https://github.com/nexusformat/definitions/blob/main/applications/NXtomo.nxdl.xml>`_

.. code-block:: xml
prjemian marked this conversation as resolved.
Show resolved Hide resolved
:linenos:

<definition name="NXtomo" extends="NXobject" type="group"
category="application"
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"
>
<symbols>
<doc>
These symbols will be used below to coordinate datasets with the same shape.
</doc>
<symbol name="nFrames">
<doc>Number of frames</doc>
</symbol>
<symbol name="xSize">
<doc>Number of pixels in X direction</doc>
</symbol>
<symbol name="ySize">
<doc>Number of pixels in Y direction</doc>
</symbol>
</symbols>
<doc>
This is the application definition for x-ray or neutron tomography raw data.

In tomography
a number of dark field images are measured, some bright field images and, of course the sample.
In order to distinguish between them images carry a image_key.
</doc>
<group type="NXentry" name="entry">
<field name="title" minOccurs="0" maxOccurs="1"/>
...


Annotated Structure
===================
Expand Down