cbi_toolbox.utils

Submodules

Module contents

The utils package provides various utility functions to work with files and arrays.

cbi_toolbox.utils.fft_size(n)[source]

Returns the smallest power of 2 above n, but no less than 64 for efficient FFT computations.

Parameters

n (int) – Size of the signal.

cbi_toolbox.utils.load_ome_tiff(file_path)[source]

Load an OME tiff file as a numpy array [ZXY].

Parameters

file_path (string) – The file to load.

Returns

The loaded array.

Return type

array [ZXY]

cbi_toolbox.utils.save_ome_tiff(file_path, image, xmlstring=None)[source]

Save numpy array to OME tiff format.

Parameters
  • file_path (string) – Where to save the data.

  • image (array[ZXY]) – The array to save.

  • xmlstring (str, optional) – Xml metadata, by default None.