heliohackweek / AIA_acceleration

3 stars 6 forks source link

Speeding up contains_full_disk. #2

Closed wafels closed 4 years ago

wafels commented 4 years ago

I have a version of contains_full_disk that does not test every pixel coordinate. It's a bit janky, but it passes the existing tests. It uses the edges of the map to test if the map is a rectangle that has edges that are least a solar diameter in length assuming that the Sun is centered in the image. This is vastly fewer pixels than currently. The code is at https://github.com/wafels/sunpy/blob/faster_full_disk/sunpy/map/maputils.py#L127 .

cbard commented 4 years ago

Ok, this is a good start! Are you planning to push this to sunpy? Otherwise, I'll plan to copy this contains_full_disk code (with proper attribution to you) and start testing it in my local register function.

wtbarnes commented 4 years ago

Will this be a PR to sunpy soon? 😜

wafels commented 4 years ago

I would copy the code in to the hack week repository at the moment. It’ll take a while for this to be in the released version of sunpy. πŸ€ͺ

On Tue, Aug 25, 2020 at 18:36 Will Barnes notifications@github.com wrote:

Will this be a PR to sunpy soon? 😜

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/heliohackweek/AIA_acceleration/issues/2#issuecomment-680303224, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHQEFYAKEJMIGKORXYIGH3SCQ4HLANCNFSM4QLDMB7Q .

wafels commented 4 years ago

I made a PR to SunPy with this fix. It's much faster.