Code reference

class bmlab.file.BrillouinFile(path)[source]

Load a HDF file with Brillouin microscopy data.

Parameters

path (Path) – path of the file to load

Raises

OSError – when trying to open non-existing or bad file

get_repetition(repetition_key, mode='Brillouin')[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

  • mode (str) – the mode to look at

Returns

out – the repetition

Return type

Repetition

repetition_count(mode='Brillouin')[source]

Get the number of repetitions in the data file.

Returns

out – Number of repetitions in the data file

Return type

int

repetition_keys(mode='Brillouin')[source]

Returns list of keys for the various repetitions in the file.

Returns

out

Return type

list of str

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(payload_group, repetition)[source]

Creates a calibration representation from the corresponding group of a HDF file.

Parameters

payload_group (HDF group) – Calibration data of a repetition from an HDF file.

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).

exception bmlab.file.BadFileException[source]