Skip to content

Commit

Permalink
Merge pull request #155 from pysat/enh/de2
Browse files Browse the repository at this point in the history
ENH: Add DE2 instruments
  • Loading branch information
jklenzing committed Apr 4, 2023
2 parents 8147f59 + 00a52b3 commit 2bdcd8b
Show file tree
Hide file tree
Showing 9 changed files with 269 additions and 24 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* ACE MAG
* ACE SIS
* ACE SWEPAM
* TIMED GUVI L1C intensity data and L2 EDR-Aurora data
* Type of sensor source handled by inst_id with options of
spectrograph, imaging
* Resolution of dataset handled by tag with low, high
* DE2 Fabry-Perot Interferometer (FPI)
* DE2 Vector Electric Field Instrument (VEFI) and magnetometer
* DMSP SSUSI EDR-Aurora data
* TIMED GUVI
* Add TIMED GUVI platform to support L1C intensity datasets.
* Type of sensor source handled by inst_id with options of
spectrograph, imaging
* Resolution of dataset handled by tag with
low, high
* Added CDAWeb methods that can use cdasws to get the remote file list
* Bug Fixes
* Updated CDAWeb routines to allow for data stored by year/day-of-year
Expand Down
2 changes: 2 additions & 0 deletions docs/supported_constellations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ DE2

The Dynamics Explorer 2 spacecraft. Includes the instruments

- :ref:`de2_fpi`
- :ref:`de2_lang`
- :ref:`de2_nacs`
- :ref:`de2_rpa`
- :ref:`de2_wats`
- :ref:`de2_vefi`

.. automodule:: pysatNASA.constellations.de2
:members:
Expand Down
16 changes: 16 additions & 0 deletions docs/supported_instruments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ C/NOFS VEFI
.. automodule:: pysatNASA.instruments.cnofs_vefi
:members:

.. _de2_fpi:

DE2 FPI
--------

.. automodule:: pysatNASA.instruments.de2_fpi
:members:

.. _de2_lang:

DE2 LANG
Expand All @@ -81,6 +89,14 @@ DE2 RPA
.. automodule:: pysatNASA.instruments.de2_rpa
:members:

.. _de2_vefi:

DE2 VEFI
--------

.. automodule:: pysatNASA.instruments.de2_vefi
:members:

.. _de2_wats:

DE2 WATS
Expand Down
4 changes: 3 additions & 1 deletion pysatNASA/constellations/de2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
from pysatNASA import instruments


fpi = pysat.Instrument(inst_module=instruments.de2_fpi)
lang = pysat.Instrument(inst_module=instruments.de2_lang)
nacs = pysat.Instrument(inst_module=instruments.de2_nacs)
rpa = pysat.Instrument(inst_module=instruments.de2_rpa)
wats = pysat.Instrument(inst_module=instruments.de2_wats)
vefi = pysat.Instrument(inst_module=instruments.de2_vefi)

instruments = [lang, nacs, rpa, wats]
instruments = [fpi, lang, nacs, rpa, wats, vefi]
4 changes: 2 additions & 2 deletions pysatNASA/instruments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pysatNASA.instruments import methods # noqa F401

__all__ = ['ace_epam_l2', 'ace_mag_l2', 'ace_sis_l2', 'ace_swepam_l2',
'cnofs_ivm', 'cnofs_plp', 'cnofs_vefi',
'de2_lang', 'de2_nacs', 'de2_rpa', 'de2_wats',
'cnofs_ivm', 'cnofs_plp', 'cnofs_vefi', 'de2_fpi',
'de2_lang', 'de2_nacs', 'de2_rpa', 'de2_vefi', 'de2_wats',
'dmsp_ssusi', 'formosat1_ivm',
'icon_euv', 'icon_fuv', 'icon_ivm', 'icon_mighti',
'iss_fpmu', 'jpl_gps', 'omni_hro', 'ses14_gold',
Expand Down
107 changes: 107 additions & 0 deletions pysatNASA/instruments/de2_fpi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# -*- coding: utf-8 -*-
"""The DE2 FPI instrument.
Supports the Fabry-Perot Interferometer (FPI) instrument on Dynamics Explorer 2
(DE2).
From CDAWeb:
The Fabry-Perot Interferometer (FPI) was a high-resolution remote sensing
instrument designed to measure the thermospheric temperature, meridional wind,
and density of the following metastable atoms: atomic oxygen (singlet S and D)
and the 2P state of ionic atomic oxygen. The FPI performed a wavelength analysis
on the light detected from the thermospheric emission features by spatially
scanning the interference fringe plane with a multichannel array detector. The
wavelength analysis characterized the Doppler line profile of the emitting
species. A sequential altitude scan performed by a commandable horizon scan
mirror provided a cross-sectional view of the thermodynamic and dynamic state of
the thermosphere below the DE 2 orbit. The information obtained from this
investigation was used to study the dynamic response of the thermosphere to the
energy sources caused by magnetospheric electric fields and the absorption of
solar ultraviolet light in the thermosphere. The instrument was based on the
visible airglow experiment (VAE) used in the AE program. The addition of a
scanning mirror, the Fabry-Perot etalon, an image plane detector, and a
calibration lamp were the principal differences. Interference filters isolated
lines at (in Angstroms) 5577, 6300, 7320, 5896, and 5200. The FPI had a field of
view of 0.53 deg (half-cone angle). More details are found in P. B. Hays et al.,
Space Sci. Instrum., v. 5, n. 4, p. 395, 1981. From February 16, 1982 to
September 11, 1982 the DE satellite was inverted and the FPI measured galactic
emissions.
Properties
----------
platform
'de2'
name
'fpi'
inst_id
None Supported
tag
None Supported
Warnings
--------
- Currently no cleaning routine.
References
----------
Hays, P B, Killeen, T L, and Kennedy, B C. "Fabry-Perot interferometer on
Dynamics Explorer". Space Sci. Instrum., 5, 395-416, 1981.
"""

import datetime as dt
import functools

from pysat.instruments.methods import general as mm_gen

from pysatNASA.instruments.methods import cdaweb as cdw
from pysatNASA.instruments.methods import de2 as mm_de2
from pysatNASA.instruments.methods import general as mm_nasa

# ----------------------------------------------------------------------------
# Instrument attributes

platform = 'de2'
name = 'fpi'
tags = {'': '8 s cadence Fabry-Perot Interferometer data'}
inst_ids = {'': ['']}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {'': dt.datetime(1983, 1, 1)}}

# ----------------------------------------------------------------------------
# Instrument methods


# Use standard init routine
init = functools.partial(mm_nasa.init, module=mm_de2, name=name)

# No cleaning, use standard warning function instead
clean = mm_nasa.clean_warn

# ----------------------------------------------------------------------------
# Instrument functions
#
# Use the default CDAWeb and pysat methods

# Set the list_files routine
fname = 'de2_neutral8s_fpi_{year:04d}{month:02d}{day:02d}_v{version:02d}.cdf'
supported_tags = {'': {'': fname}}
list_files = functools.partial(mm_gen.list_files,
supported_tags=supported_tags)

# Use the default CDAWeb method
load = cdw.load

# Support download routine
download_tags = {'': {'': 'DE2_NEUTRAL8S_FPI'}}
download = functools.partial(cdw.cdas_download, supported_tags=download_tags)

# Support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.cdas_list_remote_files,
supported_tags=download_tags)
26 changes: 12 additions & 14 deletions pysatNASA/instruments/de2_rpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@
spectrum; and the concentration of H+, He+, O+, and Fe+, and of molecular ions
near perigee.
It includes the DUCT portion of the high resolutiondata from the Dynamics
Explorer 2 (DE-2) Retarding Potential Analyzer (RPA) for the whole DE-2 mission
time period in ASCII format. This version was generated at NSSDC from the
PI-provided binary data (SPIO-00232). The DUCT files include RPA measurements
ofthe total ion concentration every 64 times per second. Due to a failure in
the instrument memory system RPA data are not available from 81317 06:26:40 UT
to 82057 13:16:00 UT. This data set is based on the revised version of the RPA
files that was submitted by the PI team in June of 1995. The revised RPA data
include a correction to the spacecraft potential.
Due to a failure in the instrument memory system RPA data are not available
from 81317 06:26:40 UT to 82057 13:16:00 UT. This data set is based on the
revised version of the RPA files that was submitted by the PI team in June of
1995. The revised RPA data include a correction to the spacecraft potential.
Properties
Expand Down Expand Up @@ -76,13 +71,13 @@

platform = 'de2'
name = 'rpa'
tags = {'': '2 sec cadence RPA data'} # this is the default cadence
inst_ids = {'': ['']}
tags = {'': '2 sec cadence RPA data'}
inst_ids = {'': [tag for tag in tags]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {'': dt.datetime(1983, 1, 1)}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags}}

# ----------------------------------------------------------------------------
# Instrument methods
Expand All @@ -100,8 +95,11 @@
# Use the default CDAWeb and pysat methods

# Set the list_files routine
fname = 'de2_ion2s_rpa_{year:04d}{month:02d}{day:02d}_v{version:02d}.cdf'
supported_tags = {'': {'': fname}}
datestr = '{year:04d}{month:02d}{day:02d}_v{version:02d}'
dataproduct = {'': 'ion2s'}
fname = 'de2_{dp:s}_rpa_{datestr:s}.cdf'
supported_tags = {'': {tag: fname.format(dp=dataproduct[tag], datestr=datestr)
for tag in tags}}
list_files = functools.partial(mm_gen.list_files,
supported_tags=supported_tags)

Expand Down
105 changes: 105 additions & 0 deletions pysatNASA/instruments/de2_vefi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
"""Module for the DE2 VEFI instrument.
From CDAWeb (adpated):
This directory gathers data for the VEFI instrument that flew on the DE 2
spacecraft which was launched on 3 August 1981 into an elliptical orbit with
an altitude range of 300 km to 1000 km and re-entered the atmosphere on
19 February 1983.
dca (NSSDC ID: 81-070B-02C)
This data set contains the averaged (2 samples per second) DC electric fields in
spacecraft coordinates and orbit information in ASCII format.
ac (NSSDC ID: 81-070B-02E)
This data set contains the averaged AC electric field data (1 or 2 points per
second) and orbit information.
References
----------
Maynard, N. C., E. A. Bielecki, H. G. Burdick, Instrumentation for vector
electric field measurements from DE-B, Space Sci. Instrum., 5, 523, 1981.
Properties
----------
platform
'de2'
name
'vefi'
inst_id
None Supported
tag
'dca' or 'ac'
Warnings
--------
- Currently no cleaning routine.
"""

import datetime as dt
import functools

from pysat.instruments.methods import general as mm_gen
from pysatNASA.instruments.methods import cdaweb as cdw
from pysatNASA.instruments.methods import de2 as mm_de2
from pysatNASA.instruments.methods import general as mm_nasa

# ----------------------------------------------------------------------------
# Instrument attributes

platform = 'de2'
name = 'vefi'
tags = {'': '62 ms combination of Electric Field and Magnetometer',
'dca': '500 ms cadence DC Averaged Electric Field data',
'ac': '500 ms cadence AC Electric Field data'}
inst_ids = {'': [tag for tag in tags]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags}}


# ----------------------------------------------------------------------------
# Instrument methods

# Use standard init routine
init = functools.partial(mm_nasa.init, module=mm_de2, name=name)

# No cleaning, use standard warning function instead
clean = mm_nasa.clean_warn

# ----------------------------------------------------------------------------
# Instrument functions
#
# Use the default CDAWeb and pysat methods

# Set the list_files routine
datestr = '{year:04d}{month:02d}{day:02d}_v{version:02d}'
fid = {'': '62ms_vefimagb',
'ac': 'ac500ms_vefi',
'dca': 'dca500ms_vefi'}
fname = 'de2_{fid:s}_{datestr:s}.cdf'
supported_tags = {'': {tag: fname.format(fid=fid[tag], datestr=datestr)
for tag in tags}}
list_files = functools.partial(mm_gen.list_files,
supported_tags=supported_tags)

# Set the load routine
# Forcing use of cdflib as default since pysatCDF has a known issue with vefi
# data. See pysat/pysatCDF#48
load = functools.partial(cdw.load, use_cdflib=True)

# Set the download routine
download_tags = {'': {'': 'DE2_62MS_VEFIMAGB',
'ac': 'DE2_AC500MS_VEFI',
'dca': 'DE2_DCA500MS_VEFI'}}
download = functools.partial(cdw.cdas_download, supported_tags=download_tags)

# Set the list_remote_files routine
list_remote_files = functools.partial(cdw.cdas_list_remote_files,
supported_tags=download_tags)
17 changes: 14 additions & 3 deletions pysatNASA/instruments/methods/de2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

ackn_str = "The Dynamics Explorer 2 satellite data is provided through CDAWeb"

refs = {'lang': ' '.join(('J. P. Krehbiel, L. H. Brace, R. F. Theis, W. H.',
refs = {'fpi': ' '.join(('Hays, P B, Killeen, T L, and Kennedy, B C.',
'"Fabry-Perot interferometer on Dynamics Explorer".',
'Space Sci. Instrum., v. 5, p. 395-416, 1981.')),
'lang': ' '.join(('J. P. Krehbiel, L. H. Brace, R. F. Theis, W. H.',
'Pinkus, and R. B. Kaplan, The Dynamics Explorer 2',
'Langmuir Probe (LANG), Space Sci. Instrum., v. 5,',
'n. 4, p. 493, 1981.')),
Expand All @@ -15,9 +18,17 @@
'Lippincott, D. R. Zuccaro, B. J. Holt, L. H. Harmon,',
'and S. Sanatani, The retarding potential analyzer',
'for dynamics explorer-B, Space Sci. Instrum. 5,',
'503–510 (1981).')),
'503–510 (1981).\n',
'Heelis, R. A., W. B. Hanson, C. R. Lippincott, D. R.',
'Zuccaro, L. L. Harmon, B. J. Holt, J. E. Doherty, R.',
'A. Power, The ion drift meter for Dynamics',
'Explorer-B, Space Sci. Instrum., 5, 511, 1981.')),
'wats': ' '.join(('N. W. Spencer, L. E. Wharton, H. B. Niemann, A. E.',
'Hedin, G. R. Carrignan, J. C. Maurer, The',
'Dynamics Explorer Wind and Temperature Spectrometer',
'Space Sci. Instrum., v. 5, n. 4, p. 417, 1981.'))
'Space Sci. Instrum., v. 5, n. 4, p. 417, 1981.')),
'vefi': ' '.join(('Maynard, N. C., E. A. Bielecki, H. G. Burdick,',
'Instrumentation for vector electric field',
'measurements from DE-B, Space Sci. Instrum., 5,',
'523, 1981.'))
}

0 comments on commit 2bdcd8b

Please sign in to comment.