Reprojecting to a Map Projection with a Custom Origin¶
In this example, we show how to reproject a map to a map projection with a custom origin. Here, we choose the target map projection to be the azimuthal equidistant projection, also known as the Postel projection, which has useful properties relative to a specified origin of the projection. If a different map projection is desired, modifying this example is straightforward.
We will use one of the AIA images from the sample data. We fix the range of values for the Map’s normalizer for a prettier image.
Next, we create a
SkyCoord to define the custom origin
of the map projection. Here, we are going to center the projection at the
helioprojective coordinates of a particular active region. We want our map
projection to be in heliographic Stonyhurst coordinates, so we transform the
origin coordinate accordingly.
We then create a FITS-WCS header that includes our custom origin coordinate.
The azimuthal equidistant projection is specified by the code
See Supported projections for the projection codes for
We reproject the map to our FITS-WCS header and copy over the plot settings.
Finally, we plot both the original and reprojected maps side by side.
Plot the original AIA map, with the active region circled in red and the heliographic grid and solar limb in blue.
[<matplotlib.lines.Line2D object at 0x7f9689f094b0>]
Plot the reprojected AIA map, again with the active region circled in red and the heliographic grid and solar limb in blue.
Total running time of the script: ( 0 minutes 2.509 seconds)