<?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-2020 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="NXreftof" 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"
  >
    <doc>This is an application definition for raw data from a TOF reflectometer. </doc>
    <group type="NXentry" name="entry">
      <field name="title" />
      <field name="start_time" type="NX_DATE_TIME" />
      <field name="end_time" type="NX_DATE_TIME" />
      <field name="definition">
        <doc> Official NeXus NXDL schema to which this file conforms </doc>
        <enumeration>
          <item value="NXreftof"/>
        </enumeration>
      </field>
      <group type="NXinstrument" name="instrument">
        <field name="name" type="NX_CHAR"></field>
        <group type="NXdisk_chopper" name="chopper">
          <field name="distance" type="NX_FLOAT" units="NX_LENGTH">
            <doc>Distance between chopper and sample</doc>
          </field>
        </group>
        <group type="NXdetector" name="detector">
          <field name="data" type="NX_INT" signal="1">
            <dimensions rank="3">
              <dim index="1" value="xsize" />
              <dim index="2" value="ysize" />
              <dim index="3" value="nTOF" />
            </dimensions>
          </field>
          <field name="time_of_flight" type="NX_FLOAT"
            units="NX_TIME_OF_FLIGHT" axis="3">
            <doc>
              Array of time values for each bin in a time-of-flight
              measurement
            </doc>
            <dimensions rank="1">
              <dim index="1" value="nTOF" />
            </dimensions>
          </field>
          <field name="distance" type="NX_FLOAT" units="NX_LENGTH"></field>
          <field name="polar_angle" type="NX_FLOAT" units="NX_ANGLE"></field>
          <field name="x_pixel_size" type="NX_FLOAT"
            units="NX_LENGTH">
          </field>
          <field name="y_pixel_size" type="NX_FLOAT"
            units="NX_LENGTH">
          </field>
        </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"></field>
      </group>
      <group type="NXmonitor" name="control">
        <field name="mode">
          <doc>
            Count to a preset value based on either clock time (timer)
            or received monitor counts (monitor).
          </doc>
          <enumeration>
            <item value="monitor" />
            <item value="timer" />
          </enumeration>
        </field>
        <field name="preset" type="NX_FLOAT" units="NX_ANY">
          <doc>preset value for time or monitor</doc>
        </field>
        <field name="integral" type="NX_INT">
          <doc>Total integral monitor counts</doc>
        </field>
        <field name="time_of_flight" type="NX_FLOAT"
          units="NX_TIME_OF_FLIGHT" axis="1">
          <doc>Time channels</doc>
        </field>
        <field name="data" type="NX_INT" signal="1">
          <doc>Monitor counts in each time channel</doc>
        </field>
      </group>
      <group type="NXdata" name="data">
        <link name="data" target="/NXentry/NXinstrument/NXdetector/data"></link>
        <link name="time_binning" target="/NXentry/NXinstrument/NXdetector/time_binning"></link>
      </group>
    </group>
</definition>
