Note
Click here to download the full example code
AIA Carrington map
Import required functions
import astropy.units as u
import matplotlib.pyplot as plt
from astropy.time import Time
from solarsynoptic.data import aia_start_of_day_map
from solarsynoptic.reprojection import reproject_carrington
Define the output of the shape map. This is number of pixels in latitude and longitude.
shape_out = [180, 360]
Fetch a single AIA map. This will download the first map observed on the given day.
map_in = aia_start_of_day_map(Time.now(), 193 * u.Angstrom)
INFO: Downloading AIA 193 near real time map to /home/docs/sunpy/data/aia_193_20230201_nrt.fits [solarsynoptic.data.aia]
Files Downloaded: 0%| | 0/1 [00:00<?, ?file/s]
aia_193_20230201_nrt.fits: 0%| | 0.00/1.25M [00:00<?, ?B/s]
aia_193_20230201_nrt.fits: 0%| | 100/1.25M [00:00<24:51, 836B/s]
aia_193_20230201_nrt.fits: 5%|4 | 57.8k/1.25M [00:00<00:04, 290kB/s]
aia_193_20230201_nrt.fits: 16%|#6 | 201k/1.25M [00:00<00:01, 718kB/s]
aia_193_20230201_nrt.fits: 43%|####2 | 536k/1.25M [00:00<00:00, 1.57MB/s]
aia_193_20230201_nrt.fits: 96%|#########6| 1.20M/1.25M [00:00<00:00, 2.92MB/s]
Files Downloaded: 100%|##########| 1/1 [00:00<00:00, 1.26file/s]
Files Downloaded: 100%|##########| 1/1 [00:00<00:00, 1.26file/s]
Reproject the map into a Carrington frame of reference, and show the result.
map_out = reproject_carrington(map_in, shape_out)
fig = plt.figure()
map_out.plot()
INFO: Overwriting rsun_ref with standard photospheric radius [solarsynoptic.reprojection.reprojection]
INFO: Reprojecting AIA 193.0 Angstrom 2023-02-01 00:00:04 [solarsynoptic.reprojection.reprojection]
<matplotlib.image.AxesImage object at 0x7f65cbb36250>
By default reproject_carrington
uses a Carée projection, where the latitude
is evenly sampled. We can change this to an equal area (CEA) projection,
where sin(latitude) is evenly sampled instead.
map_out = reproject_carrington(map_in, shape_out, latitude_projection='CEA')
fig = plt.figure()
map_out.plot()
plt.show()
INFO: Reprojecting AIA 193.0 Angstrom 2023-02-01 00:00:04 [solarsynoptic.reprojection.reprojection]
Total running time of the script: ( 0 minutes 2.826 seconds)