Co-aligning AIA 193 and EIS Fe XII maps

76 views
Skip to first unread message

Deb Baker

unread,
Oct 9, 2023, 11:35:48 AM10/9/23
to su...@googlegroups.com, will.t...@gmail.com

Hi Will and all,

My code for aligning AIA and EIS maps was based on your Hinode/IRIS tutorial from 2021.  Now I see that that sunpy.image.coalignment has been deprecated in favor of sunkit_image.coalignment. 

 

I am unable to import sunkit_image.coalignment (my Python version is 5.0).  The error message is ‘no module named ‘sunkit_image’ or ‘sunkit_image.coalignment’.  How do I access this module to replace sunpy.image.coalignment in my code to align the AIA and EIS maps?

 

Thanks very much.

 

Deb

Nabil Freij

unread,
Oct 9, 2023, 11:44:32 AM10/9/23
to su...@googlegroups.com, Will Barnes
Hi Deb,

To use sunkit_image, you will need to install it as it's a separate library.

You should be able to run: conda install -c conda-forge sunkit_image to get it. Hopefully I didn't overlook a typo.

Kind regards,
Nabil

--
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/LO2P123MB2112AFE750C1EB9B62E1BA90AACEA%40LO2P123MB2112.GBRP123.PROD.OUTLOOK.COM.

will.t...@gmail.com

unread,
Oct 11, 2023, 12:16:24 PM10/11/23
to SunPy
Hi Deb,

Thanks for the question. Nabil is correct that we've moved the coalignment code to sunkit-image and you'll need to install that. However, it looks like we also made the "calculate_shift" function, which is used in the EIS-AIA coalignment, private as part of moving that code. On the sunpy side, I think we need to rethink how we're exposing this functionality, but in the meantime, until we fix this, you can use the following line:

    from sunkit_image.coalignment import _calculate_shift as calculate_shift

Note that this is really just a short term fix as this private API is not guaranteed to be stable from one version to the next. 

Additionally, if you haven't already done so, you'll need to replace the "shift" method on Map with the "shift_reference_coord" method as that was renamed in sunpy v4.0. Apologies for all the friction here! This points to a need for formalizing this function in the EISPAC package rather than relying on a really old notebook for this important functionality. I've posted an issue on the EISPAC repository to make sure we don't lose track of this: https://github.com/USNavalResearchLaboratory/eispac/issues/85.

Hope that helps! Please let us know if you're still running into issues.

Best,

Will

d.bak...@gmail.com

unread,
Oct 12, 2023, 12:40:58 PM10/12/23
to SunPy
Hi Will,
Thanks for the specific EIS help.  I will try out your suggestions and let you know in the next couple days.  

I would like to be very clear that the Sunpy crew have been very generous with their time in helping the community.  This is especially appreciated by those of us who were born and raised on IDL and now want to make the leap to Python.

Deb

will.t...@gmail.com

unread,
Oct 13, 2023, 11:24:29 AM10/13/23
to SunPy
Thank you for the kind words Deb and thanks for all of your contributions! Feedback from users is an essential part of maintaining and improving the entire SunPy ecosystem.

Best,

Will

d.bak...@gmail.com

unread,
Oct 23, 2023, 8:07:04 AM10/23/23
to SunPy
Hi Will,
I am able to coalign AIA and EIS using the line given above.  I also read through your post to EISPAC folks.
Thanks again for your help.
Deb

On Wednesday, October 11, 2023 at 5:16:24 PM UTC+1 will.t...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages