irfpy.vexpvat.ql.panels

Most of the functions assumes the irfpy.vexpvat.vexspice module is initialized prior.

>>> from irfpy.vexpvat import vexspice as vs
>>> vs.init()
class irfpy.vexpvat.ql.panels.Panel_xr_orbit(t0=None, t1=None, ax=None, frame='VSO')[source]

Bases: object

Create a matplotlib axis.

Usage

  1. Import needed modules

import datetime
import matplotlib.pyplot as plt
from irfpy.util import utc

import irfpy.vexpvat.vexspice as vs
vs.init()

from irfpy.vexpvat.ql import Panel_xr_orbit

2-a. To plot a simple, default figure

t0 = datetime.datetime(2006, 12, 1, 5, 0)
t1 = datetime.datetime(2006, 12, 1, 8, 0)
xrplot = Panel_xr_orbit(t0, t1)

2-b. To add some more data points, use the add_orbit_curve(), add_ticks(), add_timelabel().

t2 = datetime.datetime(2006, 12, 1, 14, 0)
t3 = datetime.datetime(2006, 12, 1, 16, 0)
xrplot.add_orbit_curve(t2, t3, color='b')
xrplot.add_ticks(utc.dtlinspace(t2, t3, 4), color='b', marker='x')
xrplot.add_timelabel(utc.dtlinspace(t2, t3, 4), color='b', datefmt='(%H:%M)', va='center', fontsize=6)

2-c. To add some cosmetics, use xrplot.ax as a normal matplotlib axis object.

ax = xrplot.ax
ax.set_xlim(-4, 4)    # Change the limit, for example, as usual for matplotlib.
ax.text(0, 0, 'VENUS', color='k')
  1. You can embed the panel to a figure.

fig = plt.figure()
ax = fig.add_subplot(2, 2, 2)    # Plot goes to the top-right
xrplot2 = Panel_xr_orbit(ax=ax)
xrplot2.add_orbit_curve(t1, t2)
xrplot2.add_venus()
add_orbit_curve(t0, t1, resolution=180, target='VEX', **kwds)[source]
add_venus(facecolor='y', edgecolor='none', **kwds)[source]
add_ticks(tlist, target='VEX', marker='o', **kwds)[source]
add_timelabel(tlist, target='VEX', datefmt='  %T', **kwds)[source]
add_icb(ls=':', color='y', **kwds)[source]
add_bs(ls=':', color='y', **kwds)[source]
irfpy.vexpvat.ql.panels.axis_object(t, target, ax=None, marker='o', color='k', **kwds)[source]

Add a point to the axis!

Parameters
  • t – Time

  • ax – Axis object

  • kwds – Given to axes.text function

Returns

Axis object

irfpy.vexpvat.ql.panels.axis_venus_limb(t, ax=None, color='y', **kwds)[source]
irfpy.vexpvat.ql.panels.axis_venus_latitudes(t, latitudes=[- 90, - 60, - 30, 0, 30, 60, 90], resolution=60, ax=None, color='y', **kwds)[source]
irfpy.vexpvat.ql.panels.axis_venus_longitudes(t, longitudes=[- 180, - 135, - 90, - 45, 0, 45, 90, 135], resolution=45, ax=None, color='y', **kwds)[source]