diff --git a/CHANGELOG.md b/CHANGELOG.md index c4475214..730199a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [0.0.6] - 2024-07-31 * New Instruments * DE2 VEFIMAGB - electric and magnetic field on the same cadence - * MAVEN mag + * MAVEN MAG * MAVEN SEP * MAVEN in situ key parameters * REACH Dosimeter diff --git a/docs/supported_instruments.rst b/docs/supported_instruments.rst index d29d4c3f..70c23ab3 100644 --- a/docs/supported_instruments.rst +++ b/docs/supported_instruments.rst @@ -188,8 +188,8 @@ JPL GPS .. _maven_insitu_kp: -MAVEN INSITU KP ---------------- +MAVEN IN SITU KP +---------------- .. automodule:: pysatNASA.instruments.maven_insitu_kp :members: diff --git a/pyproject.toml b/pyproject.toml index 8213f9ee..5d8f1d4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ "netCDF4", "numpy", "pandas", - "pysat >= 3.1", + "pysat >= 3.2", "requests", "scipy >= 1.4", "xarray" diff --git a/pysatNASA/instruments/de2_vefi.py b/pysatNASA/instruments/de2_vefi.py index 516e39cb..b4c342df 100644 --- a/pysatNASA/instruments/de2_vefi.py +++ b/pysatNASA/instruments/de2_vefi.py @@ -43,7 +43,7 @@ tag '', 'dca', 'ac' inst_id - none supported + None supported Warnings @@ -133,7 +133,9 @@ def load(fnames, tag='', inst_id='', **kwargs): inst_id : str Instrument ID used to identify particular data set to be loaded. This input is nominally provided by pysat itself. (default='') - + **kwargs : unpacked dict + Optional kwargs that will be passed to the + `pysatNASA.instruments.methods.cdaweb.load_xarray` function Returns ------- data : pds.DataFrame @@ -146,6 +148,10 @@ def load(fnames, tag='', inst_id='', **kwargs): Several variables relating to time stored in different formats are dropped. These are redundant and complicate the load procedure. + See Also + -------- + pysatNASA.instruments.methods.cdaweb.load_xarray + """ if tag == '': diff --git a/pysatNASA/instruments/de2_vefimagb.py b/pysatNASA/instruments/de2_vefimagb.py index 83ec6432..65186628 100644 --- a/pysatNASA/instruments/de2_vefimagb.py +++ b/pysatNASA/instruments/de2_vefimagb.py @@ -111,7 +111,7 @@ # Set the load routine def load(fnames, tag='', inst_id='', **kwargs): - """Load DE2 VEFI data. + """Load DE2 VEFI MAG B-field data. This routine is called as needed by pysat. It is not intended for direct user interaction. diff --git a/pysatNASA/instruments/dmsp_ssusi.py b/pysatNASA/instruments/dmsp_ssusi.py index 96cee90d..f23f6a34 100644 --- a/pysatNASA/instruments/dmsp_ssusi.py +++ b/pysatNASA/instruments/dmsp_ssusi.py @@ -130,12 +130,12 @@ def clean(self): def concat_data(self, new_data, combine_times=False, **kwargs): - """Concatonate data to self.data for DMSP SSUSI data. + """Concatenate data to self.data for DMSP SSUSI data. Parameters ---------- new_data : xarray.Dataset or list of such objects - New data objects to be concatonated + New data objects to be concatenated combine_times : bool For SDR data, optionally combine the different datetime coordinates into a single time coordinate (default=False) @@ -154,7 +154,7 @@ def concat_data(self, new_data, combine_times=False, **kwargs): if self.tag in ['sdr-disk', 'sdr2-dist']: time_dims.append('time_auroral') - # Concatonate using the appropriate method for the number of time + # Concatenate using the appropriate method for the number of time # dimensions jhuapl.concat_data(self, time_dims, new_data, combine_times=combine_times, **kwargs) diff --git a/pysatNASA/instruments/maven_insitu_kp.py b/pysatNASA/instruments/maven_insitu_kp.py index d8239e73..ae75c944 100644 --- a/pysatNASA/instruments/maven_insitu_kp.py +++ b/pysatNASA/instruments/maven_insitu_kp.py @@ -7,9 +7,9 @@ # DISTRIBUTION STATEMENT A: Approved for public release. Distribution is # unlimited. # ---------------------------------------------------------------------------- -"""Module for the MAVEN insitu instruments. +"""Module for the MAVEN in situ instruments. -Supports the in situ 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. @@ -32,9 +32,9 @@ :: import pysat - 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) + insitukp = pysat.Instrument(platform='maven', name='insitu_kp') + insitukp.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) + insitukp.load(2020, 1, use_header=True) """ diff --git a/pysatNASA/instruments/maven_mag.py b/pysatNASA/instruments/maven_mag.py index 738d1fed..6f46b77d 100644 --- a/pysatNASA/instruments/maven_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -7,7 +7,7 @@ # DISTRIBUTION STATEMENT A: Approved for public release. Distribution is # unlimited. # ---------------------------------------------------------------------------- -"""Module for the MAVEN mag instrument. +"""Module for the MAVEN magnetometer. Supports the Magnetometer (MAG) onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 9a16945b..123ed2b2 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -7,7 +7,7 @@ # DISTRIBUTION STATEMENT A: Approved for public release. Distribution is # unlimited. # ---------------------------------------------------------------------------- -"""Module for the MAVEN sep instrument. +"""Module for the MAVEN Solar Energetic Particle instrument. Supports the Solar Energetic Particle (SEP) data from onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. @@ -31,9 +31,9 @@ :: import pysat - 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) + sep = pysat.Instrument(platform='maven', name='sep', inst_id='s1') + sep.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) + sep.load(2020, 1, use_header=True) """ diff --git a/pysatNASA/instruments/methods/maven.py b/pysatNASA/instruments/methods/maven.py index 1a00fb74..e935ebd7 100644 --- a/pysatNASA/instruments/methods/maven.py +++ b/pysatNASA/instruments/methods/maven.py @@ -7,12 +7,7 @@ # DISTRIBUTION STATEMENT A: Approved for public release. Distribution is # unlimited. # ---------------------------------------------------------------------------- -"""Provides non-instrument specific routines for MAVEN data. - -Created on Thu Jul 13 11:21:01 2023 - -@author: tesman -""" +"""Provides non-instrument specific routines for MAVEN data.""" ackn_str = ''.join(('Jakosky, B.M., Lin, R.P., Grebowsky, J.M. et al.', ' The Mars Atmosphere and Volatile Evolution', diff --git a/pysatNASA/instruments/reach_dosimeter.py b/pysatNASA/instruments/reach_dosimeter.py index d56cc0c5..914a3783 100644 --- a/pysatNASA/instruments/reach_dosimeter.py +++ b/pysatNASA/instruments/reach_dosimeter.py @@ -14,7 +14,7 @@ The Responsive Environmental Assessment Commercially Hosted (REACH) constellation is collection of 32 small sensors hosted on six orbital planes of -the Iridium-Next space vehicles in low earth orbit. Each sensor contains two +the Iridium-Next space vehicles in Low Earth Orbit. Each sensor contains two micro-dosimeters sensitive to the passage of charged particles from the Earth's radiation belts. There are six distinct dosimeter types spread among the 64 individual sensors, which are unique in shielding and electronic threshold. @@ -33,8 +33,6 @@ '101', '102', '105', '108', '113', '114', '115', '116', '133', '134', '135', '136', '137', '138', '139', '140', '148', '149', '162', '163', '164', '165', '166', '169', '170', '171', '172', '173', '175', '176', '180', '181' - - """ import datetime as dt @@ -69,8 +67,6 @@ # ---------------------------------------------------------------------------- # Instrument methods - - # Use standard init routine init = functools.partial(mm_nasa.init, module=mm_reach, name=name) @@ -84,8 +80,6 @@ def preprocess(self): self.acknowledgements = self.meta.header.Acknowledgement return - - # ---------------------------------------------------------------------------- # Instrument functions # @@ -160,8 +154,6 @@ def load(fnames, tag=None, inst_id=None): meta.header = MetaHeader(new_header) return data, meta - - # Support download routine download_tags = {iid: {'': 'REACH-VID-{iid}_DOSIMETER-L1C'.format(iid=iid)} for iid in inst_ids.keys()} diff --git a/pysatNASA/instruments/timed_guvi.py b/pysatNASA/instruments/timed_guvi.py index 5e1ef6ac..b97c6e5b 100644 --- a/pysatNASA/instruments/timed_guvi.py +++ b/pysatNASA/instruments/timed_guvi.py @@ -138,12 +138,12 @@ def clean(self): def concat_data(self, new_data, combine_times=False, **kwargs): - """Concatonate data to self.data for TIMED GUVI data. + """Concatenate data to self.data for TIMED GUVI data. Parameters ---------- new_data : xarray.Dataset or list of such objects - New data objects to be concatonated + New data objects to be concatenated combine_times : bool For SDR data, optionally combine the different datetime coordinates into a single time coordinate (default=False) @@ -164,7 +164,7 @@ def concat_data(self, new_data, combine_times=False, **kwargs): elif self.tag == 'sdr-spectrograph': time_dims.extend(['time_gaim_day', 'time_gaim_night']) - # Concatonate using the appropriate method for the number of time + # Concatenate using the appropriate method for the number of time # dimensions jhuapl.concat_data(self, time_dims, new_data, combine_times=combine_times, **kwargs)