EarthPlot

class gdt.core.plot.earthplot.EarthPlot(lat_range=None, lon_range=None, saa=None, **kwargs)[source]

Bases: GdtPlot

Class for plotting the Earth, primarily related to a spacecraft’s position in orbit.

Note

This class requires installation of Cartopy.

Parameters:
  • lat_range ((float, float), optional) – The latitude range of the plot. Default value is (-90, 90)

  • lon_range ((float, float), optional) – The longitude range of the plot. Default value is (-180, 180).

  • saa (SouthAtlanticAnomaly, optional) – If set, displays the SAA polygon.

  • **kwargs – Options to pass to GdtPlot

Attributes Summary

ax

The matplotlib axes object for the plot

canvas

The plotting canvas, if set upon initialization.

fig

The matplotlib figure object

geoaxes

The Cartopy axes

orbit

The orbital path

saa

The SAA polygon

spacecraft

A plot point representing the spacecraft position

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_spacecraft_frame(frame[, tstart, tstop, ...])

Add a SpacecraftFrame object to plot the orbital path and optionally the spacecraft position at a particular time.

standard_title()

Add a standard plot title containing orbital position of the spacecraft.

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)

fig

The matplotlib figure object

Type:

(matplotlib.figure)

geoaxes

The Cartopy axes

Type:

(cartopy.mpl.geoaxes.GeoAxesSubplot)

orbit

The orbital path

Type:

(EarthLine)

saa

The SAA polygon

Type:

(SAA)

spacecraft

A plot point representing the spacecraft position

Type:

(EarthPoints)

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_spacecraft_frame(frame, tstart=None, tstop=None, step=1.0, trigtime=None, icon=None, **kwargs)[source]

Add a SpacecraftFrame object to plot the orbital path and optionally the spacecraft position at a particular time.

Parameters:
  • frame (SpacecraftFrame) – The spacecraft frame containing position information

  • tstart – (astropy.time.Time, optional): The start time to plot the orbit. If not set, then uses the first frame.obstime.

  • tstop – (astropy.time.Time, astropy.units.Quantity, or float, optional): Either a time value signifying the end of the range, the duration of the time range as a Quantity with appropriate unit, or an int/float representing the number of seconds. If not set, then uses the last frame.obstime.

  • step (datetime.TimeDelta, astropy.units.Quantity, or float, optional) – Either a TimeDelta value, Quantity with appropriate unit, or an int/float representing the number of seconds. Default is 1.0

  • trigtime (astropy.time.Time) – Set to a particular time of interest to plot the location.

  • icon (EarthPoints) – A subclass of EarthPoints that defines a specialized spacecraft icon. If not set, will default to standard matplotlib markers.

  • **kwargs – Arguments to be passed to EarthPoints if icon is not set.

standard_title()[source]

Add a standard plot title containing orbital position of the spacecraft.