plot_airmass#
- astroplan.plots.plot_airmass(targets, observer, time, ax=None, style_kwargs=None, style_sheet=None, brightness_shading=False, altitude_yaxis=False, min_airmass=1.0, min_region=None, max_airmass=3.0, max_region=None, use_local_tz=False)[source]#
Plots airmass as a function of time for a given target.
If a
Axesobject already exists, an additional airmass plot will be “stacked” on it. Otherwise, creates a newAxesobject and plots airmass on top of that.When a scalar
Timeobject is passed in (e.g.,Time('2000-1-1')), the resulting plot will use a 24-hour window centered on the time indicated, with airmass sampled at regular intervals throughout. However, the user can control the exact number and frequency of airmass calculations used by passing in a non-scalarTimeobject. For instance,Time(['2000-1-1 23:00:00', '2000-1-1 23:30:00'])will result in a plot with only two airmass measurements.For examples with plots, visit the documentation of Time Dependent Plots.
- Parameters:
- targetslist of
FixedTargetobjects The celestial bodies of interest. If a single object is passed it will be converted to a list.
- observer
Observer The person, telescope, observatory, etc. doing the observing.
- time
Time If scalar (e.g.,
Time('2000-1-1')), will result in plotting target airmasses once an hour over a 24-hour window. If non-scalar (e.g.,Time(['2000-1-1']),[Time('2000-1-1')],Time(['2000-1-1', '2000-1-2'])), will result in plotting data at the exact times specified.- ax
Axesor None, optional. The
Axesobject to be drawn on. If None, uses the currentAxes.- style_kwargsdict or None, optional.
A dictionary of keywords passed into
plot_dateto set plotting styles.- style_sheetdict or
None(optional) matplotlib style sheet to use. To see available style sheets in astroplan, print astroplan.plots.available_style_sheets. Defaults to the light theme.
- brightness_shadingbool
Shade background of plot to scale roughly with sky brightness. Dark shading signifies times when the sun is below the horizon. Default is
False.- altitude_yaxisbool
Add alternative y-axis on the right side of the figure with target altitude. Default is
False.- min_airmassfloat
Lower limit of y-axis airmass range in the plot. Default is
1.0.- max_airmassfloat
Upper limit of y-axis airmass range in the plot. Default is
3.0.- min_regionfloat
If set, defines an interval between
min_airmassandmin_regionthat will be shaded. Default isNone.- max_regionfloat
If set, defines an interval between
max_airmassandmax_regionthat will be shaded. Default isNone.- use_local_tzbool
If the time is specified in a local timezone, the time will be plotted in that timezone.
- targetslist of
- Returns:
- ax
Axes An
Axesobject with added airmass vs. time plot.
- ax
Notes
y-axis is inverted and shows airmasses between 1.0 and 3.0 by default. If user wishes to change these, use
ax.<set attribute>before drawing or saving plot: