Observatory locations¶
- PyAstronomy.pyasl.listObservatories(show=True)¶
Get a list of available observatories.
- Parameters
- showboolean, optional
If True (default), the observatory data will be written to screen.
- Returns
- Observatory datadictionary
For every observatory code (key), the dictionary holds another dictionary with “longitude”, “latitude”, “altitude”, “name”, and “tz”. Longitude and latitude are given in degrees and the observatory’s altitude in meter. Finally, tz defines the time zone (hours West of Greenwich) and “name” gives the full observatory name.
- PyAstronomy.pyasl.observatory(obsName)¶
Get the location of an observatory.
This function emulates the behavior of the IDL Astrolib’s observatory.pro procedure. Use showObservatories to get a list of known observatories.
- Parameters
- obsNamestring
The observatory code. Use listObservatories to get a list of available observatories and their codes.
- Returns
- Observatory locationdictionary
The keys of this dictionary are: “longitude”, “latitude”, “altitude”, and “tz”. Longitude and latitude are given in degrees and the observatory’s altitude in meter. Finally, tz defines the time zone (hours West of Greenwich).
Example of usage¶
from __future__ import print_function, division
from PyAstronomy import pyasl
# List all available observatory data
pyasl.listObservatories()
print()
print("Data for Kitt Peak National Observatory")
print(pyasl.observatory("kpno"))
print("(longitude and latitude in degrees, altitude in meters, and")
print("time zone in hours West of Greenwich")