spacepy.pybats.bats.GeoIndexFile

class spacepy.pybats.bats.GeoIndexFile(filename, keep_case=True, *args, **kwargs)[source]

Geomagnetic Index files are a specialized BATS-R-US output that contain geomagnetic indices calculated from simulated ground-based magnetometers. Currently, the only index instituted is Kp through the faKe_p setup. Future work will expand the system to include Dst, AE, etc.

GeoIndFiles are a specialized subclass of pybats.LogFile. It includes additional methods to quickly visualize the output, perform data-model comparisons, and more.

__init__(filename, keep_case=True, *args, **kwargs)[source]

Load ascii file located at self.attrs[‘file’].

Methods

add_ae_quicklook([target, loc, label, ...])

Similar to "dst_quicklook"-type functions, this method fetches observed AE indices from the web and plots it alongside the corresponding AE read from the GeoInd file.

add_kp_quicklook([target, loc, label, ...])

Similar to "dst_quicklook"-type functions, this method fetches observed Kp from the web and plots it alongside the Kp read from the GeoIndex file.

fetch_obs_ae()

Fetch the observed AE index for the time period covered in the logfile.

fetch_obs_kp()

Fetch the observed Kp index for the time period covered in the logfile.

Attributes

add_ae_quicklook(target=None, loc=111, label=None, plot_obs=False, val='AE', add_legend=True, obs_kwargs={'c': 'k', 'ls': '--', 'lw': 1.5}, **kwargs)[source]

Similar to “dst_quicklook”-type functions, this method fetches observed AE indices from the web and plots it alongside the corresponding AE read from the GeoInd file. Because there are four AE-like indices (AL, AU, AE, and AO), the kwarg val specifies which to plot (default is AE).

Usage: >>> obj.ae_quicklook(target=SomeMplTarget) The target kwarg works like in other PyBats plot functions: it can be a figure, an axes, or None, and it determines where the plot is placed.

Other kwargs customize the line. Extra kwargs are passed to pyplot.plot

Observed AE can be added via the plot_obs kwarg. AE is automatically fetched from the Kyoto World Data Center via the spacepy.pybats.kyoto module. The associated spacepy.pybats.kyoto.KyotoAe object, which holds the observed AE, is stored as self.obs_kp for future use. The observed line can be customized via the obs_kwargs kwarg, which is a dictionary of plotting keyword arguments.

add_kp_quicklook(target=None, loc=111, label=None, plot_obs=False, add_legend=True, obs_kwargs={'c': 'k', 'ls': '--', 'lw': 2}, **kwargs)[source]

Similar to “dst_quicklook”-type functions, this method fetches observed Kp from the web and plots it alongside the Kp read from the GeoIndex file.

Usage: >>> obj.kp_quicklook(target=SomeMplTarget) The target kwarg works like in other PyBats plot functions: it can be a figure, an axes, or None, and it determines where the plot is placed.

Other kwargs customize the line. Label defaults to fa$K$e$_{P}$, extra kwargs are passed to pyplot.plot.

Observed Kp can be added via the plot_obs kwarg. Kp is automatically fetched from the Kyoto World Data Center via the spacepy.pybats.kyoto module. The associated spacepy.pybats.kyoto.KyotoKp object, which holds the observed Kp, is stored as self.obs_kp for future use. The observed line can be customized via the obs_kwargs kwarg, which is a dictionary of plotting keyword arguments.

fetch_obs_ae()[source]

Fetch the observed AE index for the time period covered in the logfile. Return True on success.

Observed AE is automatically fetched from the Kyoto World Data Center via the spacepy.pybats.kyoto module. The associated spacepy.pybats.kyoto.KyotoAe object, which holds the observed AE, is stored as self.obs_ae for future use.

fetch_obs_kp()[source]

Fetch the observed Kp index for the time period covered in the logfile. Return True on success.

Observed Kp is automatically fetched from the Kyoto World Data Center via the spacepy.pybats.kyoto module. The associated spacepy.pybats.kyoto.KyotoKp object, which holds the observed kp, is stored as self.obs_kp for future use.

attrs: collections.abc.Mapping