sidpy.hdf.reg_ref.clean_reg_ref

sidpy.hdf.reg_ref.clean_reg_ref(h5_dset, reg_ref_tuple, verbose=False)[source]

Makes sure that the provided instructions for a region reference are indeed valid. This method has become necessary since h5py allows the writing of region references larger than the maxshape

Parameters:
  • h5_dset (h5.Dataset instance) – Dataset to which region references will be added as attributes

  • reg_ref_tuple (list / tuple) – The slicing information formatted using tuples of slice objects.

  • verbose (Boolean (Optional. Default = False)) – Whether or not to print status messages

Returns:

new_reg_refs – Instructions for the corrected region reference

Return type:

tuple