pyUSID.io.hdf_utils.model.get_unit_values

pyUSID.io.hdf_utils.model.get_unit_values(ds_inds, ds_vals, dim_names=None, all_dim_names=None, is_spec=None, verbose=False)[source]

Gets the unit arrays of values that describe the spectroscopic dimensions

Parameters:
  • ds_inds (h5py.Dataset or numpy.ndarray) – Spectroscopic or Position Indices dataset

  • ds_vals (h5py.Dataset or numpy.ndarray) – Spectroscopic or Position Values dataset

  • dim_names (str, or list of str, Optional) – Names of the dimensions of interest. Default = all

  • all_dim_names (list of str, Optional) – Names of all the dimensions in these datasets. Use this if supplying numpy arrays instead of h5py.Dataset objects for h5_inds, h5_vals since there is no other way of getting the dimension names.

  • is_spec (bool, optional) – Whether or not the provided ancillary datasets are position or spectroscopic The user is recommended to supply this parameter whenever it is known By default, this function will attempt to recognize the answer based on the shape of the datasets.

  • verbose (bool, optional) – Whether or not to print debugging statements. Default - off

  • well (Note - this function can be extended / modified for ancillary position dimensions as) –

Returns:

unit_values – Dictionary containing the unit array for each dimension. The name of the dimensions are the keys.

Return type:

dict