Added a new instrument for the DMSP SSUSI EDR-Aurora data. While adding this instrument support, discovered a bug in the general CDAWeb functions.
Type of change
Please delete options that are not relevant.
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
This change requires a documentation update
How Has This Been Tested?
import datetime as dt
import matplotlib.pyplot as plt
import pysat
import pysatNASA
# Initalize the instrument, download and load the data. Loading will bring up logger warnings from the pysat function
# that aren't important in this instance
ssusi = pysat.Instrument(inst_module=pysatNASA.instruments.dmsp_ssusi, tag='edr-aurora', inst_id='f17')
ssusi.download(start=dt.datetime(2015, 1, 1))
ssusi.load(date=dt.datetime(2015, 1, 1))
# Create a plot like the one shown here
fig = plt.figure()
axs = fig.add_subplot(212, projection='polar')
axn = fig.add_subplot(211, projection='polar')
dvar = 'SOUTH_POLAR_GEOGRAPHIC_LONGITUDE'
lvar = 'SOUTH_POLAR_GEOGRAPHIC_LATITUDE'
ndvar = 'NORTH_POLAR_GEOGRAPHIC_LONGITUDE'
nlvar = 'NORTH_POLAR_GEOGRAPHIC_LATITUDE'
# Replace colors and markers with a list of colors and markers
for i, dtime in enumerate(ssusi.index):
axs.plot(np.radians(ssusi[dvar][i]), 90 + ssusi[lvar][i], '.', label='{:}'.format(dtime), color='k')
axn.plot(np.radians(ssusi[ndvar][i]), 90 - ssusi[nlvar][i], '.', color='k')
# Do various formatting to make things look nice
Test Configuration
Operating system: OS X Big Sur
Version number: Python 3.8
Any details about your local setup that are relevant: develop branch of pysat
Checklist:
[x] Make sure you are merging into the develop (not main) branch
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
[x] Add a note to CHANGELOG.md, summarizing the changes
[x] Update zenodo.json file for new code contributors
The warning is what I couldn't get rid of. The error you're getting is from a mistake in the sample code (now fixed). I addressed the extra space concern.
Description
Added a new instrument for the DMSP SSUSI EDR-Aurora data. While adding this instrument support, discovered a bug in the general CDAWeb functions.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test Configuration
Checklist:
develop
(notmain
) branchCHANGELOG.md
, summarizing the changes