LocalTimeConstraint

class astroplan.LocalTimeConstraint(min=None, max=None)[source]

Bases: astroplan.Constraint

Constrain the observable hours.

Parameters:

min : time

Earliest local time. None indicates no limit.

max : time

Latest local time. None indicates no limit.

Examples

Constrain the observations to targets that are observable between 23:50 and 04:08 local time:

>>> from astroplan import Observer
>>> from astroplan.constraints import LocalTimeConstraint
>>> import datetime as dt
>>> subaru = Observer.at_site("Subaru", timezone="US/Hawaii")
>>> constraint = LocalTimeConstraint(min=dt.time(23,50), max=dt.time(4,8)) # bound times between 23:50 and 04:08 local Hawaiian time

Methods Summary

Methods Documentation

compute_constraint(times, observer, targets)[source]