Drawing and using a Great Arc#

How to define and draw a great arc on an image of the Sun, and to extract intensity values along that arc.

import matplotlib.pyplot as plt

import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.visualization import quantity_support

import sunpy.map
from sunpy.coordinates.utils import GreatArc
from sunpy.data.sample import AIA_171_IMAGE

quantity_support()
<astropy.visualization.units.quantity_support.<locals>.MplQuantityConverterFormatted object at 0x70966ea68ad0>

We start with the sample data.

Let’s define the start and end coordinates of the arc.

Create the great arc between the start and end points.

Plot the great arc on the Sun.

fig = plt.figure()
ax = fig.add_subplot(projection=m)
m.plot(axes=ax, clip_interval=(1, 99.99)*u.percent)
ax.plot_coord(great_arc.coordinates(), color='c')
AIA $171 \; \mathrm{\mathring{A}}$ 2011-06-07 06:33:02
[<matplotlib.lines.Line2D object at 0x709674eabc50>]

Now we can get the intensity along the great arc coordinates, along with the angular distance from the start of the arc

Plot the intensity along the arc from the start to the end point.

fig, ax = plt.subplots()
ax.plot(separation, intensity)
ax.set_xlabel(f'Separation from start of arc [{separation.unit}]')
ax.set_ylabel(f'Intensity [{intensity.unit}]')

plt.show()
great arc example

Total running time of the script: (0 minutes 0.512 seconds)

🏷 Tags: Map, AIA

Gallery generated by Sphinx-Gallery