EquatorialPlot

class gdt.core.plot.sky.EquatorialPlot(projection='mollweide', flipped=True, xticks_res=30, yticks_res=15, **kwargs)[source]

Bases: SkyPlot

Plotting the sky in Equatorial (GCRS) coordinates.

Parameters:
  • projection (str, optional) – The projection of the map. Current compatible projections: ‘aitoff’, ‘hammer’, ‘lambert’, ‘mollweide’, and ‘polar’. Default is ‘mollweide’.

  • flipped (bool, optional) – If True, the longitudinal axis is flipped, following astronomical convention. Default is True.

  • xticks_res (float, optional) – The resolution, in degrees, of the longitudinal tick marks. Default is 30.

  • yticks_res (float, optional) – The resolution, in degrees, of the latitudinal tick marks. Default is 15.

  • **kwargs – Options to pass to GdtPlot

Attributes Summary

ax

The matplotlib axes object for the plot

canvas

The plotting canvas, if set upon initialization.

detectors

The collection of detector plot elements

earth

The Earth plot element

effective_area

The effective area plot element

fig

The matplotlib figure object

fontsize

The font size of the text labels.

galactic_plane

The galactic plane plot element

loc_contours

(PlotElementCollection of SkyLine or SkyPolygon): The localization contour plot elements

loc_posterior

The localization gradient plot element

sun

The Sun plot element

text_color

The color of the text labels

xlim

The plotting range of the x axis

xscale

The scale of the x axis, either 'linear' or 'log'.

ylim

The plotting range of the y axis.

yscale

The scale of the y axis, either 'linear' or 'log'.

Methods Summary

add_effective_area(hpx[, frame])

Add a HealPixEffectiveArea object to plot the effective area.

add_frame(frame[, trigtime, detectors, ...])

Add a SpacecraftFrame object to plot the location of the Earth, Sun, and detector pointings.

add_localization(hpx[, gradient, clevels, ...])

Add a HealPixLocalization object to plot a localization and optionally plot the location of the Earth, Sun, and detector pointings.

plot_detector(det_coord, det[, radius])

Plot a detector pointing.

plot_earth(geo_coord, radius, **kwargs)

Plot the Earth.

plot_galactic_plane()

Plot the Galactic plane.

plot_heatmap(heatmap, lon_array, lat_array, ...)

Plot a heatmap on the sky.

plot_sun(time, **kwargs)

Plot the sun.

Attributes Documentation

ax

The matplotlib axes object for the plot

Type:

(matplotlib.axes)

canvas

The plotting canvas, if set upon initialization.

Type:

(Canvas Backend object)

detectors

The collection of detector plot elements

Type:

(PlotElementCollection of DetectorPointing)

earth

The Earth plot element

Type:

(SkyCircle)

effective_area

The effective area plot element

Type:

(SkyHeatmap)

fig

The matplotlib figure object

Type:

(matplotlib.figure)

fontsize

The font size of the text labels.

Type:

(int)

galactic_plane

The galactic plane plot element

Type:

(GalacticPlane)

loc_contours

(PlotElementCollection of SkyLine or SkyPolygon): The localization contour plot elements

loc_posterior

The localization gradient plot element

Type:

(SkyHeatmap)

sun

The Sun plot element

Type:

(Sun)

text_color

The color of the text labels

Type:

(str)

xlim

The plotting range of the x axis

Type:

(float, float)

xscale

The scale of the x axis, either ‘linear’ or ‘log’.

Type:

(str)

ylim

The plotting range of the y axis.

Type:

(float, float)

yscale

The scale of the y axis, either ‘linear’ or ‘log’.

Type:

(str)

Methods Documentation

add_effective_area(hpx, frame=None, **kwargs)[source]

Add a HealPixEffectiveArea object to plot the effective area. Optionally add a SpacecraftFrame object to plot the location of the Earth, Sun, galactic plane, and detector pointings.

Parameters:
  • hpx (HealPixEffectiveArea) – The HEALPix object

  • frame (gdt.core.coords.SpacecraftFrame, optional) – The spacecraft frame containing position and orientation information

  • detectors ('all' or list) – A list of detectors or “all” to plot the pointings on the sky

  • earth (bool, optional) – If True, plot the Earth. Default is False.

  • sun (bool, optional) – If True, plot the Sun. Default is False.

  • galactic_plane (bool, optional) – If True, plot the Galactic plane. Default is False.

add_frame(frame, trigtime=None, detectors='all', earth=True, sun=True, galactic_plane=True)

Add a SpacecraftFrame object to plot the location of the Earth, Sun, and detector pointings.

Parameters:
  • frame (gdt.core.coords.SpacecraftFrame) – The spacecraft frame containing position and orientation information

  • trigtime (astropy.time.Time, optional) – The time of interest. This must be set if frame contains more than one frame with a corresponding time. If frame is of size=1, then the corresponding time for that frame will be used.

  • detectors (list or "all") – A list of detectors or “all” to plot the pointings on the sky.

  • earth (bool, optional) – If True, plot the Earth. Default is True.

  • sun (bool, optional) – If True, plot the Sun. Default is True.

  • galactic_plane (bool, optional) – If True, plot the Galactic plane. Default is True.

add_localization(hpx, gradient=True, clevels=None, sun=True, earth=True, detectors='all', galactic_plane=True)

Add a HealPixLocalization object to plot a localization and optionally plot the location of the Earth, Sun, and detector pointings.

Parameters:
  • hpx (HealPixLocalization) – The HEALPix object

  • gradient (bool, optional) – If True, plots the posterior as a color gradient. If False, plot the posterior as color-filled confidence regions.

  • clevels (list of float, optional) – The confidence levels to plot contours. Default plots at the 1, 2, and 3 sigma level. If no contours are desired, pass an empty list: []

  • detectors ('all' or list) – A list of detectors or “all” to plot the pointings on the sky

  • earth (bool, optional) – If True, plot the Earth. Default is True.

  • sun (bool, optional) – If True, plot the Sun. Default is True.

  • galactic_plane (bool, optional) – If True, plot the Galactic plane. Default is True.

Note

Setting gradient=False when plotting an annulus may produce unexpected results at this time. It is suggested to use gradient=True for plotting annuli maps.

plot_detector(det_coord, det, radius=10.0, **kwargs)

Plot a detector pointing.

Parameters:
  • det_coord (astropy.coordinates.SkyCoord) – The detector coordinate

  • det (str) – The detector name

  • radius (float, optional) – The radius of pointing, in degrees. Default is 10.0

  • **kwargs – Options to pass to SkyCircle

plot_earth(geo_coord, radius, **kwargs)

Plot the Earth.

Parameters:
  • geo_coord (astropy.coordinates.SkyCoord) – The coordinates of the geocenter.

  • radius (astropy.quantity.Quantity) – The angular radius of the Earth

  • **kwargs – Options to pass to SkyCircle

plot_galactic_plane()

Plot the Galactic plane.

plot_heatmap(heatmap, lon_array, lat_array, **kwargs)

Plot a heatmap on the sky.

Parameters:
  • heatmap (np.array) – A 2D array of values

  • ra_array (np.array) – The array of longitudinal gridpoints

  • dec_array (np.array) – The array of latitudinal gridpoints

  • **kwargs – Options to pass to SkyHeatmap

plot_sun(time, **kwargs)

Plot the sun.

Parameters:
  • time (astropy.time.Time) – The time at which to plot the sun

  • **kwargs – Options to pass to Sun