-
Notifications
You must be signed in to change notification settings - Fork 26
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
Occasional buggy spectrum if array of equal errors given #110
Comments
I believe I've found the cause of this issue. If I'm right it has nothing to do with using an array of uniform errors, instead it is caused by the chi2 value used when no models are fit. The function Most of the time this is not an issue since the starting value will be replaced anyway, but especially at shorter periods it is possible that none of the trial depths exceed I tested this assumption by replacing the assumed value of |
Hey, thank you for the bug report @leigh2 and the fix @talensgj ! I have come across this issue in the past myself but never had the time to dive deeper. Can you submit a pull request @talensgj or alternatively copy-paste the lines of code you changed? I will then publish a new version. Thank you so much! |
Hello, I've made the pull request #112 . Glad I could help! |
I found that if TLS is provided an array of uniform errors then it will sometimes/often cause issues with the power spectrum, and hence (automatic) period selection.
I ran a few hundred tests of white noise models with transits and found that in most cases the short period end of the spectrum had erroneous massive peaks and troughs. Peaks naturally caused an incorrect selection of the period.
I've managed to reproduce this from your quick start tutorial notebook and pushed it to my fork here
https://github.com/leigh2/tls/blob/error_array_bug_example/tutorials/01%20Quick%20start%20with%20synthetic%20data.ipynb
(Note that seeds 0 and 2 are fine, indicating that it only occasionally breaks!)
I've included examples of a couple of other power spectrum plots below at different levels of broken-ness.
This was using the current main branch version, on linux, python 3.11.5 fwiw.
The text was updated successfully, but these errors were encountered: