darsia.ImagingProtocol#
- class ImagingProtocol(path, blacklist=None)[source]#
Bases:
objectImaging protocol mapping image file names to acquisition times.
Methods
find_ideal_images_for_datetimes(datetimes)Find images in the folder that are closest to the specified times.
find_images_for_datetimes(paths, datetimes)Find images in the folder that are closest to the specified times.
find_images_for_paths(paths)Find image paths for given paths.
get_datetime(file_name)Get the datetime of the image based on its path.
is_blacklisted(file_name)Check if the image is blacklisted based on its path.
Attributes
DataFrame containing the protocol.
- find_ideal_images_for_datetimes(datetimes)[source]#
Find images in the folder that are closest to the specified times.
- find_images_for_datetimes(paths, datetimes, tol=None)[source]#
Find images in the folder that are closest to the specified times.
- get_datetime(file_name)[source]#
Get the datetime of the image based on its path.
- Parameters:
- file_name
Path Path to the image file. The file name should end with a number. If contained in a considered imaging interval, the id can be correlated to a datetime.
- file_name
- Returns:
Optional[datetime]The datetime of the image. None, if the file name is not contained in any of the imaging intervals.
- is_blacklisted(file_name)[source]#
Check if the image is blacklisted based on its path.
- Parameters:
- file_name
Path Path to the image file. The file name should end with a number. If contained in a considered imaging interval, the id can be correlated to a datetime.
- file_name
- Returns:
- bool
True if the image is blacklisted, False otherwise.
- df#
DataFrame containing the protocol.