darsia.ProtocolledExperiment#

class ProtocolledExperiment(data, imaging_protocol, injection_protocol=None, pressure_temperature_protocol=None, blacklist_protocol=None)[source]#

Bases: object

An experiment described by its imaging, injection and PT protocol files.

Methods

find_images_for_paths(paths)

Find image paths for given paths.

find_images_for_time_windows(windows[, data])

Find image paths for given time windows since start of the experiment.

find_images_for_times(times[, tol, data])

Find image paths for given times since start of the experiment.

get_datetime(path)

Get datetime for a path using the matching imaging protocol.

init_from_config(config)

is_blacklisted(path)

Check blacklist state for a path using the matching imaging protocol.

iter_available(paths)

time_since_start(date)

Hours since start of the experiment.

Attributes

data

Pool of data paths.

injection_protocol

Injection protocol.

pressure_temperature_protocol

Pressure and temperature protocol.

experiment_start

Start of the experiment.

find_images_for_paths(paths)[source]#

Find image paths for given paths.

Parameters:
pathslist[Path]

Paths to search for.

Returns:
list[Path]

Image paths found for the given paths.

find_images_for_time_windows(windows, data=None)[source]#

Find image paths for given time windows since start of the experiment.

Parameters:
windowslist[TimeWindow]

Time windows to search for.

datalist[Path], optional

Pool of data paths to search in. If None, uses the experiment’s data pool.

find_images_for_times(times, tol=None, data=None)[source]#

Find image paths for given times since start of the experiment.

Parameters:
timeslist[float]

Times since start in hours.

tolfloat | None, optional

Maximum allowed absolute time distance in seconds between requested and matched image times. Inclusive when provided.

datalist[Path], optional

Pool of data paths to search in. If None, uses the experiment’s data pool.

get_datetime(path)[source]#

Get datetime for a path using the matching imaging protocol.

is_blacklisted(path)[source]#

Check blacklist state for a path using the matching imaging protocol.

time_since_start(date)[source]#

Hours since start of the experiment.

Parameters:
datedatetime

Date to compute the time since start for.

Returns:
float

Time since start in hours.

data#

Pool of data paths.

experiment_start#

Start of the experiment.

injection_protocol#

Injection protocol.

pressure_temperature_protocol#

Pressure and temperature protocol.