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
andHDFReadData
.- 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
Input shotnum should be
Union[int, List[int,...], slice, np.ndarray]
Any \(\mathbf{shotnum} \le 0\) will be removed.
A
ValueError
will be thrown if the conditioned array is NULL.