condition_shotnum

bapsflib._hdf.utils.helpers.condition_shotnum(shotnum: Any, dset_dict: Dict[str, Dataset], shotnumkey_dict: Dict[str, str]) ndarray

Conditions the shotnum argument for HDFReadControls and HDFReadData.

Parameters:
  • shotnum – desired HDF5 shot numbers

  • dset_dict – dictionary of all control dataset instances

  • shotnumkey_dict – dictionary of the shot number field name for each control dataset in dset_dict

Returns:

conditioned shotnum numpy array

Condition Criteria

  1. Input shotnum should be Union[int, List[int,...], slice, np.ndarray]

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

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