Overplotting HMI Contours on an AIA Image¶
This example shows how to use
wcsaxes to overplot
unaligned HMI magnetic field strength contours on an AIA map.
First let’s load two of the sample files into two Map objects.
To make the plot neater, we start by submapping the same region. We define the region in HGS coordinates and then apply the same submap to both the HMI and AIA maps.
To highlight the fact that the AIA and HMI images are not aligned, let us quickly view the two maps side-by-side.
<matplotlib.image.AxesImage object at 0x7f6050cfed00>
In the next plot we will start by plotting the same aia submap, and draw a heliographic grid on top.
Text(0.5, 1.1, 'AIA 193 with HMI magnetic field strength contours')
Now we want to draw the contours, to enhance the appearance of the plot we explicitly list the levels, but then make them symmetric around 0
matplotlib requires the levels to be sorted, so we order them from lowest to highest by reversing the array.
Before we add the contours to the axis we store the existing bounds of the as overplotting the contours will sometimes change the bounds, we re-apply them to the axis after the contours have been added.
(-0.5, 219.5, -0.5, 254.5)
Finally, add a colorbar. We add an extra tick to the colorbar at the 0 point to make it clearer that it is symmetric, and tweak the size and location to fit with the axis better.
Total running time of the script: ( 0 minutes 2.105 seconds)