pwspy.dataTypes.FluorMetaData

class pwspy.dataTypes.FluorMetaData(md, filePath=None, acquisitionDirectory=None)[source]

Bases: pwspy.dataTypes._metadata.MetaDataBase

Metadata for a fluorescence image.

Parameters

md (dict) – A dictionary containing the metadata

static decodeHdfMetadata(d)

Attempt to extract a dictionary of metadata from an HDF5 dataset.

Parameters

d (Dataset) – The h5py.Dataset to load from.

Return type

dict

Returns

A dictionary containing the metadata

encodeHdfMetadata(d)

Save this metadata object as a json string in an HDF5 dataset.

Parameters

d (Dataset) – The h5py.Dataset to save the metadata to.

Return type

Dataset

classmethod fromTiff(directory, acquisitionDirectory)[source]

Load from a TIFF file.

Parameters

directory (str) – The path to the folder to load from.

Return type

FluorMetaData

Returns

A new instance of FluorMetaData loaded from file.

getThumbnail()[source]
Return type

ndarray

Returns

An image for quick viewing of the acquisition. No numerical significance.

classmethod isValidPath(directory)[source]
Parameters

directory (str) – The path to search for valid files.

Returns

True if a valid file was found.

toDataClass(lock=None)[source]

Convert the metadata class to a class that loads the data

Parameters

lock (Optional[Lock]) – A Lock object used to synchronize IO in multithreaded and multiprocessing applications.

Return type

FluorescenceImage

property binning: int

The binning setting used by the camera. This is needed in order to properly correct dark counts. This is generally extracted from metadata saved by Micromanager

Return type

int

property exposure: float

The exposure time of the camera expressed in milliseconds.

Return type

float

property idTag

A string that uniquely identifies this data.

property pixelSizeUm: float

The pixelSize expressed in microns. This represents the length of each square pixel in object space. Binning has already been accounted for here. This is generally extracted from metadata saved my MicroManager

Return type

float

property systemName: str

The name of the system this was acquired on. The name is set in the PWS Acquisition Plugin for Micromanager.

Return type

str

property time: str

The date and time that the acquisition was taken.

Return type

str