delta.utils.XPReader#
- class delta.utils.XPReader(path, channelnames=None)[source]#
Class to read experiment files from single files or from file sequences in folders.
- __init__(path, channelnames=None)[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”
- channelnameslist/tuple of strings or None, optional
Names of the acquisition channels (‘trans’, ‘gfp’, …). The default is None.
- Returns
- None.
- Raises
- ValueError
If the filenames in the experimental directory do not follow the correct format, a ValueError will be raised.
Methods
__init__
(path[, channelnames])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
Indices of positions in experiment
channels
Number of imaging channels
x
Size of images along X axis
y
Size of images along Y axis
dtype
Datatype of images
channelnames
Names of the imaging channels (optional)