astroplan Package

astroplan is an open source (BSD licensed) observation planning package for astronomers that can help you plan for everything but the clouds.

It is an in-development Astropy affiliated package that seeks to make your life as an observational astronomer a little less infuriating.


download_IERS_A([show_progress]) Download and cache the IERS Bulletin A table.
get_IERS_A_or_workaround() Get the cached IERS Bulletin A table if one exists.
is_always_observable(constraints, observer, …) A function to determine whether targets are always observable throughout time_range given constraints in the constraints_list for a particular observer.
is_event_observable(constraints, observer, …) Determines if the target is observable at each time in times, given constraints in constraints for a particular observer.
is_observable(constraints, observer, targets) Determines if the targets are observable during time_range given constraints in constraints_list for a particular observer.
max_best_rescale(vals, min_val, max_val[, …]) rescales an input array vals to be a score (between zero and one), where the max_val goes to one, and the min_val goes to zero.
min_best_rescale(vals, min_val, max_val[, …]) rescales an input array vals to be a score (between zero and one), where the min_val goes to one, and the max_val goes to zero.
months_observable(constraints, observer, targets) Determines which month the specified targets are observable for a specific observer, given the supplied constriants.
moon_illumination(time[, ephemeris]) Calculate fraction of the moon illuminated.
moon_phase_angle(time[, ephemeris]) Calculate lunar orbital phase in radians.
observability_table(constraints, observer, …) Creates a table with information about observability for all the targets over the requested time_range, given the constraints in constraints_list for observer.
stride_array(arr, window_width) Computes all possible sequential subarrays of arr with length = window_width
test([package, test_path, args, plugins, …]) Run the tests using py.test.
time_grid_from_range(time_range[, …]) Get linearly-spaced sequence of times.


AirmassConstraint([max, min, boolean_constraint]) Constrain the airmass of a target.
AltitudeConstraint([min, max, …]) Constrain the altitude of the target.
AstroplanWarning Superclass for warnings used by astroplan
AtNightConstraint([max_solar_altitude, …]) Constrain the Sun to be below horizon.
Constraint Abstract class for objects defining observational constraints.
EclipsingSystem(primary_eclipse_time, …[, …]) Define parameters for an eclipsing system; useful for an eclipsing binary or transiting exoplanet.
FixedTarget(coord[, name]) Coordinates and metadata for an object that is “fixed” with respect to the celestial sphere.
GalacticLatitudeConstraint([min, max]) Constrain the distance between the Galactic plane and some targets.
LocalTimeConstraint([min, max]) Constrain the observable hours.
MoonIlluminationConstraint([min, max, ephemeris]) Constrain the fractional illumination of the Earth’s moon.
MoonSeparationConstraint([min, max, ephemeris]) Constrain the distance between the Earth’s moon and some targets.
NonFixedTarget([name, ra, dec, marker]) Placeholder for future function.
Observer([location, timezone, name, …]) A container class for information about an observer’s location and environment.
ObservingBlock(target, duration, priority[, …]) An observation to be scheduled, consisting of a target and associated constraints on observations.
OldEarthOrientationDataWarning Using old Earth rotation data from IERS
PeriodicEvent(epoch, period[, duration, name]) A periodic event defined by an epoch and period.
PhaseConstraint(periodic_event[, min, max]) Constrain observations to times in some range of phases for a periodic event (e.g.~transiting exoplanets, eclipsing binaries).
PlotBelowHorizonWarning Warning for when something is hidden on a plot because it’s below the horizon
PlotWarning Warnings dealing with the plotting aspects of astroplan
PrimaryEclipseConstraint(eclipsing_system) Constrain observations to times during primary eclipse.
PriorityScheduler(*args, **kwargs) A scheduler that optimizes a prioritized list.
Schedule(start_time, end_time[, constraints]) An object that represents a schedule, consisting of a list of Slot objects.
Scheduler(constraints, observer[, …]) Schedule a set of ObservingBlock objects
Scorer(blocks, observer, schedule[, …]) Returns scores and score arrays from the evaluation of constraints on observing blocks
SecondaryEclipseConstraint(eclipsing_system) Constrain observations to times during secondary eclipse.
SequentialScheduler(*args, **kwargs) A scheduler that does “stupid simple sequential scheduling”.
Slot(start_time, end_time) A time slot consisting of a start and end time
SunSeparationConstraint([min, max]) Constrain the distance between the Sun and some targets.
Target([name, ra, dec, marker]) Abstract base class for target objects.
TargetAlwaysUpWarning Target is circumpolar
TargetNeverUpWarning Target never rises above horizon
TimeConstraint([min, max]) Constrain the observing time to be within certain time limits.
TransitionBlock(components[, start_time]) Parameterizes the “dead time”, e.g.
Transitioner([slew_rate, …]) A class that defines how to compute transition times from one block to another.

Class Inheritance Diagram

Inheritance diagram of astroplan.constraints.AirmassConstraint, astroplan.constraints.AltitudeConstraint, astroplan.exceptions.AstroplanWarning, astroplan.constraints.AtNightConstraint, astroplan.constraints.Constraint, astroplan.periodic.EclipsingSystem,, astroplan.constraints.GalacticLatitudeConstraint, astroplan.constraints.LocalTimeConstraint, astroplan.constraints.MoonIlluminationConstraint, astroplan.constraints.MoonSeparationConstraint,,, astroplan.scheduling.ObservingBlock, astroplan.exceptions.OldEarthOrientationDataWarning, astroplan.periodic.PeriodicEvent, astroplan.constraints.PhaseConstraint, astroplan.exceptions.PlotBelowHorizonWarning, astroplan.exceptions.PlotWarning, astroplan.constraints.PrimaryEclipseConstraint, astroplan.scheduling.PriorityScheduler, astroplan.scheduling.Schedule, astroplan.scheduling.Scheduler, astroplan.scheduling.Scorer, astroplan.constraints.SecondaryEclipseConstraint, astroplan.scheduling.SequentialScheduler, astroplan.scheduling.Slot, astroplan.constraints.SunSeparationConstraint,, astroplan.exceptions.TargetAlwaysUpWarning, astroplan.exceptions.TargetNeverUpWarning, astroplan.constraints.TimeConstraint, astroplan.scheduling.TransitionBlock, astroplan.scheduling.Transitioner

astroplan.plots Package

astroplan.plots contains functions for making plots of commonly-used quantities in observation planning (e.g., airmass vs. time), using astroplan and Matplotlib.


plot_airmass(targets, observer, time[, ax, …]) Plots airmass as a function of time for a given target.
plot_altitude(targets, observer, time[, ax, …]) Plots altitude as a function of time for a given target.
plot_finder_image(target[, survey, …]) Plot survey image centered on target.
plot_parallactic(target, observer, time[, …]) Plots parallactic angle as a function of time for a given target.
plot_schedule_airmass(schedule[, show_night]) Plots when observations of targets are scheduled to occur superimposed upon plots of the airmasses of the targets.
plot_sky(target, observer, time[, ax, …]) Plots target positions in the sky with respect to the observer’s location.
plot_sky_24hr(target, observer, time[, …]) Plots target positions in the sky with respect to the observer’s location over a twenty-four hour period centered on time.