specparam.analysis.periodic.get_band_peak_group_arr¶
- specparam.analysis.periodic.get_band_peak_group_arr(peak_params, band, n_fits, threshold=None, thresh_param='PW')[source]¶
Extract peaks within a given band of interest, from peaks from a group fit.
- Parameters:
- peak_params2d array
Peak parameters, for a group fit, with shape of [n_peaks, 4].
- bandtuple of (float, float)
Frequency range for the band of interest. Defined as: (lower_frequency_bound, upper_frequency_bound).
- n_fitsint
The number of model fits in the group.
- thresholdfloat, optional
A minimum threshold value to apply.
- thresh_param{‘PW’, ‘BW’}
Which parameter to threshold on. ‘PW’ is power and ‘BW’ is bandwidth.
- Returns:
- band_peaks2d array
Peak data. Each row is a peak, as [CF, PW, BW]. Each row represents an individual model from the input array of all peaks.
Notes
The returned array keeps track of which model each extracted peak comes from, returning a [n_models, 3] array, with one peak returned per model.
To do so, this function necessarily extracts and returns one peak per model fit.
Each row reflects an individual model fit, in order, filled with nan if no peak was present.