pwspy.dataTypes.ERMetaData¶
- class pwspy.dataTypes.ERMetaData(inheritedMetadata, numericalAperture, filePath=None)[source]¶
Bases:
object
A class representing the extra information related to an ExtraReflectanceCube file. This can be useful as a object to keep track of a ExtraReflectanceCube without having to have the data from the file loaded into memory.
- Parameters
inheritedMetadata (
dict
) – The metadata dictionary will often just be inherited information from one of the PwsCubes that was used to create this ER Cube. While this data can be useful it should be taken with a grain of salt. E.G. the metadata will contain an exposure field. In reality this ER Cube will have been created from pwsdtd.PwsCubes at a variety of exposures.numericalAperture (
float
) – The numerical aperture that the PwsCubes used to generate this Extra reflection cube were imaged at.filePath (
Optional
[str
]) – The path to the file that this object is stored in.
- classmethod dirName2Directory(directory, name)[source]¶
This is the inverse of directory2dirName
- Return type
str
- classmethod directory2dirName(path)[source]¶
- Parameters
path (
str
) – The path to the file that stores an ExtraReflectanceCube object.- Returns
directory: The directory path, name: The name that the file was saved as.
- Return type
A tuple containing
- classmethod fromHdfDataset(d, filePath=None)[source]¶
- Parameters
d (
Dataset
) – The h5py.Dataset to load the object from.- Return type
- Returns
A new instance of ERMetaData object
- classmethod fromHdfFile(directory, name)[source]¶
- Parameters
directory (
str
) – The directory the file is saved in.name (
str
) – The name the object was saved as.
- Return type
- Returns
A new instance of ERMetaData object
- toHdfDataset(g)[source]¶
- Parameters
g (
Group
) – The h5py.Group to save the new dataset into.- Return type
Group
- classmethod validPath(path)[source]¶
- Parameters
path (
str
) – The file path to the file to search for valid ExtraReflectance files.- Returns
validPath: True if the path is valid, directory: The directory the file is in, name: The name that the object was saved as.
- Return type
A tuple containing
- property idTag: str¶
A unique tag to identify this acquisition by.
- Return type
str
- property numericalAperture: float¶
The numerical aperture that this cube was imaged at.
- Return type
float
- property systemName: str¶
The name of the system that this image was acquired on.
- Return type
str