Use astroquery to get a table of Landolt (1992) standard stars from Vizier.
In [25]:
catalog_name = 'Landolt 1992'
observatory_name = 'Apache Point'
In [26]:
from astroquery.vizier import Vizier
from astropy.coordinates import SkyCoord
import astropy.units as u
catalog_list = Vizier.find_catalogs(catalog_name)
catalogs = Vizier.get_catalogs(catalog_list.keys())
Vizier.ROW_LIMIT = -1 # Otherwise would only show first 50 values
catalog_table = catalogs[0] # This is the table with the data
RAs = u.Quantity(catalog_table['_RAJ2000'].data, unit=u.deg)
Decs = u.Quantity(catalog_table['_DEJ2000'].data, unit=u.deg)
names = list(catalog_table['SimbadName'].data)
landolt_standards = SkyCoord(ra=RAs, dec=Decs)
Set up an Observer and list of FixedTargets in astroplan.
In [27]:
from astroplan import Observer, FixedTarget
obs = Observer.at_site(observatory_name)
target_list = [FixedTarget(coord=coord, name=name)
for coord, name in zip(landolt_standards, names)]
Determine which standards are observable tonight.
In [37]:
from astroplan import is_observable, observability_table, AltitudeConstraint, AtNightConstraint
from astropy.time import Time
constraints = [AltitudeConstraint(min=25*u.deg),
AtNightConstraint.twilight_astronomical()]
# Figure out when "tonight" is
present_time = Time.now()
if not obs.is_night(present_time):
# If it's currently day time at runtime, find time of sunset and sunrise
tonight_start = obs.sun_set_time(present_time, which='next')
tonight_end = obs.sun_rise_time(present_time, which='next')
else:
# Otherwise find time to next sunrise
tonight_start = present_time
tonight_end = obs.sun_rise_time(present_time, which='next')
table = observability_table(constraints, obs, target_list,
time_range=Time([tonight_start, tonight_end]))
print(table)
In [ ]: