Determining 'observer' for coordinate transformations

47 views
Skip to first unread message

Tom Bridgman

unread,
Sep 22, 2021, 3:02:37 PM9/22/21
to SunPy
Is there a way to get a list of supported 'observers' in SunPy? 

The docs say solar system body but is that limited to planets?  moons?  existing spacecraft?  How can you find out what is supported?  Ambiguities in naming, especially for spacecraft, might mean you can't find a supported observer.

And suppose you want an unsupported observer - say for planning a future mission or visual aesthetics?  How would you specify that observer to SunPy?

Thanks,
Tom

Albert Y. Shih

unread,
Sep 22, 2021, 3:18:27 PM9/22/21
to su...@googlegroups.com
Hi, Tom,
     For string input to the `observer` attribute, that input is fed to `get_body_heliographic_stonyhurst()`, and the allowable inputs are just the planets (and the Sun).  It technically depends on the ephemeris that is currently active in your Astropy, which is why it's not explicitly documented, but invariably it's just the planets.
     For observers not at the center of any planet, you can set the `observer` attribute to a `SkyCoord` instance.  For example, if you open an AIA map, you can see that the `.observer_coordinate` has the specific location of SDO (in Stonyhurst heliographic coordinates), as populated by the metadata present in the header.
     For many named bodies, you can also generate the `SkyCoord` via  `get_horizons_coord()`, which queries JPL HORIZONS.  HORIZONS contains the information for many moons, asteroids, comets, and major spacecraft.  You can look them up by name – which can be ambiguous – or by NAIF code if you know it.
     Does that cover your needs?

Thanks,
Albert
     

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sunpy/3c2b6afe-22f5-4318-879d-663bbe2fc510n%40googlegroups.com.

Albert Y. Shih

unread,
Sep 22, 2021, 3:58:36 PM9/22/21
to su...@googlegroups.com
Hi, Tom,
     To answer your first question directly:

>>> from astropy.coordinates import solar_system_ephemeris
>>> print(solar_system_ephemeris.bodies)
('earth', 'sun', 'moon', 'mercury', 'venus', 'earth-moon-barycenter', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune')

If you want to specify an observer that is not one of the above, you need to provide a `SkyCoord` instance rather than a string.

Albert

William Bridgman

unread,
Sep 23, 2021, 12:10:39 PM9/23/21
to su...@googlegroups.com
Albert,
Took a little more digging, discovering this example which displays
more actual calls:
https://gist.github.com/hayesla/267fbe796e42bc138b7c7248d9d5391c
and installing Astroquery, but I've got something to actually plot,
which is progress!

Thanks,
Tom
> To view this discussion on the web visit https://groups.google.com/d/msgid/sunpy/CAB4tczgy7rtv57%3DQAYf-v1_FrH1mbkXe0REw2CjV08bsXO%3DS3A%40mail.gmail.com.



--
Dr. William T."Tom" Bridgman
Scientific Visualization Studio
NASA/Goddard Space Flight Center
Greenbelt, MD 20771
http://svs.gsfc.nasa.gov
Reply all
Reply to author
Forward
0 new messages