fooof.utils.subsample_spectra¶
- fooof.utils.subsample_spectra(spectra, selection, return_inds=False)[source]¶
Subsample a group of power spectra.
- Parameters
- spectra2d array
A group of power spectra to subsample from.
- selectionint or float
The number of spectra to subsample. If int, is the number to select, if float, is a proportion based on input size.
- return_indsbool, optional, default: False
Whether to return the list of indices that were selected.
- Returns
- subsample2d array
A subsampled selection of power spectra.
- indslist of int
A list of which indices where subsampled. Only returned if return_inds is True.
Examples
Using a group of simulated spectra, subsample a specific number:
Using a group of simulated spectra, subsample a proportion: