specparam.data.periodic.sort_peaks

specparam.data.periodic.sort_peaks(peak_params, sort_param, direction='inc')[source]

Sort peak parameters by specified parameter and direction.

Parameters:
peak_params2d array

Peak parameters, with shape of [n_peaks, 3].

sort_param{‘CF’, ‘PW’, ‘BW’}

Which parameter to sort the parameters by.

direction{‘inc’, ‘dec’}

Whether to sort as increasing (lowest -> highest) or decreasing (highest -> lowest).

Returns:
sorted_peaks2d array

Sorted peak parameters.