GiftsEarthPlot

class gdt.missions.gifts.plot.GiftsEarthPlot(regions: List[HighParticleFluxRegion], **kwargs)[source]

Bases: EarthPlot

Class for plotting GIFTS orbit and high particle flux regions

Note

This class requires installation of Cartopy.

Parameters:
  • regions – list of GIFTS high particle flux regions to be included in the plot

  • **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.

plot_high_particle_flux_region(region[, ...])

Include a high particle flux region in the plot

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)

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.

plot_high_particle_flux_region(region: HighParticleFluxRegion, color: str = 'darkred', alpha: float = 0.3)[source]

Include a high particle flux region in the plot

Parameters:
  • region – GIFTS high particle flux region for a particular altitude

  • color – region polygon fill color

  • alpha – region polygon fill alpha

standard_title()

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