Monochromatic Neutron and X-ray Reflectometry
From NeXus
Please add comments to the discussion tab of this page and sign them
This proposed instrument definition adds a new class (NXspin) and also incorporates a few additions to existing base classes.
Contents |
Additions
New background NXcharacterization type:
specular_offset_background
The two existing backgrounds are isotropic_scatter and empty_container. Physically we are moving the detector/sample slightly away from the specular reflection condition and measuring the strength of the signal rather than putting an isotropic scatter at the sample position or leaving it empty.
Note: this simply identifies the location of the background scan, but does not specify how the background was measured.
Need to know the sample angle.
Propose adding the following to NXsample:
<polar_angle units="degrees" type="NX_FLOAT[np]">
{Polar angle of the sample with respect to the beam incident on
the monochromator}
</polar_angle>
<azimuthal_angle units="degress" type="NX_FLOAT[np]">
{Azimuthal angle of the sample with respect to the beam incident on
the monochromator}
</azimuthal_angle>
<rotation_angle units="degrees" type="NX_FLOAT[np]">
{Rotation angle of the sample}
</rotation_angle>
These fields are already used in the ratified NXmonotas, so there should be no problem ratifying them in the base class.
Record Spin State
For polarized neutron reflectometry the control software allows the user to select and tune a particular spin state. Expressed in terms of the individual filters and flipper currents, it is difficult to determine which spin state is desired. Instead the instrument component should record the target spin state.
Propose NXspin class to record the target spin at the sample or at the detector:
<?xml version="1.0" encoding="UTF-8"?>
<!--
URL: http://definitions.nexusformat.org/NXspin.xml
Editor: NIAC
$Id$
This is a description of the neutron spin state at a point in the
beam path, as set by the combination of filters and flippers.
-->
<NXspin name="{presample_spin|predetector_spin}">
<azimuthal_angle type="NX_FLOAT[np]" units="degrees">
{90 for spin up, -90 for spin down}
</azimuthal_angle>
<polar_angle type="NX_FLOAT[np]" units="degrees">
{Constant usually ignored. 0 in the direction of the beam path.}
</polar_angle>
</NXspin>
Accurate record of the start and stop of every scan
We need an accurate record of the start and stop of every measurement in a scan (e.g., to normalize by measurement time, and to correct for He3 polarizer efficiency decay).
NXmonitor already stores count duration. Propose adding count start_time as well:
<start_time type="NX_FLOAT[n]" units="seconds">
{Start time for each scan point}
</start_time>
The alternative is to use NXlog and assume a particularly named log corresponds to the NXmonitor, with the same length as the measured points:
<NXlog name="count_time">
<time start="{ISO8601}" type="NX_FLOAT[np]" units="seconds">
{Start of the measurement of point np}
</time>
<value type="NX_FLOAT[np]" units="seconds">
{Durations of the measurement point np}
</value>
</NXlog>
The first solution is cleaner.
Full Definition
Contents |
XML Meta-DTD Definition for NXmonoref.xml
This follows the XML Meta-DTD Definition format and can be downloaded from http://svn.nexusformat.org/definitions/tags/PRE_NXDL/instruments/NXmonoref.xml
<?xml version="1.0" ?>
<!--
Instrument Definition for Monochromatic Source Reflectometers.
Editor: Paul Kienzle <pkienzle at nist.gov>
Mangled_by: Nick Maliszewskyj <nickm at nist.gov>
$Id$
See http://www.nexusformat.org/ for component definitions.
Not handled: recording both the transmitted and the reflected beam off
the polarizer onto the 2D detector. Multiple analyzers is a similar
problem. In either case a solution similar to that in TAS can be applied.
2006-02-03 Refined by NIAC group meetings.
2006-10-04 Refined by NIAC group meetings.
2007-01-21 Tidy up formatting
2007-09-25 Refined by Paul Kienzle
-->
<NXentry name="{name of entry}">+
<definition version="1.0"
URL="http://www.nexusformat.org/instruments/xml/monoref.xml">
NXmonoref
</definition>
<start_time type="ISO8601" />
<NXcharacterization name="empty_container">?
{Suggested spectrum measurement for intensity vs. wavelength
for a given slit setting. Warning: beam profile is not
regular, but this effect is accommodated in the
spectrum measurement}
</NXcharacterization>
<NXcharacterization name="specular_offset_background">?
{Suggested background measurement. The referenced background
measurement should indicate whether it is sample offset, detector
offset or Qx offset.}
</NXcharacterization>
<!-- Scan identification tags for the specific measurement type -->
<measurement_type type="NX_CHAR">
{ "specular"|"intensity"|"q_offset"|"sample_offset"|"detector_offset"|"slice"|"area"|"alignment"|"other" }
{
Reflectometry has a variety of standard scan types. Chief among these
is the specular scan, which is the signal of interest. The
intensity scan is required to normalize the signal and compute
reflectivity. Background scans are made offsetting the sample or
the detector, or offsetting both such that the background is measured
at the same Qz (which measurement is used depends on the expected
nature of the background). Slice scans are used to determine
resolution or measure off-specular diffraction peaks. Area scans
can measure a swathe of Q, yielding specular, background and slice
measurements simultaneously. Various alignment scans are performed.
Generally the user is not interested in these during reduction and
analysis. Other scans are done for unusual measurements not
related to reflectivity.
}
</measurement_type>
<range name="{fieldname}" type="NX_FLOAT[2]" units="{variable}">*
{scan range for the named field; for display and sorting purposes;
the field name(s) can be instrument and measurement specific.}
</range>
<NXsample name="sample">
<polar_angle type="NX_FLOAT[np]" units="degree">?
{Sample angle relative to beam from the monochromator}
</polar_angle>
</NXsample>
<NXinstrument name="{name of instrument}">
<instrument_geometry>"vertical|horizontal"</instrument_geometry>
<!-- wavelength selection -->
<NXsource name="{name of source}"><probe /></NXsource>
<NXmonochromator name="monochromator">
<wavelength type="NX_FLOAT" units="Angstrom" />
<wavelength_error type="NX_FLOAT" units="Angstrom" />
</NXmonochromator>
<!-- collimation -->
<NXaperture name="pre[sample|detector]_slit#">
<NXgeometry name="geometry">?
<NXtranslation name="translation">
<distances type="NX_FLOAT" units="millimeter">
{ Location of slit along beamline (midway between slits
if slits are not coplanar). This is required to compute
instrument resolution. }
</distances>
</NXtranslation>
<NXshape name="shape">
<shape>"nxvertical_slit|nxhorizontal_slit"</shape>
<size type="NX_FLOAT[np]" units="millimeter">
{ Aperature opening. Use the instrument_geometry field
to determine if the slit defines resolution in Qz.
Square aperatures should be represented by two
vertical and horizontal slits at the same location.
Warning: vertical slits refers to the orientation
of the slit blades. They open horizontally.
}
</size>
</NXshape>
</NXgeometry>
</NXaperture>
<NXspin name="pre[sample|detector]_spin">
<azimuthal_angle type="NX_FLOAT[np]" units="degree">
{Use 90 for spin up, -90 for spin down for neutrons perpendicular
to the beam.}
</azimuthal_angle>
<polar_angle type="NX_FLOAT[np]" units="degree">
{Use 0 for neutrons perpendicular to the beam and 90 for neutrons
parallel to the beam, or -90 for neutrons antiparallel.}
</polar_angle>
</NXspin>
<!-- detector may be protected by an attenuator and/or a beam stop -->
<NXattenuator name="{name of attenuator}">?
<attenuator_transmission type="NX_FLOAT[np]" />
</NXattenuator>
<NXbeam_stop name="{name of beamstop}">
{ Need all fields so that we can calculate shadow of beam stop on
detector, and not use those pixels when calculating background. }?
</NXbeam_stop>
<NXdetector name="{name of detector}">
<polar_angle type="NX_FLOAT[np]">
{ Angle of the detector relative to the scattering center. }
</polar_angle>
<azimuthal_angle type="NX_FLOAT" units="degree">
{ Indicate sense of scattering:
0 = front of sample, 180 = back of sample.
If the beam is entering the side of the sample and reflecting
off the back surface of the film then the polar angle will be
negative, with negative angles interpreted as inverting the
scattering length density profile of the film. Note that the
absorption is likely to be high in these circumstances, though
measuring the intensity scan through the sample will normalize
for this automatically.
Users beware that the NeXus file writer may not know whether the
instrument geometry is measuring reflection off the back of the
sample (azimuthal_angle=180, polar_angle>0) or reflection
off the back surface of the front of the sample (azimuthal_angle=0,
polar_angle < 0), so software needs to allow the polar_angle
to be negated.
}
</azimuthal_angle>
</NXdetector>
</NXinstrument>
<NXdata name="{name of data}">?
<!--
Not a required component. Because of limitations in HDF, we cannot
link scan variables with identical names from different groups
into the same field in the NXdata group, so for example slit
openings will not be available. Interested parties will have
to examine all fields to determine which elements are varying
through the scan; these should be listed as range fields in the NXentry.
-->
</NXdata>
<NXmonitor name="control">
<mode type="NX_CHAR">
{"monitor"|"timer"}
</mode>
<preset type="NX_FLOAT">
{preset value for time in seconds or monitor in counts}
</preset>
<data type="NX_INT[np]">
{Monitor counts, absent if no monitor}?
</data>
<count_time type="NX_FLOAT[np]" units="second">
{Elapsed time for each scan point}
</count_time>
<start_time type="NX_FLOAT[np]" units="second">
{Start time for each scan point relative to start of the measurement}
</start_time>
</NXmonitor>
<NXlog name="{name of log}">*
{ Various logs for temperature, field, etc. which are assumed to
be constant over the duration of the run. The reduction program
should be able to display their values on a parallel graph. Note
that logs are not necessarily sampled synchronously with the
data points; use NXtimer and plot data points vs. start_time }
</NXlog>
<!-- Include the following only if start_time is not part of NXmonitor.
<NXlog start_time="ISO8601" name="elapsed_time">?
<time type="FLOAT[np]" unit="second">
{Start of the measurement of point np}
</time>
<value type="FLOAT[np]" unit="second">
{Elapsed time during the measurement of point, including dead time
when the detector/monitor were off. This will be greater than or
equal to the count_time field recorded in the monitor.}
</value>
</NXlog>
-->
</NXentry>
Tabular Representation of XML Meta-DTD
(automatically generated from http://svn.nexusformat.org/definitions/tags/PRE_NXDL/instruments/NXmonoref.xml)
-
NXentry
Name Type Description Attributes definition NX_CHAR version="1.0"
URL="http://www.nexusformat.org/instruments/xml/monoref.xml"
start_time ISO 8601 empty_container NXcharacterization Suggested spectrum measurement for intensity vs. wavelength for a given slit setting. Warning: beam profile is not regular, but this effect is accommodated in the spectrum measurement specular_offset_background NXcharacterization Suggested background measurement. The referenced background measurement should indicate whether it is sample offset, detector offset or Qx offset. measurement_type NX_CHAR "specular"|"intensity"|"q_offset"|"sample_offset"|"detector_offset"|"slice"|"area"|"alignment"|"other"
{ Reflectometry has a variety of standard scan types. Chief among these is the specular scan, which is the signal of interest. The intensity scan is required to normalize the signal and compute reflectivity. Background scans are made offsetting the sample or the detector, or offsetting both such that the background is measured at the same Qz (which measurement is used depends on the expected nature of the background). Slice scans are used to determine resolution or measure off-specular diffraction peaks. Area scans can measure a swathe of Q, yielding specular, background and slice measurements simultaneously. Various alignment scans are performed. Generally the user is not interested in these during reduction and analysis. Other scans are done for unusual measurements not related to reflectivity. }{fieldname} range scan range for the named field; for display and sorting purposes; the field name(s) can be instrument and measurement specific. units="{variable}"
sample NXsample -
NXsample
Name Type Description Attributes polar_angle NX_FLOAT[np] Sample angle relative to beam from the monochromator units="degree"
-
NXentry continued (1)
Name Type Description Attributes {name of instrument} NXinstrument -
NXinstrument
Name Type Description Attributes instrument_geometry NX_CHAR {name of source} NXsource -
NXinstrument continued (1)
Name Type Description Attributes monochromator NXmonochromator -
NXmonochromator
Name Type Description Attributes wavelength NX_FLOAT units="Angstrom"
wavelength_error NX_FLOAT units="Angstrom"
-
NXinstrument continued (2)
Name Type Description Attributes pre[sample|detector]_slit# NXaperture -
NXaperture
Name Type Description Attributes geometry NXgeometry -
NXgeometry
Name Type Description Attributes translation NXtranslation -
NXtranslation
Name Type Description Attributes distances NX_FLOAT Location of slit along beamline (midway between slits if slits are not coplanar). This is required to compute instrument resolution. units="millimeter"
-
NXgeometry continued (1)
Name Type Description Attributes shape NXshape -
NXshape
Name Type Description Attributes shape NX_CHAR size NX_FLOAT[np] Aperature opening. Use the instrument_geometry field to determine if the slit defines resolution in Qz. Square aperatures should be represented by two vertical and horizontal slits at the same location. Warning: vertical slits refers to the orientation of the slit blades. They open horizontally. units="millimeter"
-
NXinstrument continued (3)
Name Type Description Attributes pre[sample|detector]_spin NXspin -
NXspin
Name Type Description Attributes azimuthal_angle NX_FLOAT[np] Use 90 for spin up, -90 for spin down for neutrons perpendicular to the beam. units="degree"
polar_angle NX_FLOAT[np] Use 0 for neutrons perpendicular to the beam and 90 for neutrons parallel to the beam, or -90 for neutrons antiparallel. units="degree"
-
NXinstrument continued (4)
Name Type Description Attributes {name of attenuator} NXattenuator -
NXinstrument continued (5)
Name Type Description Attributes {name of beamstop} NXbeam_stop Need all fields so that we can calculate shadow of beam stop on detector, and not use those pixels when calculating background. {name of detector} NXdetector -
NXdetector
Name Type Description Attributes polar_angle NX_FLOAT[np] Angle of the detector relative to the scattering center. azimuthal_angle NX_FLOAT Indicate sense of scattering: 0 = front of sample, 180 = back of sample. If the beam is entering the side of the sample and reflecting off the back surface of the film then the polar angle will be negative, with negative angles interpreted as inverting the scattering length density profile of the film. Note that the absorption is likely to be high in these circumstances, though measuring the intensity scan through the sample will normalize for this automatically. Users beware that the NeXus file writer may not know whether the instrument geometry is measuring reflection off the back of the sample (azimuthal_angle=180, polar_angle>0) or reflection off the back surface of the front of the sample (azimuthal_angle=0, polar_angle < 0), so software needs to allow the polar_angle to be negated. units="degree"
-
NXentry continued (2)
Name Type Description Attributes {name of data} NXdata control NXmonitor -
NXmonitor
Name Type Description Attributes mode NX_CHAR "monitor"|"timer" preset NX_FLOAT preset value for time in seconds or monitor in counts data NX_INT[np] Monitor counts, absent if no monitor count_time NX_FLOAT[np] Elapsed time for each scan point units="second"
start_time NX_FLOAT[np] Start time for each scan point relative to start of the measurement units="second"
-
NXentry continued (3)
Name Type Description Attributes {name of log} NXlog Various logs for temperature, field, etc. which are assumed to be constant over the duration of the run. The reduction program should be able to display their values on a parallel graph. Note that logs are not necessarily sampled synchronously with the data points; use NXtimer and plot data points vs. start_time

