In [1]:
from astropy.coordinates import EarthLocation, SkyCoord
import matplotlib.pyplot as plt
import astropy.units as u
from sunpy.map import Map
import sunpy.coordinates
%matplotlib inline


/Users/kkozarev/anaconda2/lib/python2.7/site-packages/glymur/config.py:122: UserWarning: The openjp2 library at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/libopenjp2.dylib could not be loaded.
  warnings.warn(msg, UserWarning)

Load an AIA image


In [2]:
aiamap=sunpy.map.Map('/Users/kkozarev/sunpy/data/sample_data/AIA20110319_105400_0171.fits')

I then go to JPL Horizons (https://ssd.jpl.nasa.gov/horizons.cgi) and find out RA and DEC of the solar disk center. I use a geocentric observer because I do not know exactly where SDO is located at that time.

The following is assuming the target is at 1 AU (where the Sun is supposed to be)


In [3]:
sunc_1au=SkyCoord(ra='23h53m53.47',dec='-00d39m44.3s', distance=1.*u.au,frame='icrs').transform_to(aiamap.coordinate_frame)

This is assuming the target is at 1 ly away (very far!)


In [4]:
sunc_1ly=SkyCoord(ra='23h53m53.47',dec='-00d39m44.3s', 
                  distance=1.*u.lightyear,frame='icrs').transform_to(aiamap.coordinate_frame)

In [29]:
fig = plt.figure(figsize=(8,8))
ax = plt.subplot(projection=aiamap)
aiamap.plot(axes=ax)
aiamap.draw_grid(axes=ax)
aiamap.draw_limb(axes=ax)
ax.plot_coord(sunc_1au, '+w', ms=10, label='Sun Center 1 AU')
ax.plot_coord(sunc_1ly, '*r', ms=10, label='Sun Center 1 LY')
#plt.show()



In [5]:
sunc_1au


Out[5]:
<SkyCoord (Helioprojective: obstime=2011-03-19 10:54:00.340000, rsun=696000000.0 m, observer=<HeliographicStonyhurst Coordinate (obstime=2011-03-19 10:54:00.340000): (lon, lat, radius) in (deg, deg, m)
    ( 0., -7.064078,   1.48940610e+11)>): (Tx, Ty, distance) in (arcsec, arcsec, km)
    ( 12.51239067,  21.72248778,   2.99150208e+08)>

In [6]:
sunc_1ly


Out[6]:
<SkyCoord (Helioprojective: obstime=2011-03-19 10:54:00.340000, rsun=696000000.0 m, observer=<HeliographicStonyhurst Coordinate (obstime=2011-03-19 10:54:00.340000): (lon, lat, radius) in (deg, deg, m)
    ( 0., -7.064078,   1.48940610e+11)>): (Tx, Ty, distance) in (arcsec, arcsec, km)
    ( 0.08212244,  45.6420685,   9.46088002e+12)>

In [ ]: