delta.utils.XPReader

class delta.utils.XPReader(path)[source]

Class to read experiment files from single files or from file sequences in folders.

__init__(path)[source]

Initialize experiment reader.

Parameters:
pathPath or str

Path to experiment file or template to experiment files. If a template, it should contain the patterns {p}, {t}, or {c} to represent respectively position numbers, frame numbers, or channel numbers. The patterns can be repeated if the information is repeated in the file names. Valid examples: - “Pos{p}_Cha{c}_Fra{t}.tif” - “p{p}c{c}t{t}.tif” - “xy {p} - fluo {c} - timepoint {t} .TIFF” - “experiment_2023-05-11.nd2” - “multitiff_2023-05-11.tiff”

Raises:
ValueError

If the filenames in the experimental directory do not follow the correct format, a ValueError will be raised.

Methods

__init__(path)

Initialize experiment reader.

image_path(position, channel, frame)

Generate full filename for specific frame based on position, channel and frame.

images(position[, channels, frames, rotate])

Get images from experiment.

Attributes

path

File or folder name for the experiment

filetype

Type / extension of filehandle

filehandle

Handle to file reader or base directory

positions

Positions in the experiment

channels

Imaging channels

channel_names

Names of the imaging channels (optional)

frames

Frame numbers in the experiment

x

Size of images along X axis

y

Size of images along Y axis

dtype

Datatype of images