HDFMapMSIMagneticField¶
- class bapsflib._hdf.maps.msi.magneticfield.HDFMapMSIMagneticField(group: Group)¶
Bases:
HDFMapMSITemplate
Mapping class for the ‘Magnetic field’ MSI diagnostic.
Simple group structure looks like:
+-- Magnetic field | +-- Magnet power supply currents | +-- Magnetic field profile | +-- Magnetic field summary
- Parameters:
group (
h5py.Group
) – the HDF5 MSI diagnostic group
Attributes Summary
Dictionary containing all the relevant mapping information to translate the HDF5 data into a numpy array.
Name of MSI diagnostic (device)
Instance of MSI diagnostic group
MSI diagnostic dictionary of meta-info. For example, ::.
Attributes Documentation
- configs¶
Dictionary containing all the relevant mapping information to translate the HDF5 data into a numpy array. The actually numpy array construction is done by
HDFReadMSI
.– Constructing
configs
–The
configs
dict is broken into a set of required keys ('shape'
,'shotnum'
,'signals'
, and'meta'
) and optional keys. Any option key is considered as meta-info for the device and is added to theinfo
dictionary when the numpy array is constructed. The required keys constitute the mapping for constructing the numpy array.Key
Description
configs['shape']
This is used as the
shape
for theHDFReadMSI
constructed numpy array and typically looks like:configs['shape'] = (nsn, )
where
nsn
is the number of shot numbers saved to the diagnostic’s datasets.configs['shotnum']
Specifies the dataset(s) containing the recorded HDF5 shot numbers. This maps to the
'shotnum'
field of the numpy array constructed byHDFReadMSI
. Should look like:configs['shotnum'] = { 'dset paths': ('/foo/bar/d1',), 'dset field': ('Shot number',), 'shape': (), 'dtype': numpy.int32, }
where
'dset paths'
is the internal HDF5 path to the dataset(s),'dset field'
is the field name of the dataset containing shot numbers,'shape'
of the shot number data, and'dtype'
is the numpydtype
that the'shotnum'
field of the constructed numpy array will be.configs['signals']
This is another dictionary where each key will map to a field in the
HDFReadMSI
numpy array. For example,configs['signals'] = { 'current': { 'dset paths': ('/foo/bar/dset',), 'dset field': (), 'shape': (100,), 'dtype': numpy.float32}, }
would created a
'current'
field in the constructed numpy array. Any field specified in this key is considered to be your plot-able, or “primary”, diagnostic data.configs['meta']
This is another dictionary specifying meta-data that is both diagnostic and shot number specific. For example,
configs['meta'] = { 'shape': (), 'max current': { 'dset paths': ('/foo/bar/dset',), 'dset field': ('Max current',), 'shape': (), 'dtype': numpy.float32}, }
would create a
'max current'
field in the'meta'
field of the constructed numpy array.Note
For further details, look to Adding a MSI Diagnostic Mapping Module.
- device_name¶
Name of MSI diagnostic (device)
- group¶
Instance of MSI diagnostic group
- info¶
MSI diagnostic dictionary of meta-info. For example,
info = { 'group name': 'Diagnostic', 'group path': '/foo/bar/Diagnostic', }