scitiff.save_scitiff#

scitiff.save_scitiff(dg, file_path)[source]#

Save an image in scipp data structure to a SCITIFF format including metadata.

The image is transposed to the default HyperStack order before saving the image, which is x, y, c, z, t. (From the innermost dimension to the outermost dimension)

Note

Before the image is saved, it is broadcasted to match the HyperStack even if part of dimensions are not present. For example, if the image has only x and y dimensions, the image will be broadcasted to x, y, c, z, t dimensions with size of 1 for each dimension that is not present.

Warning

load_scitiff() function will squeeze the dimensions with size 1 by default. Other image tools also may squeeze the image and drop the dimensions with size 1 by default.

Note

Dimensions of the image stack#

Name

Description

x

x-axis (width)

y

y-axis (height)

c

channel-axis

z

z-axis

t

time-axis(time-of-flight or other time-like dimension)

Warning

For neutron imaging, c dimension may not represent color channels.

Parameters:
  • dg (DataGroup | DataArray) – The image data to save.

  • file_path (str | Path) – The path to save the image data.

Raises:

ValueError – If the image data has unexpected dimensions. The function does not understand any other names for the dimensions except x, y, c, z, t.

Return type:

None