scippneutron.io.sqw.SqwBuilder#
- class scippneutron.io.sqw.SqwBuilder(path, title, *, byteorder)[source]#
-
Methods
__init__(path, title, *, byteorder)add_default_instrument(instrument)add_default_sample(sample)add_dnd_data(metadata, *, data, counts)Add a DND data block (image) to the file.
add_empty_detector_params()add_empty_dnd_data(metadata)add_pixel_data(data, *, experiments[, ...])create(*[, chunk_size])- add_dnd_data(metadata, *, data, counts)[source]#
Add a DND data block (image) to the file.
Attention
dataandcountsmust be given in row-major layout. They are converted to column-major (FORTRAN) layout internally. This means that the data must have shape['u1', 'u2', 'u3', 'u4'].- Parameters:
metadata (
SqwDndMetadata) – Metadata describing the DND data.data (
Variable) – The values and variances of the image.counts (
Variable) – The number of observations (‘pixels’) per bin.
- Returns:
SqwBuilder– Self.