LaPDMap

class bapsflib.lapd._hdf.lapdmap.LaPDMap(hdf_obj: h5py._hl.files.File, control_path='Raw data + config', digitizer_path='Raw data + config', msi_path='MSI')

Bases: bapsflib._hdf.maps.core.HDFMap

A specialized version of HDFMap which adds attributes that are specific to mapping a HDF5 file generated by the LaPD.

Parameters
  • hdf_obj (h5py.File) – HDF5 file object

  • control_path (str) – internal HDF5 path to group containing control devices (DEFAULT 'Raw data + config')

  • digitizer_path (str) – internal HDF5 path to group containing digitizers (DEFAULT 'Raw data + config')

  • msi_path (str) – internal HDF5 path to group containing MSI diagnostics (DEFAULT 'MSI')

Attributes Summary

controls

Dictionary of all the control device mapping objects.

digitizers

Dictionary of all the digitizer device mapping objects.

exp_info

Dictionary of experiment info

is_lapd

True if HDF5 file was generated by the LaPD

lapd_version

LaPD HDF5 version string.

main_digitizer

return

the mapping object for the digitizer that is assumed

msi

Dictionary of all the MSI diagnostic mapping objects.

run_info

Dictionary of experimental run info.

unknowns

List of all subgroup and dataset paths in the HDF5 root group, control device group, digitizer group, and MSI group that were not mapped.

Methods Summary

get(name)

Get an device mapping instance.

Attributes Documentation

controls

Dictionary of all the control device mapping objects.

Example

How to retrieve the mapping object of the control device '6K Compumotor':

fmap = HDFMap(file_obj)
dmap = fmap.controls['6K Compumotor']
digitizers

Dictionary of all the digitizer device mapping objects.

Example

How to retrieve the mapping object of the digitizer 'SIS 3301':

fmap = HDFMap(file_obj)
dmap = fmap.digitizers['SIS 3301']
exp_info

Dictionary of experiment info

is_lapd

True if HDF5 file was generated by the LaPD

lapd_version

LaPD HDF5 version string.

main_digitizer
Returns

the mapping object for the digitizer that is assumed to be the main digitizer in digitizers

The main digitizer is determine by scanning through the local tuple possible_candidates that contains a hierarchical list of digitizers. The first digitizer found is assumed to be the main digitizer.

possible_candidates = ('SIS 3301', 'SIS crate')
msi

Dictionary of all the MSI diagnostic mapping objects.

Example

How to retrieve the mapping object of the 'Magnetic field' MSI diagnostic:

fmap = HDFMap(file_obj)
dmap = fmap.msi['Magnetic field']
run_info

Dictionary of experimental run info.

unknowns

List of all subgroup and dataset paths in the HDF5 root group, control device group, digitizer group, and MSI group that were not mapped.

Methods Documentation

get(name: str)

Get an device mapping instance.

Parameters

name – name of desired device

Returns

If the specified device is mapped, then an instance of the mapping is returned. Otherwise, None is returned.

Example

How to retrieve the mapping object for the 'SIS 3301' digitizer:

>>> fmap = HDFMap(file_obj)
>>> dmap = fmap.get('SIS 3301')
>>>
>>> # which is equivalent to
>>> dmap = fmap.digitizers['SIS 3301']