delta.pipeline.Position

class delta.pipeline.Position(position_nb: int, reader: xpreader, models: Dict, drift_correction: bool = True, crop_windows: bool = False)

Position processing object

__init__(position_nb: int, reader: xpreader, models: Dict, drift_correction: bool = True, crop_windows: bool = False)

Initialize Position

Parameters
position_nbint

Position index.

readerobject

utilities xpreader object.

modelsdict

U-Net models as loaded by utilities loadmodels().

drift_correctionbool, optional

Flag to perform drift correction. The default is True.

crop_windowsbool, optional

Flag to crop out windows. The default is False.

Returns
None.

Attributes

position_nb

Position index number in the experiment

reader

Experiment reader object

models

List of Tensorflow models

rois

List of ROI objects under position

drift_values

XY drift correction values over time

drift_correction

Flag to perform drift correction

crop_windows

Flag to crop overlapping windows for segmentation

verbose

Console output verbosity

Methods

__init__(position_nb, reader, models[, ...])

Initialize Position

clear()

Clear Position-specific variables from memory (can be loaded back with load())

detect_rois(reference)

Use U-Net to detect ROIs (chambers etc...)

features(frames[, features])

Extract features for all ROIs in frames

legacysave(res_file)

Save pipeline data in the legacy Matlab format

load(filename)

Load position from pickle file

preprocess([reference, rotation_correction])

Pre-process position (Rotation correction, identify ROIs, initialize drift correction)

results_movie([frames])

Generate movie illustrating segmentation and tracking

save([filename, frames, save_format])

Save to disk

segment(frames)

Segment cells in all ROIs in position

track(frames)

Track cells in all ROIs in frames