Reference/API

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.

Functions

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_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),
min_best_rescale(vals, min_val, max_val[, ...]) rescales an input array vals to be a score (between zero and one),
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.

Classes

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.
FixedTarget(coord[, name]) Coordinates and metadata for an object that is “fixed” with respect to the celestial sphere.
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
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
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
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

digraph inheritance2034ec6b50 { rankdir=LR; size="8.0, 12.0"; "AirmassConstraint" [URL="../api/astroplan.AirmassConstraint.html#astroplan.AirmassConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the airmass of a target."]; "AltitudeConstraint" -> "AirmassConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AltitudeConstraint" [URL="../api/astroplan.AltitudeConstraint.html#astroplan.AltitudeConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the altitude of the target."]; "Constraint" -> "AltitudeConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AstroplanWarning" [URL="../api/astroplan.AstroplanWarning.html#astroplan.AstroplanWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Superclass for warnings used by astroplan"]; "AstropyWarning" -> "AstroplanWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AstropyWarning" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",tooltip="The base warning class from which all Astropy warnings should inherit."]; "AtNightConstraint" [URL="../api/astroplan.AtNightConstraint.html#astroplan.AtNightConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the Sun to be below ``horizon``."]; "Constraint" -> "AtNightConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Constraint" [URL="../api/astroplan.Constraint.html#astroplan.Constraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Abstract class for objects defining observational constraints."]; "FixedTarget" [URL="../api/astroplan.FixedTarget.html#astroplan.FixedTarget",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Coordinates and metadata for an object that is \"fixed\" with respect to the"]; "Target" -> "FixedTarget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LocalTimeConstraint" [URL="../api/astroplan.LocalTimeConstraint.html#astroplan.LocalTimeConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the observable hours."]; "Constraint" -> "LocalTimeConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MoonIlluminationConstraint" [URL="../api/astroplan.MoonIlluminationConstraint.html#astroplan.MoonIlluminationConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the fractional illumination of the Earth's moon."]; "Constraint" -> "MoonIlluminationConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MoonSeparationConstraint" [URL="../api/astroplan.MoonSeparationConstraint.html#astroplan.MoonSeparationConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the distance between the Earth's moon and some targets."]; "Constraint" -> "MoonSeparationConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NonFixedTarget" [URL="../api/astroplan.NonFixedTarget.html#astroplan.NonFixedTarget",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Placeholder for future function."]; "Target" -> "NonFixedTarget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Observer" [URL="../api/astroplan.Observer.html#astroplan.Observer",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A container class for information about an observer's location and"]; "ObservingBlock" [URL="../api/astroplan.ObservingBlock.html#astroplan.ObservingBlock",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="An observation to be scheduled, consisting of a target and associated"]; "OldEarthOrientationDataWarning" [URL="../api/astroplan.OldEarthOrientationDataWarning.html#astroplan.OldEarthOrientationDataWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Using old Earth rotation data from IERS"]; "AstroplanWarning" -> "OldEarthOrientationDataWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PlotBelowHorizonWarning" [URL="../api/astroplan.PlotBelowHorizonWarning.html#astroplan.PlotBelowHorizonWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Warning for when something is hidden on a plot because it's below the horizon"]; "PlotWarning" -> "PlotBelowHorizonWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PlotWarning" [URL="../api/astroplan.PlotWarning.html#astroplan.PlotWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Warnings dealing with the plotting aspects of astroplan"]; "AstroplanWarning" -> "PlotWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PriorityScheduler" [URL="../api/astroplan.PriorityScheduler.html#astroplan.PriorityScheduler",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A scheduler that optimizes a prioritized list. That is, it"]; "Scheduler" -> "PriorityScheduler" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Schedule" [URL="../api/astroplan.Schedule.html#astroplan.Schedule",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="An object that represents a schedule, consisting of a list of `~astroplan.scheduling.Slot` objects."]; "Scheduler" [URL="../api/astroplan.Scheduler.html#astroplan.Scheduler",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Schedule a set of `~astroplan.scheduling.ObservingBlock` objects"]; "Scorer" [URL="../api/astroplan.Scorer.html#astroplan.Scorer",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Returns scores and score arrays from the evaluation of constraints on"]; "SequentialScheduler" [URL="../api/astroplan.SequentialScheduler.html#astroplan.SequentialScheduler",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A scheduler that does \"stupid simple sequential scheduling\". That is, it"]; "Scheduler" -> "SequentialScheduler" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Slot" [URL="../api/astroplan.Slot.html#astroplan.Slot",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A time slot consisting of a start and end time"]; "SunSeparationConstraint" [URL="../api/astroplan.SunSeparationConstraint.html#astroplan.SunSeparationConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the distance between the Sun and some targets."]; "Constraint" -> "SunSeparationConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Target" [URL="../api/astroplan.Target.html#astroplan.Target",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Abstract base class for target objects."]; "TargetAlwaysUpWarning" [URL="../api/astroplan.TargetAlwaysUpWarning.html#astroplan.TargetAlwaysUpWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Target is circumpolar"]; "AstroplanWarning" -> "TargetAlwaysUpWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TargetNeverUpWarning" [URL="../api/astroplan.TargetNeverUpWarning.html#astroplan.TargetNeverUpWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Target never rises above horizon"]; "AstroplanWarning" -> "TargetNeverUpWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TimeConstraint" [URL="../api/astroplan.TimeConstraint.html#astroplan.TimeConstraint",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Constrain the observing time to be within certain time limits."]; "Constraint" -> "TimeConstraint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransitionBlock" [URL="../api/astroplan.TransitionBlock.html#astroplan.TransitionBlock",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Parameterizes the \"dead time\", e.g. between observations, while the"]; "Transitioner" [URL="../api/astroplan.Transitioner.html#astroplan.Transitioner",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A class that defines how to compute transition times from one block to"]; }

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.

Functions

plot_airmass(targets, observer, time[, ax, ...]) Plots airmass 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.