spacepy.ae9ap9¶
Module for reading and dealing with AE9AP9 data files.
See https://www.vdl.afrl.af.mil/programs/ae9ap9/ to download the model. This is not a AE9AP9 runner.
Authors: Brian Larsen, Steve Morley Institution: Los Alamos National Laboratory Contact: balarsen@lanl.gov
Copyright 2015 Los Alamos National Security, LLC.
This module provides a convenient class for handling data from AE9/AP9 (and legacy models provided by the software).
Though the class is derived from SpacePy’s SpaceData, the class also provides several methods targeted at the AE9/AP9 output. Additional functions for working with the data are provided.
Functions
|
combine files at different percentiles into one file with the spectra at different percentiles for easy plotting and analysis |
|
given an AE9AP9 output test file parse the header and return the information in a dictionary |
|
read a model generated file into a datamodel.SpaceData object |
Classes
|
Dictionary-like container for AE9/AP9/SPM data, derived from SpacePy's datamodel |
- spacepy.ae9ap9.combinePercentiles(files, timeframe='all', verbose=True)[source]¶
combine files at different percentiles into one file with the spectra at different percentiles for easy plotting and analysis
NOTE: Requires pandas for any timeframe other than ‘all’
- Parameters:
- filesstr
Filenames of the percentile files
- Returns:
- out
SpaceData
Combined output spectra of the file
- out
- Other Parameters:
- timeframestr
Timeframe to average the input spectra over (either ‘all’ or a pandas understoop resample() time
- verboseboolean
Print out information while reading the files
- spacepy.ae9ap9.parseHeader(fname)[source]¶
given an AE9AP9 output test file parse the header and return the information in a dictionary
Changed in version 0.3.0.
The underlying AE9AP9 model changed the ephem file format and this reader was updated to match. Reading the old format will issue DeprecationWarning.
- Parameters:
- fnamestr
filename of the file
- Returns:
- outdict
Dictionary of the header information in the file
- spacepy.ae9ap9.readFile(fname, comments='#')[source]¶
read a model generated file into a datamodel.SpaceData object
- Parameters:
- fnamestr
filename of the file
- Returns:
- out
SpaceData
Data contained in the file
- out
- Other Parameters:
- commentsstr (optional)
String that is the comments in the data file
Examples
>>> from spacepy import ae9ap9 >>> ae9ap9.readFile('ephem_sat.dat').tree(verbose=1) + |____Epoch (spacepy.datamodel.dmarray (121,)) |____Coords (spacepy.datamodel.dmarray (121, 3)) |____MJD (spacepy.datamodel.dmarray (121,)) |____posComp (spacepy.datamodel.dmarray (3,))