Overplotting HEK feature/event polygons on a map¶
How to overplot HEK outlines on a map.
import matplotlib.pyplot as plt import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import TimeDelta import sunpy.data.sample import sunpy.map from sunpy.coordinates import frames from sunpy.net import attrs as a from sunpy.net import hek from sunpy.physics.differential_rotation import solar_rotate_coordinate from sunpy.time import parse_time
We start with the sample data.
aia_map = sunpy.map.Map(sunpy.data.sample.AIA_171_IMAGE)
Look for coronal holes detected using the SPoCA feature recognition method:
Let’s find the biggest coronal hole within 80 degrees north/south of the equator:
Next let’s get the boundary of the coronal hole.
The coronal hole was detected at different time than the AIA image was taken so we need to rotate it to the map observation time.
Now let’s plot the rotated coronal hole boundary on the AIA map, and fill it with hatching.
Total running time of the script: ( 0 minutes 1.388 seconds)