Description
With the move to specparam / 2.0 it's a good time to consider, and potentially update, the default settings we use in the module.
Since 1.0 (at least, though perhaps much before that), we have defaulted to the following public settings:
- peak_width_limits=(0.5, 12.0)
- max_n_peaks=np.inf
- min_peak_height=0.0
- peak_threshold=2.0
- aperiodic_mode='fixed'
Is there anything here we could / should tweak at all?
For example, there is some discussion of potentially defaulting to a non-infinite value for max_n_peaks
(#299 (comment)), related to how fitting way too many peaks (often in an undesirably way) can really slow things down. Right now, we default to no bounds, and we could update to some number - though what that number should be is pretty tricky. I generally recommend setting this value to twice the number of real peaks you might expect (since, with Gaussians, we can get two gaussians per peak in the asymmetric case), which would tend to lead to a max of around 8 - but this is quite dependent on the frequency range / context, etc - so it's not clear if we can pick a good number. One possibility is to pick a probably too big number (say, 12), to at least default to pushing away from the cases where we can accidentally fit dozens of peaks (I think I would probably vote for this).
The other unbound parameter that is something important to bound is the absolute threshold (min_peak_height), but without knowing the scale of the data, I don't see a way to default this.
I don't see any reason / alternative for changing peak_width_limits
or peak_threshold
- but very open to hearing any thoughts on that. Note that the mode setting will be updated by the new approach in 2.0, so we don't have to discuss that here.
Notably, an additional point here is whether we want to increase the emphasis on choosing settings (say, in the docs).