Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jeff Klenzing <[email protected]>
  • Loading branch information
t-esman and jklenzing authored Sep 6, 2023
1 parent fb5c4f9 commit af0c6e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 68 deletions.
45 changes: 10 additions & 35 deletions pysatNASA/instruments/maven_insitu.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# -*- coding: utf-8 -*-
"""Module for the MAVEN insitu instrument.
Created by: Teresa Esman, NPP at GSFC
Supports the Key parameter (kp) data from multiple instruments
Supports the in situ Key Parameter (kp) data from multiple instruments
onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite.
Accesses local data in CDF format.
Downlaods from CDAWeb.
Downloads from CDAWeb.
Properties
----------
Expand All @@ -17,23 +15,25 @@
'insitu'
tag
None supported
inst_id
None supported
Examples
--------
::
import pysat
from pysat.utils import registry
registry.register_by_module(pysatNASA.instruments)
insitu = pysat.Instrument(platform='MAVEN', name='insitu')
insitu = pysat.Instrument(platform='maven', name='insitu')
insitu.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31))
insitu.load(2020, 1, use_header = True)
insitu.load(2020, 1, use_header=True)
"""

import datetime as dt
import functools

import pysat
from pysat.instruments.methods import general as mm_gen
from pysatNASA.instruments.methods import cdaweb as cdw
Expand Down Expand Up @@ -62,15 +62,8 @@
init = functools.partial(mm_nasa.init, module=mm_mvn, name=name)


def clean(self):
"""Clean MAVEN insitu kp data to the specified level.
Note
----
Supports 'none'. Method is
not called by pysat if clean_level is None or 'none'.
"""
return
# Use default clean
clean = mm_nasa.clean


# ----------------------------------------------------------------------------
Expand All @@ -96,24 +89,6 @@ def clean(self):
supported_tags=download_tags)


def init(self):
"""Initialize the Instrument object with instrument specific values.
Runs once upon instantiation.
Parameters
-----------
self : pysat.Instrument
Instrument class object
"""

pysat.logger.info(mm_mvn.ackn_str)
self.acknowledgements = mm_mvn.ackn_str
self.references = mm_mvn.references

return


# Set the load routine
load = functools.partial(cdw.load, epoch_name='epoch',
pandas_format=pandas_format, use_cdflib=True)
39 changes: 6 additions & 33 deletions pysatNASA/instruments/maven_sep.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
"""Module for the MAVEN insitu instrument.
Created by: Teresa Esman, NPP at GSFC
Supports the Solar Energetic Particle (SEP) data from
onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite.
Expand All @@ -17,14 +15,14 @@
'sep'
tag
's1','s2'
inst_id
None supported
Examples
--------
::
import pysat
from pysat.utils import registry
registry.register_by_module(pysatNASA.instruments)
insitu = pysat.Instrument(platform='MAVEN', name='insitu')
Expand All @@ -34,6 +32,7 @@

import datetime as dt
import functools

import pysat
from pysat.instruments.methods import general as mm_gen
from pysatNASA.instruments.methods import cdaweb as cdw
Expand Down Expand Up @@ -62,18 +61,8 @@
init = functools.partial(mm_nasa.init, module=mm_mvn, name=name)


def clean(self):
"""Clean MAVEN mag data to the specified level.
Note
----
Supports 'clean', 'dusty', 'dirty', 'none'. Method is
not called by pysat if clean_level is None or 'none'.
"""

return
# Use default clean
clean = mm_nasa.clean


# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -116,22 +105,6 @@ def clean(self):
supported_tags=download_tags)


def init(self):
"""Initialize the Instrument object with instrument specific values.
Runs once upon instantiation.
Parameters
-----------
self : pysat.Instrument
Instrument class object
"""

pysat.logger.info(mm_mvn.ackn_str)
self.acknowledgements = mm_mvn.ackn_str
self.references = mm_mvn.references

return


# Set the load routine
Expand Down

0 comments on commit af0c6e8

Please sign in to comment.