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
shotnumand 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 datasetsniarrays. The first level ofdictkeys is the control device name and the second level ofdictkeys is the desired ‘state value` (e.g.'xyz').index_dict (
IndexDict) – Dictionary of dictionaries of all datasetindexarrays. The first level ofdictkeys is the control device name and the second level ofdictkeys is the desired ‘state value` (e.g.'xyz').
- Returns:
shotnum (
numpy.ndarray) – intersected and re-calculated array of shot numberssni_dict (
IndexDict) – intersected and re-calculated arrays ofsniindexing values for each datasetindex_dict (
IndexDict) – intersected and re-calculated arrays ofindexindexing values for each dataset