[AstroPy] question about coordinate transformation
Evangelia Samara
evangelia.sam at gmail.com
Fri Jan 22 11:04:08 EST 2021
Dear,
I am writing this email because I deal with a very peculiar problem (at
least, peculiar for me!).
I want to transform my coordinates from heliographic_stonyhurst to
heliographic_carrington in python 3, as follows:
import astropy.units as u
from astropy.coordinates import SkyCoord
from sunpy.coordinates import frames
c = SkyCoord(0*u.arcsec, 0*u.arcsec, obstime='2016-6-4T12:00:00',
frame=frames.HeliographicStonyhurst )
d = c.transform_to(frames.HeliographicCarrington)
But I get the error:
ConvertError: This transformation cannot be performed because the
HeliographicCarrington frame has observer=None.
The observer should not be "None" since I define the "obstime"
parameter above. Could you please explain me why this happens and how
it should be fixed?
BTW, it runs fine with Python 2 if i change "obstime" to "dateobs".
Thank you in advance,
Evangelia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20210122/2f3f2303/attachment.html>
More information about the AstroPy
mailing list