fissa.datahandler module

FISSA functions to handle image and roi objects and return the right format.

If a custom version of this file is used (which can be defined at the declaration of the core FISSA Experiment class), it should have the same functions as here, with the same inputs and outputs.

Authors:
fissa.datahandler.extracttraces(data, masks)[source]

Extracts a temporal trace for each spatial mask.

Parameters:
  • data (array_like) – Data array as made by image2array. Should be shaped (frames, y, x).
  • masks (list of array_like) – List of binary arrays.
Returns:

Trace for each mask. Shaped (len(masks), n_frames).

Return type:

numpy.ndarray

fissa.datahandler.getmean(data)[source]

Determine the mean image across all frames.

Parameters:data (array_like) – Data array as made by image2array. Should be shaped (frames, y, x).
Returns:y by x array for the mean values
Return type:numpy.ndarray
fissa.datahandler.image2array(image)[source]

Loads a TIFF image from disk.

Parameters:image (str or array_like) – Either a path to a TIFF file, or array_like data.
Returns:A 3D array containing the data, with dimensions corresponding to (frames, y_coordinate, x_coordinate).
Return type:numpy.ndarray
fissa.datahandler.rois2masks(rois, data)[source]

Take the object rois and returns it as a list of binary masks.

Parameters:
  • rois (string or list of array_like) – Either a string with imagej roi zip location, list of arrays encoding polygons, or list of binary arrays representing masks
  • data (array) – Data array as made by image2array. Must be shaped (frames, y, x).
Returns:

List of binary arrays (i.e. masks)

Return type:

list