Skip to content
Snippets Groups Projects
NXtomo.nxdl.xml 6.23 KiB
Newer Older
<?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-2016 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 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"
    version="2.0"
  >

	<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"/> 
      <field name="start_time" type="NX_DATE_TIME"  minOccurs="0" maxOccurs="1"/> 
      <field name="end_time" type="NX_DATE_TIME"  minOccurs="0" maxOccurs="1"/> 
      <field name="definition">
        <doc> Official NeXus NXDL schema to which this file conforms </doc>
        <enumeration>
          <item value="NXtomo"/>
        </enumeration>
      </field>
      <group type="NXinstrument" name="instrument">
        <group type="NXsource" minOccurs="0" maxOccurs="1"> 
          <field name="type"  minOccurs="0" maxOccurs="1"/> 
          <field name="name"  minOccurs="0" maxOccurs="1"/> 
          <field name="probe" minOccurs="0" maxOccurs="1"> 
            <enumeration>
              <item value="neutron" />
              <item value="x-ray" />
              <item value="electron" />
            </enumeration>
          </field>
        </group>
        <group type="NXdetector" name="detector">
          <field name="data" type="NX_INT" signal="1">
            <dimensions rank="3">
              <dim index="1" value="nFrames" />
              <dim index="2" value="xsize" />
              <dim index="3" value="ysize" />
            </dimensions>
          </field>
          <field name="image_key" type="NX_INT" >
            <doc>
		 In order
		 to distinguish between sample projectrions, dark and flat
		 images, a magic number is recorded per frame.
		 The key is as follows:

		 * projection = 0
		 * flat field = 1
		 * dark field = 2
		 * invalid = 3
            </doc>
            <dimensions rank="1">
              <dim index="1" value="nFrames" />
            </dimensions>
          </field>
          <field name="x_pixel_size" type="NX_FLOAT" units="NX_LENGTH" minOccurs="0" maxOccurs="1"/>
          <field name="y_pixel_size" type="NX_FLOAT" units="NX_LENGTH" minOccurs="0" maxOccurs="1"/>
          <field name="distance" type="NX_FLOAT" units="NX_LENGTH" minOccurs="0" maxOccurs="1"> 
            <doc>Distance between detector and sample</doc>
          </field>
          <field name="x_rotation_axis_pixel_position" type="NX_FLOAT" minOccurs="0" maxOccurs="1"/> 
          <field name="y_rotation_axis_pixel_position" type="NX_FLOAT" minOccurs="0" maxOccurs="1"/> 
        </group>
      </group>
      <group type="NXsample" name="sample">
        <field name="name">
          <doc>Descriptive name of sample</doc>
        </field>
        <field name="rotation_angle" type="NX_FLOAT" units="NX_ANGLE" axis="1"> 
            <doc>
		 In practice this axis is always aligned along one pixel direction on the detector and usually vertical.
		 There are experiments with horizontal rotation axes, so this would need to be indicated somehow.
		 For now the best way for that is an open question.
            </doc>
          <dimensions rank="1">
            <dim index="1" value="nFrames" />
          </dimensions>
        </field>
        <field name="x_translation" units="NX_LENGTH" type="NX_FLOAT" minOccurs="0" maxOccurs="1"> 
          <dimensions rank="1">
            <dim value="nFrames" index="1"/>
          </dimensions>
        </field>
        <field name="y_translation" units="NX_LENGTH" type="NX_FLOAT" minOccurs="0" maxOccurs="1"> 
          <dimensions rank="1">
            <dim value="nFrames" index="1"/>
          </dimensions>
        </field>
        <field name="z_translation" units="NX_LENGTH" type="NX_FLOAT" minOccurs="0" maxOccurs="1"> 
          <dimensions rank="1">
            <dim value="nFrames" index="1"/>
          </dimensions>
        </field>
      </group>
      <group type="NXmonitor" name="control" minOccurs="0" maxOccurs="1"> 
        <field name="data" type="NX_FLOAT" units="NX_ANY">
        <doc>
          Total integral monitor counts for each measured frame. Allows a to correction for
          fluctuations in the beam between frames.
	</doc>
          <dimensions rank="1">
            <dim index="1" value="nFrames" />
          </dimensions>
        </field>
      </group>
      <group type="NXdata" name="data">
        <link name="data" target="/NXentry/NXinstrument/detector:NXdetector/data"/>
        <link name="rotation_angle" target="/NXentry/NXsample/rotation_angle"/>
        <link name="image_key" target="/NXentry/NXinstrument/detector:NXdetector/image_key"/>
      </group>
    </group>
</definition>