convnwb.utils.extract.get_trial_value¶
- convnwb.utils.extract.get_trial_value(trials, data, trial, dtype=None)[source]¶
Extract a value for a specified trial.
- Parameters:
- trials1d array
The set of trial number for which the data is defined.
- data1d array
Data corresponding to each trial number in trials.
- trialint
The trial number to extract.
- dtypetype, optional
If provided, provides a type to cast output value to.
- Returns:
- out
The extracted data value for the given trial number. If trial is not availabe, returns np.nan.