spacepy.pybats.rim.OvalDebugFile¶
- class spacepy.pybats.rim.OvalDebugFile(infile, *args, **kwargs)[source]¶
The auroral oval calculations in RIM may spit out special debug files that are extremely useful. This class handles reading and plotting the data contained within those files.
- __init__(infile, *args, **kwargs)[source]¶
Base class for “Data Model” representation data
Abstract method, reimplement
- Attributes:
- attrsdict
dictionary of the attributes of the SpaceData object
Methods
add_oval_line
(time, *args, **kwargs)Adds the location of the auroral oval at time time as a line plot on to target, which must be a Matplotlib figure/axes.
get_oval
(time[, interp])Given a datetime, time, interpolate the oval position to that time.
Attributes
- add_oval_line(time, *args, **kwargs)[source]¶
Adds the location of the auroral oval at time time as a line plot on to target, which must be a Matplotlib figure/axes.
If target not given, a new axes object is created. If target is not an existing axes object, a new axes object is created and customized to be an ionosphere polar plot.
Extra arguments/kwargs are sent to
plot()
.- Parameters:
- timeinteger or datetime
Sets the time at which to plot the line. If an integer is used, the integer is used to index the internal array naively. If a datetime object is given and is within the bounds of self[‘time’], the oval location will be interpolated to time. Control of the interpolation happens via the interp keyword.
- Returns:
- figmatplotlib figure object
- axmatplotlib axes object
- linematplotlib line object
- Other Parameters:
- targetFigure or Axes
If None (default), a new figure is generated from scratch. If a matplotlib Figure object, a new axis is created to fill that figure. If a matplotlib Axes object, the plot is placed into that axis.
- locint
Use to specify the subplot placement of the axis (e.g. loc=212, etc.) Used if target is a Figure or None. Default 111 (single plot).
- interpbool
Control the behavior of time interpolation when the time argument is given as a datetime object. Defaults to True, meaning that oval location is interpolated in time.
Examples
>>>
- get_oval(time, interp=True)[source]¶
Given a datetime, time, interpolate the oval position to that time. If time is outside the range of self[‘time’], an exception will be raised. Linear interpolation is used unless kwarg interp is False. In that case, the value of the oval nearest to time will be used without interpolation.
- Parameters:
- timedatetime.datetime
The time at which the oval is requested.
- Returns:
- ovalnumpy.ndarray
Oval location at time time in radians. Zero corresponds to local noon.
- Other Parameters:
- interpbool
Set interpolation behavior. If True, linear interpolation is used. If False, the oval location nearest to time is used without interpolation.
Examples
>>>
- attrs: collections.abc.Mapping¶