delta.utilities.xpreader.getframes

xpreader.getframes(positions=None, channels=None, frames=None, squeeze_dimensions: bool = True, resize: Optional[Tuple[int, int]] = None, rescale: Optional[Tuple[float, float]] = None, globalrescale: Optional[Tuple[float, float]] = None, rotate: Optional[float] = None) ndarray

Get frames from experiment.

Parameters
positionsNone, int, tuple/list of ints, optional

The frames from the position index or indexes passed as an integer or a tuple/list will be returned. If None is passed, all positions are returned. The default is None.

channelsNone, int, tuple/list of ints, str, tuple/list of str, optional

The frames from the channel index or indexes passed as an integer or a tuple/list will be returned. If the channel names have been defined, the channel(s) can be passed as a string or tuple/list of strings. If an empty list is passed, None is returned. If None is passed, all channels are returned. The default is None.

framesNone, int, tuple/list of ints, optional

The frame index or indexes passed as an integer or a tuple/list will be returned. If None is passed, all frames are returned. If -1 is passed and the file watcher is activated, only new frames are read. Works only for one position and channel at a time. The default is None.

squeeze_dimensionsbool, optional

If True, the numpy squeeze function is applied to the output array, removing all singleton dimensions. The default is True.

resizeNone or tuple/list of 2 ints, optional

Dimensions to resize the frames. If None, no resizing is performed. The default is None.

rescaleNone or tuple/list of 2 int/floats, optional

Rescale all values in each frame to be within the given range. The default is None.

globalrescaleNone or tuple/list of 2 int/floats, optional

Rescale all values in all frames to be within the given range. The default is None.

rotateNone or float, optional

Rotation to apply to the image (in degrees). The default is None.

Returns
Numpy Array

Concatenated frames as requested by the different input options. If squeeze_dimensions=False, the array is 5-dimensional, with the dimensions order being: Position, Time, Channel, Y, X

Raises
ValueError

If channel names are not correct.