condition_shotnum

bapsflib._hdf.utils.helpers.condition_shotnum(shotnum: Any, dset_list: List[Dataset], shotnumkey_list: List[str]) ndarray

Conditions the shotnum argument for HDFReadControls and :HDFReadData.

Parameters:
  • shotnum (array_like or Union[int, slice, List[int,…]]) – Array like object of desired shot numbers.

  • dset_list (List[h5py.Dataset]) – List of control dataset instances that the shot number shotnum should be conditioned against

  • shotnumkey_list (List[str]) – A one-to-one list with dset_list that names the shot number column filed in the associated dataset.

Returns:

conditioned shotnum numpy array

Return type:

numpy.ndarray

Condition Criteria

  1. Any \(\mathbf{shotnum} \le 0\) will be removed.

  2. A ValueError will be thrown if the conditioned array is NULL.