pyUSID.io.hdf_utils.simple.write_reduced_anc_dsets

pyUSID.io.hdf_utils.simple.write_reduced_anc_dsets(h5_parent_group, h5_inds, h5_vals, dim_name, basename=None, is_spec=None, verbose=False)[source]

Creates new Ancillary Indices and Values datasets from the input datasets by dropping the specified dimensions

Parameters:
  • h5_parent_group (h5py.Group or h5py.File) – Group under which the indices and values datasets will be created

  • h5_inds (HDF5 Dataset) – Spectroscopic or Positions indices dataset

  • h5_vals (HDF5 Dataset) – Spectroscopic or Positions values dataset

  • dim_name (str or unicode or list of strings) – Names of the dimension(s) to remove

  • basename (str or unicode, Optional) – String to which ‘_Indices’ and ‘_Values’ will be appended to get the names of the new datasets. Default = ‘Position’ or ‘Spectroscopic’

  • 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 or possible. By default, this function will attempt to recognize the answer based on the shape of the datasets.

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

Returns:

  • h5_inds_new (h5py.Dataset) – Reduced indices dataset

  • h5_vals_new (h5py.Dataset) – Reduces values dataset