tomoscan.esrf.scan.utils.get_compacted_dataslices

tomoscan.esrf.scan.utils.get_compacted_dataslices(urls: dict, max_grp_size=None, return_merged_indices=False, return_url_set=False, subsampling=1)

Regroup urls to get the data more efficiently. Build a structure mapping files indices to information on how to load the data: {indices_set: data_location} where data_location contains contiguous indices.

Parameters:
  • urls (dict) – Dictionary where the key is an integer and the value is a silx DataUrl.

  • max_grp_size (None or int) – maximum size of url grps

  • return_merged_indices (bool) – if True return the last merged indices. Deprecated

  • return_url_set (bool) – return a set with url containing urls slices and data path

Returns:

Dictionary where the key is a list of indices, and the value is the corresponding silx.io.url.DataUrl with merged data_slice

Return type:

dict