-
Notifications
You must be signed in to change notification settings - Fork 166
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
Slow looping when plotting the aperture over the TPF of saturated stars #1430
Comments
An estimate of the actual impact using a bright star (TIC 233798897, Tmag 4.2) sector 76 SPOC TPF.
On a recent laptop:
The wall time of the typical 11x11 SPOC TPFs - no aperture mask: ~50ms, with aperture mask: ~150ms |
Thanks @astrobatty for pointing this out. The loop is really slowing things down in this case. Changing the function to
speeds things up a lot (1min 24s ± 1.96 s per loop to 1.33 s ± 15.1 ms per loop for the original example). I'm testing this now, and will put in a PR if it looks good. |
Problem description
Aperture mask plotting over large TPFs is very slow, because
lightkurve
loops over each masked pixel and usematplotlib Rectangle
to highlight pixels. This happens here.Example
Expected behavior
According to this Stack Overflow issue,
lightkurve
should usePolyCollection
instead ofRectangle
.Environment
The text was updated successfully, but these errors were encountered: