do_shotnum_intersection

bapsflib._hdf.utils.helpers.do_shotnum_intersection(shotnum: ndarray, sni_dict: Dict[str, Dict[str, ndarray]], index_dict: Dict[str, Dict[str, ndarray]]) Tuple[ndarray, Dict[str, Dict[str, ndarray]], Dict[str, Dict[str, ndarray]]]

Calculates intersection of shotnum and all existing dataset shot numbers, shotnum[sni].

Recall Array Relationship

shotnum[sni] = dset[index, shotnumkey]
Parameters:
  • shotnum (array_like) – Array like object of desired shot numbers.

  • sni_dict (IndexDict) – Dictionary of dictionaries of all dataset sni arrays. The first level of dict keys is the control device name and the second level of dict keys is the desired ‘state value` (e.g. 'xyz').

  • index_dict (IndexDict) – Dictionary of dictionaries of all dataset index arrays. The first level of dict keys is the control device name and the second level of dict keys is the desired ‘state value` (e.g. 'xyz').

Returns:

  • shotnum (numpy.ndarray) – intersected and re-calculated array of shot numbers

  • sni_dict (IndexDict) – intersected and re-calculated arrays of sni indexing values for each dataset

  • index_dict (IndexDict) – intersected and re-calculated arrays of index indexing values for each dataset