Faster Map Reprojection

37 views
Skip to first unread message

Alan Wang

unread,
Aug 23, 2022, 7:58:57 PM8/23/22
to SunPy
Hi all,
I'm currently trying to generate CEA projections of HMI magnetograms, but using map.reproject_to is taking around 90 seconds per image at a high resolution. Considering that I will need to reproject 50 maps at a time, it will take over an hour. Is there a way to optimize reprojection of sunpy maps?

Thanks in advance.

test3.py

Stuart Mumford

unread,
Aug 26, 2022, 5:15:16 AM8/26/22
to su...@googlegroups.com

Hello Alan,

reproject fundamentally isn't that fast, it's doing a lot of coordinate transforms and interpolation. Also nobody has spent any significant time profiling it and improving it's performance.

That being said, I think that your main issue here is that you are reprojecting to a very large array, and one which (I think) is oversampling your input image by a significant margin.

If you calculate the angular width of a disk centre pixel in heliographic carrington coordinates you get approximately 0.12 deg, in your example you are reprojecting to a carrington map with a pixel width of 0.02deg which is a significant oversampling. If you reduced the size of your array by about 3x you would get a significant speed improvement.


Stuart
--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sunpy/53c9fbdb-3eb2-47c5-b9a1-dad051316475n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages