-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Lomb-Scargle Periodograms for Multiband Data #34
Comments
I'm glad you've found the package useful! For multi-band periodograms, I think it would be great to support, although I haven't looked into it before now. Skimming the Astropy docs & source code, it seems like there's a "fast" implementation and a "flexible" one. The fast one seems like it might "just" be a wrapper around single-band Lomb-Scargle (https://github.com/astropy/astropy/blob/main/astropy/timeseries/periodograms/lombscargle_multiband/implementations/mbfast_impl.py). In other words, you might be able to use the Astropy interface with The code for the flexible method is more complicated! https://github.com/astropy/astropy/blob/main/astropy/timeseries/periodograms/lombscargle_multiband/implementations/mbflex_impl.py . I can't tell immediately if a NUFFT would help there. Do you know if you need the fast or flexible method? If fast is acceptable, it would be good to know if the Finally, I'll note that an enhancement that would probably help for millions of periodograms is the ability to thread over multiple periodograms. Right now, we only support threading over periodograms with the same observation times, but we should be able to support different observation times, too. Multiprocessing can do this, but probably not as well as threads. |
Thanks for the detailed answer!
Indeed, good catch. It works out of the box with the default configuration, with a ~5x speed-up compare to astropy implementation.
Fast is acceptable so far, the results I get are completely decent. However playing a bit with the parameters, I found that setting model = LombScargleMultiband(
time, mag, filters, error, nterms_base=2, nterms_band=1
)
frequency, power = model.autopower(method="fast", sb_method="fastnifty")
---------------------------------------------------------------------------
ValueError: nterms != 1 only supported with 'chi2' or 'fastchi2' methods but definitely not a showstopper at this stage of my work (I rather want speed than precision).
Currently I use naive distributed processing to parallelize the load (Spark) -- so each periodogram is treated independently from the others. But I agree threading over periodograms with different observation times would be great (as probably many steps are re-used internally) :-) |
Great! I'm glad that's a partial solution, anyway. I'll keep this issue open to remind us about the flexible method. And I'm glad the package is playing nice with Spark. Even single-band nifty-ls doesn't support |
thanks! Let me know if you need beta testing, I would be happy to provide feedback :-) |
Hello,
I’m amazed by the performance of the
fastnifty
method for Lomb-Scargle analysis, and I have started to use it everywhere for LSST analysis (with millions of periods to extract)! I was wondering if there are any plans to add this feature for the multiband version?The text was updated successfully, but these errors were encountered: