Swap lightkurve periodogram for astropy method in Ephemeris #169
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.
If you load data into LCviz with sampling varying from minutes apart to decades apart, the lightkurve.periodogram functionality chokes. It chokes because there are some assumptions that lightkurve makes that cause issues here. The main assumption is about time sampling. The time difference between the nearest measurements in this series is of order minutes, but the full span is decades. Sampling evenly at the nyquist frequency gives a tremendous array
and by default, lightkurve uses an O(N^2) implementation of the L-S periodogram. One very simple solution is to not make the same assumptions as lightkurve does.
Ephemeris calls this on the data:
lcviz/lcviz/plugins/ephemeris/ephemeris.py
Line 571 in 9d39dfd
which is where the problems start.
We can fix that up like this:
just using the astropy L-S implementation directly without going through lightkurve overcomes the frequency array problem.