From 106aeb4c3d2d62c6bb67d86f8104edb23eabfe3a Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:02:34 -0400 Subject: [PATCH] Apply suggestions from code review Removal of the sep tag ''. Change of insitu to insitu_kp. Resulting necessary STY changes for flake. --- pysatNASA/instruments/__init__.py | 2 +- .../{maven_insitu.py => maven_insitu_kp.py} | 4 ++-- pysatNASA/instruments/maven_sep.py | 14 ++++++-------- pysatNASA/instruments/methods/maven.py | 9 +++++---- 4 files changed, 14 insertions(+), 15 deletions(-) rename pysatNASA/instruments/{maven_insitu.py => maven_insitu_kp.py} (96%) diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index 6f49e3ca..4ffef724 100644 --- a/pysatNASA/instruments/__init__.py +++ b/pysatNASA/instruments/__init__.py @@ -11,7 +11,7 @@ 'de2_lang', 'de2_nacs', 'de2_rpa', 'de2_vefi', 'de2_wats', 'dmsp_ssusi', 'formosat1_ivm', 'icon_euv', 'icon_fuv', 'icon_ivm', 'icon_mighti', - 'igs_gps', 'iss_fpmu', 'jpl_gps', 'maven_insitu', + 'igs_gps', 'iss_fpmu', 'jpl_gps', 'maven_insitu_kp', 'maven_mag', 'maven_sep', 'omni_hro', 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] diff --git a/pysatNASA/instruments/maven_insitu.py b/pysatNASA/instruments/maven_insitu_kp.py similarity index 96% rename from pysatNASA/instruments/maven_insitu.py rename to pysatNASA/instruments/maven_insitu_kp.py index dda55d99..0a529e6b 100644 --- a/pysatNASA/instruments/maven_insitu.py +++ b/pysatNASA/instruments/maven_insitu_kp.py @@ -24,7 +24,7 @@ :: import pysat - insitu = pysat.Instrument(platform='maven', name='insitu') + insitu = pysat.Instrument(platform='maven', name='insitu_kp') insitu.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) insitu.load(2020, 1, use_header=True) @@ -42,7 +42,7 @@ # Instrument attributes platform = 'maven' -name = 'insitu' +name = 'insitu_kp' tags = {'': ''} inst_ids = {'': ['']} diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index cf269cdd..3ce0ca4b 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -23,7 +23,7 @@ :: import pysat - insitu = pysat.Instrument(platform='MAVEN', name='insitu') + insitu = pysat.Instrument(platform='maven', name='sep', inst_id = 's1') insitu.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) insitu.load(2020, 1, use_header = True) """ @@ -42,7 +42,7 @@ platform = 'maven' name = 'sep' tags = {'': ''} -inst_ids = {'': ['', 's1', 's2']} +inst_ids = {'s1': [''], 's2': ['']} pandas_format = False @@ -74,9 +74,8 @@ fname2 = ''.join(('mvn_sep_l2_s2-cal-svy-full_{year:04d}{month:02d}{day:02d}_', 'v{version:02d}_r{revision:02d}.cdf')) -supported_tags = {'': {'': fname, - 's1': fname, - 's2': fname2}} +supported_tags = {'s1': {'': fname}, + 's2': {'': fname2}} list_files = functools.partial(mm_gen.list_files, supported_tags=supported_tags) @@ -90,9 +89,8 @@ '/{year:04d}/{month:02d}')), 'fname': fname2} -download_tags = {'': {'': basic_tag, - 's1': basic_tag, - 's2': basic_tag2}} +download_tags = {'s1': {'': basic_tag}, + 's2': {'': basic_tag2}} # Set the download routine download = functools.partial(cdw.download, supported_tags=download_tags) diff --git a/pysatNASA/instruments/methods/maven.py b/pysatNASA/instruments/methods/maven.py index 86ae78e0..69cec2ae 100644 --- a/pysatNASA/instruments/methods/maven.py +++ b/pysatNASA/instruments/methods/maven.py @@ -10,10 +10,11 @@ ' The Mars Atmosphere and Volatile Evolution', '(MAVEN) Mission. Space Sci Rev 195, 3–48 (2015).', ' https://doi.org/10.1007/s11214-015-0139-x')) -refs = {'insitu': ''.join(('Jakosky, B.M., Lin, R.P., Grebowsky, J.M. et al.', - ' The Mars Atmosphere and Volatile Evolution', - '(MAVEN) Mission. Space Sci Rev 195, 3–48 (2015).', - ' https://doi.org/10.1007/s11214-015-0139-x')), +refs = {'insitu_kp': ''.join(('Jakosky, B.M., Lin, R.P., Grebowsky, J.M. et', + ' al. The Mars Atmosphere and Volatile Evolution', + '(MAVEN) Mission. Space Sci Rev', + ' 195, 3–48 (2015).', + ' https://doi.org/10.1007/s11214-015-0139-x')), 'mag': ''.join(('Connerney, J., and P. Lawton, MAVEN MAG', ' PDS Archive SIS - This document ', 'describes the format and content of the MAVEN',