Code reference¶
- class bmlab.file.BrillouinFile(path)[source]¶
Load a HDF file with Brillouin microscopy data.
- Parameters
path (str) – path of the file to load
- Raises
OSError – when trying to open non-existing or bad file
- get_repetition(repetition_key)[source]¶
Get a repetition from the data file based on given key.
- Parameters
repetition_key (str) – key to identify the repetition in the Brillouin group
- Returns
out – the repetition
- Return type
- repetition_count()[source]¶
Get the number of repetitions in the data file.
- Returns
out – Number of repetitions in the data file
- Return type
- repetition_keys()[source]¶
Returns list of keys for the various repetitions in the file.
- Returns
out
- Return type
list of str
- Brillouin_group¶
Old Brillouin file format
- class bmlab.file.Repetition(repetition_group, file)[source]¶
Creates a repetition from the corresponding group of a HDF file.
- Parameters
repetition_group (HDF group) – The HDF group representing a Repetition. Consists of payload, calibration and background.
- class bmlab.file.Payload(payload_group, repetition)[source]¶
Creates a payload representation from the corresponding group of a HDF file.
- Parameters
payload_group (HDF group) – The payload of a repetition, basically a set of images
- class bmlab.file.Calibration(calibration_group, repetition)[source]¶
Creates a calibration representation from the corresponding group of a HDF file.
- Parameters
calibration_group (HDF group) – Calibration data of a repetition from an HDF file.
- get_image(image_key)[source]¶
Returns the image from the calibration for given key.
- Parameters
image_key (str) – Key for the image.
- Returns
out – Array representing the image.
- Return type
- data¶
For H5BM files < 0.0.4 there was an inconsistency with the group naming
Module for interacting with files containing Brillouin microscopy data.
NOTE: Ideally, the users of bmlab should not have to know about the file format in which the data are stored. So, if possible, do not expose HDF objects to the outside (like BMicro).