Carrington Maps from Image Data

250 views
Skip to first unread message

Dale Gary

unread,
Jul 17, 2021, 10:55:28 AM7/17/21
to SunPy
Hi All,

I was intrigued by the Sunpy doc on creating a heliographic map.  This example centers the data at heliographic longitude 0, but I would like to place my image centered at its Carrington longitude.  How would the example be modified to change the center longitude? Also, is there an existing (Python) routine to calculate the Carrington longitude + rotation number of the solar central meridian for a given date/time?

A related question, I would expect that the poles would be spread over a wide range of longitude (a wider range for the pole that is tilted our direction due to the B angle) but in the above example the polar regions taper inward and are symmetric.  I tried the reproject_adaptive projection and it was N/S asymmetric, but the poles still taper inward.  Interestingly, there is a "fringe" of data around the projection that does do what I expect (see attached).  Maybe the data are masked in a way I do not want.  Please advise.

Thanks!
Dale


EOVSA_projected.png

Albert Y. Shih

unread,
Jul 17, 2021, 10:35:37 PM7/17/21
to su...@googlegroups.com
Hi, Dale,
     Thanks for all of the questions!  Hopefully this helps:

> This example centers the data at heliographic longitude 0, but I would like to place my image centered at its Carrington longitude.  How would the example be modified to change the center longitude?

If you're asking how to choose a different center for the plotted map while still staying in Stonyhurst heliographic coordinates, you can change the definition of the reference coordinate.  In the gallery example, `frame_out` is the reference coordinate, and the first argument for the `SkyCoord` constructor is the Stonyhurst longitude of the reference coordinate, and will be the center of the map in the horizontal direction.

If you're asking how to switch to Carrington heliographic coordinates in addition, you again would modify the definition of the reference coordinate.  For the `SkyCoord` call, you would specify `frame="heliographic_carrington"`.  Because of how SunPy implements Carrington heliographic coordinates, you will also need to specify the observer location.  To do that, add `observer=aia_map.observer_coordinate` to the `SkyCoord` call.

> Also, is there an existing (Python) routine to calculate the Carrington longitude + rotation number of the solar central meridian for a given date/time?

Carrington longitude: `sunpy.coordinates.sun.L0()`
Carrington rotation number: `sunpy.coordinates.sun.carrington_rotation_number()`

Both of the above functions are for Earth center.  I'll also note that SunPy's definition Carrington longitude is slightly different from some other sources:


> A related question, ...

My guess is that your map's definition of the physical radius of the Sun does not quite match the IAU 2015 value (695.7 Mm).  This is not surprising: for example, AIA and HMI maps use a rounded value (696 Mm).  In fact, the gallery example makes the same error and needs to be fixed.  You'll note that the gallery example has a similar "tapered" look, and it shouldn't.  I've occasionally seen this type of error manage to preserve a "fringe" like what you show.  (The gap between the fringe and the main area should be reprojectable.)
     If you're running the latest release of SunPy, you can add the keyword `rsun` to define the non-standard radius:

`frame_out = SkyCoord(..., rsun=aia_map.coordinate_frame.rsun)`

If you're running an earlier version of SunPy, the most expedient solution is to overwrite your map's metadata to use the IAU 2015 value.

Setting `rsun` should fix most, if not all, of the issue.  There's a chance that pixels right at the limb may not be able to reproject as desired.  In those cases, you may be able to improve the results by using `sunpy.coordinates.Helioprojective.assume_spherical_screen(..., only_off_disk=True)`.

Let me know if you need further help with any of the above.

Thanks,
Albert

--
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/bd496eb9-4333-4fc3-a594-600cf00563f6n%40googlegroups.com.

Albert Y. Shih

unread,
Jul 17, 2021, 11:02:05 PM7/17/21
to su...@googlegroups.com
Hi, Dale,
     To illustrate, I've attached an image comparing two reprojections of the same AIA image (from July 13) to Carrington heliographic coordinates, one without specifying AIA's `rsun` value and one with.

Albert
comparison.png

Gary, Dale E.

unread,
Jul 18, 2021, 11:08:45 AM7/18/21
to su...@googlegroups.com
Hi Albert,

Perfect response!  Thanks.  I now have everything working as I wanted.  I can place the projection at the longitude I want by taking the fractional part of the Carrington rotation number, multiplying it by 360, and using that as the first Sky_Coord() position.  Very cool!

Regards,
Dale

You received this message because you are subscribed to a topic in the Google Groups "SunPy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sunpy/dzZF_BAzut0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sunpy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sunpy/CAB4tczi%3D5qNaX1mWjujp%3DsX2iLytaAbtLW_kayL%3DACWU9GONuA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages