Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #536
Summary of changes:
the
freq_method
kwarg has been replaced byfreq
, which can be str or array. If a string, will use make_freq_vector with the specified frequency-generating method. If an array, this will be passed directly to the spectral method.the default frequency method for
Series.spectral()
is no longer 'log' ; it is nowNone
, and the code assignsfreq
depending on method. (e.g.method=wwz
triggersfreq=log
, butmethod = lomb_scargle
triggersfreq = lomb_scargle
). Of course, that can be overridden easily, and users can still forcefreq = log
with any method if they so choose. Evenly-spaced methods (e.g. MTM) are not affected.make_freq_vector()
now has a new argument,rayleigh_bound
, which forces the lowest frequency to be the Rayleigh frequency (f_R) if set to True, which is the default. I am not passing this at the API level, because in my mind, if people are going to screw around with a custom frequency vector, they can generate it themselves (using make_freq_vector for instance) and pass it to the method asfreq
. We’ve historically done this through settings. I don’t mind making this an extra argument but I don’t really see the point.freq_vector_lomb_scargle()used to have default ofac=4, hifac=1.0. I’ve now reduced the default hifac to 0.95 to avoid the weirdness at the Nyquist frequency. Open to other suggestions.
freq_vector_log used to assign a default fmin that was 2*f_R. I’m not sure where that came from (naturally it was not explained anywhere), and it created discrepancies with the other methods. I’ve now aligned that so fmin = f_R if None is provided to the method.
docstrings have been updated, but I have not rebuilt the docs, so I expect some minor bugs. Similarly, the spectral PyleoTutorial will need a major overhaul, which I'm happy to do once this is approved.