application definition, extends NXobject


Application definition for a ptychography experiment, compatible with CXI from version 1.6.

This is compatible with CXI from version 1.6 if this application definition is put at the top “entry” level. Above this a “cxi_version” field should be defined. The CXI format is name based, rather than class based, and so it is important to pay attention to the naming convention to be CXI compatible. There are duplications due to the format merger. These should be achieved by linking, with hdf5 Virtual Dataset being used to restructure any data that needs to be remapped. To be fully CXI compatible, all units (including energy) must be in SI units.

An example here is that CXI expects the data to always to have shape (npts_x*npts_y, frame_size_x, frame_size_y). For nexus this is only true for arbitrary scan paths with raster format scans taking shape (npts_x, npts_y, frame_size_x, frame_size_y).


These symbols will be used below to coordinate the shapes of the datasets.

npts_x: The number of points in the x direction

npts_y: Number of points in the y direction.

frame_size_x: Number of detector pixels in x

frame_size_y: Number of detector pixels in y

Groups cited:

NXbeam, NXcollection, NXdata, NXdetector, NXentry, NXinstrument, NXmonitor, NXsample, NXsource, NXtransformations


entry_1: (required) NXentry

title: (optional) NX_CHAR

start_time: (optional) NX_DATE_TIME

end_time: (optional) NX_DATE_TIME

definition: (required) NX_CHAR

Official NeXus NXDL schema to which this file conforms

Obligatory value: NXcxi_ptycho

instrument_1: (required) NXinstrument

source_1: (required) NXsource

name: (required) NX_CHAR

energy: (required) NX_FLOAT

This is the energy of the machine, not the beamline.

probe: (required) NX_FLOAT

type: (required) NX_FLOAT

beam_1: (required) NXbeam

energy: (required) NX_FLOAT

@units: (required) NX_CHAR

extent: (optional) NX_FLOAT

@units: (required) NX_CHAR

incident_beam_divergence: (optional) NX_FLOAT

@units: (required) NX_CHAR

incident_beam_energy: (required) NX_FLOAT

@units: (required) NX_CHAR

incident_energy_spread: (required) NX_FLOAT

@units: (required) NX_CHAR

detector_1: (required) NXdetector

@axes: (required) NX_CHAR

should have value “[, data]”

@signal: (required) NX_CHAR

should have value “data”

translation: (required) NX_FLOAT {units=NX_LENGTH}

This is an array of shape (npts_x*npts_y, 3) and can be a Virtual Dataset of x and y

@units: (required) NX_CHAR

@axes: (required) NX_CHAR

this should take the value “translation:$slowaxisname:$fastaxisname”

@interpretation: (required) NX_CHAR

This should be “image”

data: (required) NX_INT (Rank: 3 for arbitrary scan, 4 for raster, Dimensions: [npts_x, npts_y, frame_size_x, frame_size_y])

x_pixel_size: (required) NX_FLOAT {units=NX_LENGTH}

@units: (required) NX_CHAR

y_pixel_size: (required) NX_FLOAT {units=NX_LENGTH}

@units: (required) NX_CHAR

distance: (required) NX_FLOAT {units=NX_LENGTH}

The distance between the detector and the sample

@units: (required) NX_CHAR

beam_center_x: (optional) NX_FLOAT {units=NX_LENGTH}

@units: (required) NX_CHAR

beam_center_y: (optional) NX_FLOAT {units=NX_LENGTH}

@units: (required) NX_CHAR

transformations: (required) NXtransformations

vector: (required) NX_NUMBER

data_1: link (suggested target: /NXentry/NXinstrument/NXdetector/data)

This data must always have shape (npts_x*npts_y, frame_size_x, frame_size_y) regardless of the scan pattern. Use hdf5 virtual dataset to achieve this.

MONITOR: (optional) NXmonitor

data: (required) NX_FLOAT (Rank: 1 for arbitrary scan, 2 for raster, Dimensions: [npts_x, npts_y])

DATA: (required) NXdata

@axes: (required) NX_CHAR

This should be “[x,.]” for arbitrary scanning patterns, and “[x,.,.]” for raster

@signal: (required) NX_CHAR

This should be “data”

x_indices: (required) NX_CHAR

y_indices: (required) NX_CHAR

data_1: (required) NXcollection

To ensure CXI compatibility the data in this group must always have shape that is (npts_x*npts_y, frame_size_x, frame_size_y). For nexus-style raster scans it is proposed that hdf5 virtual dataset is used.

sample_1: (required) NXsample

name: (optional) NX_CHAR

transformations: (required) NXtransformations

This must contain two fields with the x and y motors that are linked via the dependency tree according to the real-life motor layout dependency. For raster scans x and y will have shape (npts_x, npts_y) For arbitrary scans x and y will be (npts_x*npts_y,) An attribute with the units for each motor is required.

@vector: (required) NX_NUMBER

geometry_1: (required) NXcollection

Hypertext Anchors

List of hypertext anchors for all groups, fields, attributes, and links defined in this class.

NXDL Source: