module# ndarray, transmission: ndarray, transmission_error: ndarray) str[source]#

create a RITS format ready for exporting to a .dat file

  • tof – time of flight

  • transmission – transmission value

  • transmission_error – transmission_error value


RITS format ascii str, path: Path) None[source]#

export a RITS formatted data to a .dat file

  • rits_formatted_data – RITS formatted data

  • path – path to save the .dat file


None str, indices: list[int] | Indices | None, num_images: int, custom_idx: int | None = None, zfill_len: int = 6, name_postfix: str = '', out_format: str = 'tif') list[str][source]# ImageStack, output_dir: str, name_prefix: str = 'image', swap_axes: bool = False, out_format: str = 'tif', overwrite_all: bool = False, custom_idx: int | None = None, zfill_len: int = 6, name_postfix: str = '', indices: list[int] | Indices | None = None, pixel_depth: str | None = None, progress: Progress | None = None) list[str][source]#

Save image volume (3d) into a series of slices along the Z axis. The Z axis in the script is the ndarray.shape[0].

  • images – Data as images/slices stores in numpy array

  • output_dir – Output directory for the files

  • name_prefix – Prefix for the names of the images, appended before the image number

  • swap_axes – Swap the 0 and 1 axis of the images (convert from radiograms to sinograms on saving)

  • out_format – File format of the saved out images

  • overwrite_all – Overwrite existing images with conflicting names

  • custom_idx – Single index to be used for the file name, instead of incremental numbers

  • zfill_len – This option is ignored if custom_idx is specified! Prepend zeros to the output file names to have a constant file name length. Example: - saving out an image with zfill_len = 6: saved_image000001,…saved_image000201 and so on - saving out an image with zfill_len = 3: saved_image001,…saved_image201 and so on

  • name_postfix – Postfix for the name after the index

  • indices – Only works if custom_idx is not specified. Specify the start and end range of the indices which will be used for the file names.

  • progress – Passed to ensure progress during saving is tracked properly

  • pixel_depth – Defines the target pixel depth of the save operation so np.float32 or np.int16 will ensure the values are scaled correctly to these values.


The filename/filenames of the saved data. str | None = None, overwrite_all: bool = False) None[source]#

Makes sure that the directory needed (for example to save a file) exists, otherwise creates it.


: (dirname) – (output) directory to check StrictDataset, path: str, sample_name: str, save_as_float: bool)[source]#

Uses information from a StrictDataset to create a NeXus file. :param dataset: The dataset to save as a NeXus file. :param path: The NeXus file path. :param sample_name: The sample name. ndarray, filename: str, overwrite: bool = False, description: str | None = '')[source]# ndarray, filename: str, overwrite: bool = False, description: str | None = '')[source]# ndarray, filename: str, projection_angles: ndarray | None = None, overwrite: bool = False)[source]#