photon_mosaic.core.numpyimaging#

Imaging and ROI classes for in-memory numpy arrays.

Classes#

NumpyImaging

An Imaging specified by timeseries .npy file, sampling frequency, and channel names.

NumpyRois

A ROIs specified by image masks and traces .npy files.

Classes

NumpyImaging(imaging_series, sampling_frequency)

An single- or multi-epoch Imaging specified by a numpy array or list of arrays

NumpyImagingEpoch(video, sampling_frequency)

A single epoch of an Imaging specified by a numpy array

NumpyRois(roi_image_masks, sampling_frequency)

A ROIs object specified by numpy or sparse pydata arrays for masks and traces.

class photon_mosaic.core.numpyimaging.NumpyImaging(imaging_series, sampling_frequency, time_vectors=None, seed=None)[source]#

An single- or multi-epoch Imaging specified by a numpy array or list of arrays

class photon_mosaic.core.numpyimaging.NumpyImagingEpoch(video, sampling_frequency, time_vector=None)[source]#

A single epoch of an Imaging specified by a numpy array

Methods

get_num_samples()

Returns the number of samples in this signal epoch

get_series([start_frame, end_frame, ...])

Get the raw series, optionally for a subset of samples.

get_series(start_frame=None, end_frame=None, plane_indices=None)[source]#

Get the raw series, optionally for a subset of samples.

Parameters:
  • start_frame (int | None) – start frame index, or zero if None

  • end_frame (int | None) – end frame, or number of frames if None

  • plane_indices (slice | ndarray | None) – List of plane indices to include, or all planes if None

Returns:

series – The raw series for the specified frame range.

Return type:

ndarray

get_num_samples()[source]#

Returns the number of samples in this signal epoch

Returns:

Number of samples in the signal epoch

Return type:

int

class photon_mosaic.core.numpyimaging.NumpyRois(roi_image_masks, sampling_frequency, roi_ids=None)[source]#

A ROIs object specified by numpy or sparse pydata arrays for masks and traces.

Methods

get_roi_image_masks([roi_ids])

Get the image masks for specific ROIs.

get_roi_image_masks(roi_ids=None)[source]#

Get the image masks for specific ROIs.

Parameters:

roi_ids (list[int | str] | None) – The IDs of the ROIs.

Returns:

The image masks for the specified ROIs.

Return type:

ndarray | SparseArray