Open yjzhu-solar opened 2 months ago
Hi Yingjie,
Thank you for pointing this out ! Yes you are correct. This a known issue with regards to sunpy and astropy. You can check the following issue for more details : https://github.com/sunpy/sunpy/issues/6790
For now I added a quick fix in map_builder. I tested it and it seems to work even with sunpy.map imported. Please let me know if there is an issue. It should also be fixed for the alignment code.
Bests, Antoine
Though
sunpy
is not a required package foreuispice_coreg
, I personally often use some handy functions insunpy.coordinates
, including thepropagate_with_solar_surface()
context manager. However, by importingsunpy.coordinates
, it will change the output behaviors ofWCS.pixel_to_world()
if it is in helioprojective coordinates. For example:gives the following without
sunpy.coordinates
Note that the output is a
list
with a length of 3 (x,y,t). On the other hand, withsunpy.coordinates
the output will be organized intoSkyCoord
objects, so the length of the output list becomes 2 (SkyCoord, t).This difference will cause bugs in indexing the helioprojective longitudes and latitudes in
SPICEComposedMapBuilder._prepare_spectro_data()
in line 234 ofmap_builder.py
:It would be helpful to notify the users either do not import
sunpy.coordinates
in the python file or jupyter notebook using theSPICEComposedMapBuilder
or change the code accordingly.