Plotting Insitu KP Data

This page will describe how to plot the KP data

Altitiude Plots

pydivide.altplot(kp, parameter=None, time=None, errors=None, sameplot=True, list=False, title='Altitude Plot', ylog=False, qt=True)[source]

Plot the provided data plotted against spacecraft altitude. If time is not provided plot entire data set.

Parameters:
  • kp – dict insitu kp data structure/dictionary read from file(s)
  • parameter – list of str/int The parameter(s) to be plotted. Can be provided as integers (by index) or strings (by name: inst.obs). If a single parameter is provided, it must be an int or str. If several are provided it must be a list. A list may contain a mixture of data types.
  • time – list of str Two-element list of strings or integers indicating the range of Time to be plotted. At present, there are no checks on whether provided Times are within provided data
  • sameplot – bool if True, put all curves on same axes if False, generate new axes for each plot
  • list – bool Lists all Key Parameters instead of plotting
  • title – str The Title to give the plot
  • ylog – bool Displays the log of the y axis
  • qt – bool If true, plots with qt. Else creates an HTML page with bokeh.
Returns:

None

Examples

>>> # Plot LPW.ELECTRON_DENSITY against spacecraft altitude.
>>> pydivide.altplot(insitu, parameter=['LPW.ELECTRON_DENSITY','MAG.MSO_Y'], qt=False, ylog=True)
Bokeh Plot

Time Series Plots

pydivide.plot(kp, parameter=None, time=None, errors=None, sameplot=True, list=False, title='', qt=True, exec_qt=True, log=False)[source]

Plot time-series data from insitu data structure.

Parameters:
  • kp – dict insitu kp data structure/dictionary read from file(s)
  • parameter – list of str/int The parameter(s) to be plotted. Can be provided as integers (by index) or strings (by name: inst.obs). If a single parameter is provided, it must be an int or str. If several are provided it must be a list. A list may contain a mixture of data types.
  • time – list of str Two-element list of strings or integers indicating the range of Time to be plotted. At present, there are no checks on whether provided Times are within provided data
  • sameplot – bool if True, put all curves on same axes if False, generate new axes for each plot
  • list – bool Lists all Key Parameters instead of plotting
  • title – str The Title to give the plot
  • qt – bool If true, plots with qt. Else creates an HTML page with bokeh.
  • exec_qt – bool If False, does not run the event loop for pyqtgraph.
Returns :
None

Examples

>>> # Plot SWIA H+ density.
>>> pydivide.plot(insitu,parameter='swia.hplus_density')
>>> # Plot SWIA H+ density and altitude in the same window.
>>> pydivide.plot(insitu,parameter=['swia.hplus_density', 'spacecraft.altitude'],sameplot=True)
Bokeh Plot

Standard Plots

pydivide.standards(kp, list_plots=False, all_plots=False, euv=False, mag_mso=False, mag_geo=False, mag_cone=False, mag_dir=False, ngims_neutral=False, ngims_ions=False, eph_angle=False, eph_geo=False, eph_mso=False, swea=False, sep_ion=False, sep_electron=False, wave=False, plasma_den=False, plasma_temp=False, swia_h_vel=False, static_h_vel=False, static_o2_vel=False, static_flux=False, static_energy=False, sun_bar=False, solar_wind=False, ionosphere=False, sc_pot=False, altitude=False, title='Standard Plots', qt=True)[source]

Generate all or a subset of 25 standardized plots, created from insitu KP data on the MAVEN SDC website

Parameters:
  • kp – dict insitu kp data structure/dictionary read from file(s)
  • mag_mso – bool magnetic field, MSO coordinates
  • mag_geo – bool magnetic field, geographic coordinates
  • mag_cone – bool magnetic clock and cone angles, MSO coordinates
  • mag_dir – bool magnetic field, radial/horizontal/northward/eastward components
  • ngims_neutral – bool neutral atmospheric component densities
  • ngims_ions – bool ionized atmospheric component densities
  • eph_angle – bool spacecraft ephemeris information
  • eph_geo – bool spacecraft position, geographic coordinates
  • eph_mso – bool spacecraft position, MSO coordinates
  • swea – bool electron parallel/anti-parallel fluxes
  • sep_ion – bool ion energy flux
  • sep_electron – bool electron energy flux
  • wave – bool electric field wave power
  • plasma_den – bool plasma density
  • plasma_temp – bool plasma temperature
  • swia_h_vel – bool H+ flow velocity, SWIA MSO coordinates
  • static_h_vel – bool H+ flow velocity, STATIC MSO coordinates
  • static_o2_vel – bool O2+ flow velocity, STATIC MSO coordinates
  • static_flux – bool H+/He++ and pick-up ion omni-directional flux
  • static_energy – bool H+/He++ and pick-up ion characteristic energy
  • sun_bar – bool MAVEN sunlight indicator
  • solar_wind – bool solar wind dynamic pressure
  • ionosphere – bool electron spectrum shape parameter
  • altitude – bool spacecraft altitude
  • sc_pot – bool spacecraft potential
  • list – bool Lists all Key Parameters instead of plotting
  • title – str The Title to give the plot
  • qt – bool If true, plots with qt. Else creates an HTML page with bokeh.
  • exec_qt – bool If False, does not run the event loop for pyqtgraph.
Returns :
None
Examples :
>>> # Solar Orbital coordinates (x, y, z, magnitude), standard spacecraft ephemeris
>>> # information (sub-spacecraft lat/lon, subsolar lat/lon, local solar time, solar
>>> # zenith angle, Mars season)
>>> # omni-directional flux.
>>> insitu,iuvs = pydivide.read(input_time=['2017-06-19','2017-06-20'])
>>> pydivide.standards(insitu, mag_mso=True, eph_angle=True, title='Example Title')
Bokeh Plot

Map Plots

pydivide.map2d(kp, parameter=None, time=None, list=False, subsolar=False, mso=False, basemap=None, alpha=None, title='MAVEN Mars', qt=True, exec_qt=True)[source]

Produces a 2D map of Mars, either in the planetocentric or MSO coordinate system, with the MAVEN orbital projection and a variety of basemaps. Spacecraft orbital path may be colored by a given insitu KP data value

Parameters:
  • kp – dict insitu kp data structure/dictionary read from file(s)
  • parameter – list of str/int The parameter(s) to be plotted. Can be provided as integers (by index) or strings (by name: inst.obs). If a single parameter is provided, it must be an int or str. If several are provided it must be a list. A list may contain a mixture of data types.
  • time – list of str Two-element list of strings or integers indicating the range of Time to be plotted. At present, there are no checks on whether provided Times are within provided data
  • color_table – str Specifies color table to use for plotting
  • subsolar – bool Plot path of subsolar point
  • mso – bool Plot using MSO map projection
  • map_limit – list Set the bounding box on the map in lat/lon coordinates [x0,y0,x1,y1]
  • basemap – str Name of the basemap on which the spacecraft data with be overlaid. Choices are • ‘mdim’: Mars Digital Image Model • ‘mola’: Mars Topography (color) • ‘mola_bw’: Mars Topography (black and white) • ‘mag’: Mars Crustal Magnetism • ‘<dir_path>/file.png’: User-defined basemap
  • sameplot – bool if True, put all curves on same axes if False, generate new axes for each plot
  • list – bool Lists all Key Parameters instead of plotting
  • title – str The Title to give the plot
  • ylog – bool Displays the log of the y axis
  • qt – bool If true, plots with qt. Else creates an HTML page with bokeh.
  • exec_qt – bool If False, does not run the event loop for pyqtgraph.
Returns :
None

Examples

>>> # Plot spacecraft altitude along MAVEN surface orbital track.
>>> pydivide.map2d(insitu, 'spacecraft.altitude')
>>> # Plot spacecraft altitude along MAVEN surface orbital track using MOLA altimetry basemap; plot subsolar point path.
>>> pydivide.map2d(insitu, 'spacecraft.altitude', basemap='mola', subsolar=True)