.. auto-generated by script ../../../../utils/nxdl2rst.py from the NXDL source NXmx.nxdl.xml

.. index::
    ! NXmx (application definition)
    ! mx (application definition)
    see: mx (application definition); NXmx

.. _NXmx:

====
NXmx
====

**Status**:

  application definition, extends :ref:`NXobject`

**Description**:

  functional application definition for macromolecular crystallography

**Symbols**:

  These symbols will be used below to coordinate datasets
  with the same shape.  Most MX x-ray detectors will produce
  two-dimensional images.  Some will produce three-dimensional
  images, using one of the indices to select a detector element.

  **dataRank**: rank of the ``data`` field

  **np**: number of scan points

  **i**: number of detector pixels in the slowest direction

  **j**: number of detector pixels in the second slowest direction

  **k**: number of detector pixels in the third slowest direction

**Groups cited**:
  :ref:`NXattenuator`, :ref:`NXbeam`, :ref:`NXcollection`, :ref:`NXdata`, :ref:`NXdetector_group`, :ref:`NXdetector_module`, :ref:`NXdetector`, :ref:`NXentry`, :ref:`NXgeometry`, :ref:`NXinstrument`, :ref:`NXnote`, :ref:`NXsample`, :ref:`NXsource`, :ref:`NXtransformations`

.. index:: NXentry (base class); used in application definition, NXdata (base class); used in application definition, NXsample (base class); used in application definition, NXtransformations (base class); used in application definition, NXinstrument (base class); used in application definition, NXattenuator (base class); used in application definition, NXdetector_group (base class); used in application definition, NXdetector (base class); used in application definition, NXcollection (base class); used in application definition, NXdetector_module (base class); used in application definition, NXbeam (base class); used in application definition, NXsource (base class); used in application definition, NXnote (base class); used in application definition, NXgeometry (base class); used in application definition

**Structure**:

  **(entry)**: (required) :ref:`NXentry`


    .. index:: title (field)

    **title**: (optional) :ref:`NX_CHAR <NX_CHAR>`


    .. index:: start_time (field)

    **start_time**: (required) :ref:`NX_DATE_TIME <NX_DATE_TIME>`

      ISO 8601 time/date of the first data point collected in UTC,
      using the Z suffix to avoid confusion with local time.
      Note that the time zone of the beamline should be provided in
      NXentry/NXinstrument/time_zone.

    .. index:: end_time (field)

    **end_time**: (optional) :ref:`NX_DATE_TIME <NX_DATE_TIME>`

      ISO 8601 time/date of the last data point collected in UTC,
      using the Z suffix to avoid confusion with local time.
      Note that the time zone of the beamline should be provided in
      NXentry/NXinstrument/time_zone. This field should only be 
      filled when the value is accurately observed. If the data 
      collection aborts or otherwise prevents accurate recording of
      the end_time, this field should be omitted.

    .. index:: end_time_estimated (field)

    **end_time_estimated**: (required) :ref:`NX_DATE_TIME <NX_DATE_TIME>`

      ISO 8601 time/date of the last data point collected in UTC,
      using the Z suffix to avoid confusion with local time.
      Note that the time zone of the beamline should be provided in
      NXentry/NXinstrument/time_zone.  This field may be filled
      with a value estimated before an observed value is avilable.

    .. index:: definition (field)

    **definition**: (required) :ref:`NX_CHAR <NX_CHAR>`

      NeXus NXDL schema to which this file conforms

      Obligatory value:  ``NXmx``

    **(data)**: (required) :ref:`NXdata`


      .. index:: data (field)

      **data[np, i, j, k]**: (recommended) :ref:`NX_NUMBER <NX_NUMBER>`

        For a dimension-2 detector, the rank of the data array will be 3.
        For a dimension-3 detector, the rank of the data array will be 4.
        This allows for the introduction of the frame number as the
        first index.

    **(sample)**: (required) :ref:`NXsample`


      .. index:: name (field)

      **name**: (required) :ref:`NX_CHAR <NX_CHAR>`

        Descriptive name of sample

      .. index:: depends_on (field)

      **depends_on**: (required) :ref:`NX_CHAR <NX_CHAR>`

        This is a requirement to describe for any scan experiment.

        The axis on which the sample position depends may be stored
        anywhere, but is normally stored in the NXtransformations
        group within the NXsample group.

        If there is no goniometer, e.g. with a jet, depends_on
        should be set to "."

      .. index:: temperature (field)

      **temperature**: (optional) :ref:`NX_CHAR <NX_CHAR>` {units=\ :ref:`NX_TEMPERATURE <NX_TEMPERATURE>`}


      **(transformations)**: (required) :ref:`NXtransformations`

        This is the recommended location for sample goniometer
        and other related axes.

        This is a requirement to describe for any scan experiment.
        The reason it is optional is mainly to accommodate XFEL
        single shot exposures.

        Use of the depends_on field and the NXtransformations group is
        strongly recommended.  As noted above this should be an absolute
        requirement to have for any scan experiment.

        The reason it is optional is mainly to accommodate XFEL
        single shot exposures.

    **(instrument)**: (required) :ref:`NXinstrument`


      .. index:: name (field)

      **name**: (required) :ref:`NX_CHAR <NX_CHAR>`

        Name of instrument

        .. index:: short_name (field attribute)

        **@short_name**: (required) :ref:`NX_CHAR <NX_CHAR>`

          short name for instrument, perhaps the acronym

      .. index:: time_zone (field)

      **time_zone**: (recommended) :ref:`NX_DATE_TIME <NX_DATE_TIME>`

        ISO 8601 time_zone offset from UTC

      **(attenuator)**: (optional) :ref:`NXattenuator`


        .. index:: attenuator_transmission (field)

        **attenuator_transmission**: (optional) :ref:`NX_NUMBER <NX_NUMBER>` {units=\ :ref:`NX_UNITLESS <NX_UNITLESS>`}


      **(detector_group)**: (recommended) :ref:`NXdetector_group`

        Optional logical grouping of detector elements.

        Each detector element is represented as an NXdetector group
        with its own detector data array.  Each detector data array
        may be further decomposed into array sections by use of
        NXdetector_module groups.  The names are given in the
        group names field.

        The groups are defined hierarchically, with names given
        in the group_names field, unique identifiing indices given
        in the field group_index, and the level in the hierarchy
        given in the group_parent field.  For example if an x-ray
        detector, DET, consists of four elements in a rectangular array::

        		 DTL	DTR
        		 DLL	DLR

        We could have::

        	 group_names: ["DET", "DTL", "DTR", "DLL", "DLR"]
        	 group_index: [1, 2, 3, 4, 5]
        	 group_parent:  [-1, 1, 1, 1, 1]


        .. index:: group_names (field)

        **group_names**: (required) :ref:`NX_CHAR <NX_CHAR>`

          An array of the names of the detector elements or hierarchical
          groupings of detector elements.

          Specified in the base classes as comma separated list of names,
          but new code should use an array of names as quoted strings.

        .. index:: group_index (field)

        **group_index[i]**: (required) :ref:`NX_INT <NX_INT>`

          An array of unique indices for detector elements or groupings
          of detector elements.

          Each element is a unique ID for the corresponding group named
          in the field group_names.  The IDs are positive integers starting
          with 1.

        .. index:: group_parent (field)

        **group_parent[group_index]**: (required) :ref:`NX_INT <NX_INT>`

          An array of the hierarchical levels of the parents of detector
          elements or groupings of detector elements.

          A top-level element or grouping has parent level -1

      **(detector)**: (required) :ref:`NXdetector`

        Normally the detector group will have the name ``detector``.
        However, in the case of multiple detector elements, each element
        needs a uniquely named NXdetector group.

        .. index:: depends_on (field)

        **depends_on**: (required) :ref:`NX_CHAR <NX_CHAR>`

          NeXus path to the detector positioner axis that most directly 
          supports the detector.

        .. index:: data (field)

        **data[np, i, j, k]**: (recommended) :ref:`NX_NUMBER <NX_NUMBER>`

          For a dimension-2 detector, the rank of the data array will be 3.
          For a dimension-3 detector, the rank of the data array will be 4.
          This allows for the introduction of the frame number as the
          first index.

        .. index:: description (field)

        **description**: (recommended) :ref:`NX_CHAR <NX_CHAR>`

          name/manufacturer/model/etc. information

        .. index:: time_per_channel (field)

        **time_per_channel**: (optional) :ref:`NX_CHAR <NX_CHAR>` {units=\ :ref:`NX_TIME <NX_TIME>`}

          todo: define more clearly

        .. index:: distance (field)

        **distance**: (recommended) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          Distance from the sample to the beam center.
          Normally this value is for guidance only, the proper 
          geometry can be found following the depends_on axis chain,
          But in appropriate cases where the dectector distance
          to the sample is observable independent of the axis
          chain, that may take precedence over the axis chain
          calculation.

        .. index:: distance_derived (field)

        **distance_derived**: (recommended) :ref:`NX_BOOLEAN <NX_BOOLEAN>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          Boolean to indicate if the distance is a derived, rather than
          a primary observation.  If distance_derived true or is not specified,
          the distance is assumed to be derived from delector axis
          specifications.

        .. index:: dead_time (field)

        **dead_time**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_TIME <NX_TIME>`}

          Detector dead time

        .. index:: count_time (field)

        **count_time**: (recommended) :ref:`NX_NUMBER <NX_NUMBER>` {units=\ :ref:`NX_TIME <NX_TIME>`}

          Elapsed actual counting time

        .. index:: beam_center_derived (field)

        **beam_center_derived**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          Boolean to indicate if the distance is a derived, rather than
          a primary observation.  If true or not provided, that value of
          beam_center_derived is assumed to be true

        .. index:: beam_center_x (field)

        **beam_center_x**: (recommended) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          This is the x position where the direct beam would hit the
          detector. This is a length and can be outside of the actual
          detector. The length can be in physical units or pixels as
          documented by the units attribute.  Normally, this should
          be derived from the axis chain, but the direct specification
          may take precendence if it is not a derived quantity.

        .. index:: beam_center_y (field)

        **beam_center_y**: (recommended) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          This is the y position where the direct beam would hit the
          detector. This is a length and can be outside of the actual
          detector. The length can be in physical units or pixels as
          documented by the units attribute.  Normally, this should
          be derived from the axis chain, but the direct specification
          may take precendence if it is not a derived quantity.

        .. index:: angular_calibration_applied (field)

        **angular_calibration_applied**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>`

          True when the angular calibration has been applied in the
          electronics, false otherwise.

        .. index:: angular_calibration (field)

        **angular_calibration[i, j, k]**: (optional) :ref:`NX_FLOAT <NX_FLOAT>`

          Angular calibration data.

        .. index:: flatfield_applied (field)

        **flatfield_applied**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>`

          True when the flat field correction has been applied in the
          electronics, false otherwise.

        .. index:: flatfield (field)

        **flatfield[i, j, k]**: (optional) :ref:`NX_FLOAT <NX_FLOAT>`

          Flat field correction data.  If provided, it is recommended
          that is be compressed

        .. index:: flatfield_error (field)

        **flatfield_error[i, j, k]**: (optional) :ref:`NX_FLOAT <NX_FLOAT>`

          Errors of the flat field correction data.  If provided, it is recommended
          that it be compressed

        .. index:: pixel_mask_applied (field)

        **pixel_mask_applied**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>`

          True when the pixel mask correction has been applied in the
          electronics, false otherwise.

        .. index:: pixel_mask (field)

        **pixel_mask[i, j]**: (recommended) :ref:`NX_INT <NX_INT>`

          The 32-bit pixel mask for the detector. Can be either one mask
          for the whole dataset (i.e. an array with indices i, j) or
          each frame can have its own mask (in which case it would be
          an array with indices np, i, j).
          Contains a bit field
          for each pixel to signal dead,
          blind or high or otherwise unwanted
          or undesirable pixels.
          They have the following meaning:

          	* bit 0: gap (pixel with no sensor)
          	* bit 1: dead
          	* bit 2: under responding
          	* bit 3: over responding
          	* bit 4: noisy
          	* bit 5: -undefined-
          	* bit 6: pixel is part of a cluster of problematic pixels (bit set in addition to others)
          	* bit 7: -undefined-
          	* bit 8: user defined mask (e.g. around beamstop)
          	* bits 9-30: -undefined-
          	* bit 31: virtual pixel (corner pixel with interpolated value)

          Normal data analysis software would
          not take pixels into account
          when a bit in (mask & 0x0000FFFF) is
          set. Tag bit in the upper
          two bytes would indicate special pixel
          properties that normally
          would not be a sole reason to reject the
          intensity value (unless
          lower bits are set.

          If the full bit depths is not required, providing a
          mask with fewer bits is permissible.

          If needed, additional pixel masks can be specified by
          including additional entries named pixel_mask_N, where
          N is an integer. For example, a general bad pixel mask
          could be specified in pixel_mask that indicates noisy
          and dead pixels, and an additional pixel mask from
          experiment-specific shadowing could be specified in
          pixel_mask_2. The cumulative mask is the bitwise OR
          of pixel_mask and any pixel_mask_N entries.

          If provided, it is recommended that it be compressed

        .. index:: countrate_correction_applied (field)

        **countrate_correction_applied**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>`

          True when a count-rate correction has already been applied in
          the data recorded here, false otherwise.

        .. index:: bit_depth_readout (field)

        **bit_depth_readout**: (recommended) :ref:`NX_INT <NX_INT>`

          How many bits the electronics record per pixel.

        .. index:: detector_readout_time (field)

        **detector_readout_time**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_TIME <NX_TIME>`}

          Time it takes to read the detector (typically milliseconds).
          This is important to know for time resolved experiments.

        .. index:: frame_time (field)

        **frame_time**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_TIME <NX_TIME>`}

          This is time for each frame. This is exposure_time + readout
          time.

        .. index:: gain_setting (field)

        **gain_setting**: (optional) :ref:`NX_CHAR <NX_CHAR>`

          The gain setting of the detector. This influences background.

        .. index:: saturation_value (field)

        **saturation_value**: (optional) :ref:`NX_INT <NX_INT>`

          The value at which the detector goes into saturation.
          Data above this value is known to be invalid.

        .. index:: sensor_material (field)

        **sensor_material**: (required) :ref:`NX_CHAR <NX_CHAR>`

          At times, radiation is not directly sensed by the detector.
          Rather, the detector might sense the output from some
          converter like a scintillator.
          This is the name of this converter material.

        .. index:: sensor_thickness (field)

        **sensor_thickness**: (required) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          At times, radiation is not directly sensed by the detector.
          Rather, the detector might sense the output from some
          converter like a scintillator. This is the thickness of this
          converter material.

        .. index:: threshold_energy (field)

        **threshold_energy**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_ENERGY <NX_ENERGY>`}

          Single photon counter detectors can be adjusted for a certain
          energy range in which they work optimally. This is the energy
          setting for this.

        .. index:: type (field)

        **type**: (optional) :ref:`NX_CHAR <NX_CHAR>`

          Description of type such as scintillator,
          ccd, pixel, image
          plate, CMOS, ...

        **(transformations)**: (required) :ref:`NXtransformations`

          Location for axes (transformations) to do with the
          detector

        **(collection)**: (optional) :ref:`NXcollection`

          Suggested container for detailed non-standard detector
          information like corrections applied automatically or
          performance settings.

        **(detector_module)**: (required) :ref:`NXdetector_module`

          Many detectors consist of multiple smaller modules that are
          operated in sync and store their data in a common dataset.
          To allow consistent parsing of the experimental geometry,
          this application definiton requires all detectors to
          define a detector module, even if there is only one.

          This group specifies the hyperslab of data in the data
          array associated with the detector that contains the
          data for this module.  If the module is associated with
          a full data array, rather than with a hyperslab within
          a larger array, then a single module should be defined,
          spanning the entire array.

          .. index:: data_origin (field)

          **data_origin**: (required) :ref:`NX_INT <NX_INT>`

            A dimension-2 or dimension-3 field which gives the indices
            of the origin of the hyperslab of data for this module in the
            main area detector image in the parent NXdetector module.

            The data_origin is 0-based.

            The frame number dimension (np) is omitted.  Thus the
            data_origin field for a dimension-2 dataset with indices (np, i, j)
            will be an array with indices (i, j), and for a dimension-3
            dataset with indices (np, i, j, k) will be an array with indices
            (i, j, k).

            The order of indices (i, j or i, j, k) is slow to fast.

          .. index:: data_size (field)

          **data_size**: (required) :ref:`NX_INT <NX_INT>`

            Two or three values for the size of the module in pixels in
            each direction. Dimensionality and order of indices is the
            same as for data_origin.

          .. index:: data_stride (field)

          **data_stride**: (optional) :ref:`NX_INT <NX_INT>`

            Two or three values for the stride of the module in pixels in
            each direction.  By default the stride is [1,1] or [1,1,1],
            and this is the most likely case.  This optional field is
            included for completeness.

          .. index:: module_offset (field)

          **module_offset**: (optional) :ref:`NX_NUMBER <NX_NUMBER>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

            Offset of the module in regards to the origin of the detector in an
            arbitrary direction.

            .. index:: transformation_type (field attribute)

            **@transformation_type**: (required) :ref:`NX_CHAR <NX_CHAR>`


              Obligatory value:  ``translation``

            .. index:: vector (field attribute)

            **@vector**: (required) :ref:`NX_CHAR <NX_CHAR>`


            .. index:: offset (field attribute)

            **@offset**: (required) :ref:`NX_CHAR <NX_CHAR>`


            .. index:: depends_on (field attribute)

            **@depends_on**: (required) :ref:`NX_CHAR <NX_CHAR>`


          .. index:: fast_pixel_direction (field)

          **fast_pixel_direction**: (required) :ref:`NX_NUMBER <NX_NUMBER>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

            Values along the direction of fastest varying pixel direction.
            The direction itself is given through the vector attribute

            .. index:: transformation_type (field attribute)

            **@transformation_type**: (required) :ref:`NX_CHAR <NX_CHAR>`


              Obligatory value:  ``translation``

            .. index:: vector (field attribute)

            **@vector**: (required) :ref:`NX_CHAR <NX_CHAR>`


            .. index:: offset (field attribute)

            **@offset**: (required) :ref:`NX_CHAR <NX_CHAR>`


            .. index:: depends_on (field attribute)

            **@depends_on**: (required) :ref:`NX_CHAR <NX_CHAR>`


          .. index:: slow_pixel_direction (field)

          **slow_pixel_direction**: (required) :ref:`NX_NUMBER <NX_NUMBER>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

            Values along the direction of slow varying pixel direction. The
            direction itself is given through the vector attribute

            .. index:: transformation_type (field attribute)

            **@transformation_type**: (required) :ref:`NX_CHAR <NX_CHAR>`


              Obligatory value:  ``translation``

            .. index:: vector (field attribute)

            **@vector**: (required) :ref:`NX_CHAR <NX_CHAR>`


            .. index:: offset (field attribute)

            **@offset**: (required) :ref:`NX_CHAR <NX_CHAR>`


            .. index:: depends_on (field attribute)

            **@depends_on**: (required) :ref:`NX_CHAR <NX_CHAR>`


      **(beam)**: (required) :ref:`NXbeam`


        .. index:: incident_wavelength (field)

        **incident_wavelength**: (required) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_WAVELENGTH <NX_WAVELENGTH>`}

          In the case of a monchromatic beam this is the scalar
          wavelength.

          In the case of a polychromatic beam this is an array of
          the wavelengths with the relative weights in
          incident_wavelength_weight.

        .. index:: incident_wavelength_weight (field)

        **incident_wavelength_weight**: (optional) :ref:`NX_FLOAT <NX_FLOAT>`

          In the case of a polychromatic beam this is an array of the
          relative weights of the corresponding wavelengths in
          incident_wavelength.

        .. index:: incident_wavelength_spread (field)

        **incident_wavelength_spread**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_WAVELENGTH <NX_WAVELENGTH>`}

          The wavelength spread FWHM for the corresponding
          wavelength(s) in incident_wavelength.

        .. index:: flux (field)

        **flux**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_FLUX <NX_FLUX>`}

          flux incident on beam plane area in photons per second per unit area

        .. index:: total_flux (field)

        **total_flux**: (required) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_FREQUENCY <NX_FREQUENCY>`}

          flux incident on beam plane in photons per second

        .. index:: incident_beam_size (field)

        **incident_beam_size[2]**: (recommended) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

          Two-element array of FWHM (if Gaussian or Airy function) or
          diameters (if top hat) or widths (if rectangular) of beam
          in the order x, y

        .. index:: profile (field)

        **profile**: (recommended) :ref:`NX_CHAR <NX_CHAR>`

          The beam profile, Gaussian, Airy function, top-hat or
          rectangular.  The profile is given in the plane of
          incidence of the beam on the sample.

          Any of these values: ``Gaussian`` | ``Airy`` | ``top-hat`` | ``rectangular``

        .. index:: incident_polarisation_stokes (field)

        **incident_polarisation_stokes[np, 4]**: (recommended) :ref:`NX_CHAR <NX_CHAR>`


        **incident_wavelength_spectrum**: (optional) :ref:`NXdata`


    **(source)**: (required) :ref:`NXsource`

      The neutron or x-ray storage ring/facility.

      .. index:: distance (field)

      **distance**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

        Effective distance from sample
        Distance as seen by radiation from sample. This number should be negative
        to signify that it is upstream of the sample.

      .. index:: name (field)

      **name**: (required) :ref:`NX_CHAR <NX_CHAR>`

        Name of source

        .. index:: short_name (field attribute)

        **@short_name**: (optional) :ref:`NX_CHAR <NX_CHAR>`

          short name for source, perhaps the acronym

      .. index:: type (field)

      **type**: (optional) :ref:`NX_CHAR <NX_CHAR>`

        type of radiation source (pick one from the enumerated list and spell exactly)

        Any of these values:

          * ``Spallation Neutron Source``

          * ``Pulsed Reactor Neutron Source``

          * ``Reactor Neutron Source``

          * ``Synchrotron X-ray Source``

          * ``Pulsed Muon Source``

          * ``Rotating Anode X-ray``

          * ``Fixed Tube X-ray``

          * ``UV Laser``

          * ``Free-Electron Laser``

          * ``Optical Laser``

          * ``Ion Source``

          * ``UV Plasma Source``


      .. index:: probe (field)

      **probe**: (optional) :ref:`NX_CHAR <NX_CHAR>`

        type of radiation probe (pick one from the enumerated list and spell exactly)

        Any of these values:

          * ``neutron``

          * ``x-ray``

          * ``muon``

          * ``electron``

          * ``ultraviolet``

          * ``visible light``

          * ``positron``

          * ``proton``


      .. index:: power (field)

      **power**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_POWER <NX_POWER>`}

        Source power

      .. index:: emittance_x (field)

      **emittance_x**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_EMITTANCE <NX_EMITTANCE>`}

        Source emittance (nm-rad) in X (horizontal) direction.

      .. index:: emittance_y (field)

      **emittance_y**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_EMITTANCE <NX_EMITTANCE>`}

        Source emittance (nm-rad) in Y (horizontal) direction.

      .. index:: sigma_x (field)

      **sigma_x**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

        particle beam size in x

      .. index:: sigma_y (field)

      **sigma_y**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_LENGTH <NX_LENGTH>`}

        particle beam size in y

      .. index:: flux (field)

      **flux**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_FLUX <NX_FLUX>`}

        Source intensity/area (example: s-1 cm-2)

      .. index:: energy (field)

      **energy**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_ENERGY <NX_ENERGY>`}

        Source energy.
        For storage rings, this would be the particle beam energy.
        For X-ray tubes, this would be the excitation voltage.

      .. index:: current (field)

      **current**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_CURRENT <NX_CURRENT>`}

        Accelerator, X-ray tube, or storage ring current

      .. index:: voltage (field)

      **voltage**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_VOLTAGE <NX_VOLTAGE>`}

        Accelerator voltage

      .. index:: frequency (field)

      **frequency**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_FREQUENCY <NX_FREQUENCY>`}

        Frequency of pulsed source

      .. index:: period (field)

      **period**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_PERIOD <NX_PERIOD>`}

        Period of pulsed source

      .. index:: target_material (field)

      **target_material**: (optional) :ref:`NX_CHAR <NX_CHAR>`

        Pulsed source target material

        Any of these values:

          * ``Ta``

          * ``W``

          * ``depleted_U``

          * ``enriched_U``

          * ``Hg``

          * ``Pb``

          * ``C``


      .. index:: number_of_bunches (field)

      **number_of_bunches**: (optional) :ref:`NX_INT <NX_INT>`

        For storage rings, the number of bunches in use.

      .. index:: bunch_length (field)

      **bunch_length**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_TIME <NX_TIME>`}

        For storage rings, temporal length of the bunch

      .. index:: bunch_distance (field)

      **bunch_distance**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_TIME <NX_TIME>`}

        For storage rings, time between bunches

      .. index:: pulse_width (field)

      **pulse_width**: (optional) :ref:`NX_FLOAT <NX_FLOAT>` {units=\ :ref:`NX_TIME <NX_TIME>`}

        temporal width of source pulse

      .. index:: mode (field)

      **mode**: (optional) :ref:`NX_CHAR <NX_CHAR>`

        source operating mode

        Any of these values:

          * ``Single Bunch``: for storage rings

          * ``Multi Bunch``: for storage rings


      .. index:: top_up (field)

      **top_up**: (optional) :ref:`NX_BOOLEAN <NX_BOOLEAN>`

        Is the synchrotron operating in top_up mode?

      .. index:: last_fill (field)

      **last_fill**: (optional) :ref:`NX_NUMBER <NX_NUMBER>` {units=\ :ref:`NX_CURRENT <NX_CURRENT>`}

        For storage rings, the current at the end of the most recent injection.

        .. index:: time (field attribute)

        **@time**: (required) :ref:`NX_DATE_TIME <NX_DATE_TIME>`

          date and time of the most recent injection.

      **notes**: (optional) :ref:`NXnote`

        any source/facility related messages/events that
        occurred during the experiment

      **bunch_pattern**: (optional) :ref:`NXdata`

        For storage rings, description of the bunch pattern.
        This is useful to describe irregular bunch patterns.

        .. index:: title (field)

        **title**: (required) :ref:`NX_CHAR <NX_CHAR>`

          name of the bunch pattern

      **pulse_shape**: (optional) :ref:`NXdata`

        source pulse shape

      **geometry**: (optional) :ref:`NXgeometry`

        "Engineering" location of source

      **distribution**: (optional) :ref:`NXdata`

        The wavelength or energy distribution of the source

**NXDL Source**:
  https://github.com/nexusformat/definitions/blob/master/applications/NXmx.nxdl.xml