From 6fb63b8f3e2e82ef178f28496a41f47bc6594d5d Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Thu, 13 Jul 2023 13:32:15 -0400 Subject: [PATCH 01/33] Addition of MAVEN module Download MAVEN data from CDAWeb and use pysatNASA --- pysatNASA/instruments/__init__.py | 2 +- pysatNASA/instruments/methods/mvn.py | 2101 ++++++++++++++++++++++++++ pysatNASA/instruments/mvn_kp.py | 402 +++++ pysatNASA/instruments/mvn_mag.py | 230 +++ 4 files changed, 2734 insertions(+), 1 deletion(-) create mode 100644 pysatNASA/instruments/methods/mvn.py create mode 100644 pysatNASA/instruments/mvn_kp.py create mode 100644 pysatNASA/instruments/mvn_mag.py diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index c3a8bfae..a56c7e99 100644 --- a/pysatNASA/instruments/__init__.py +++ b/pysatNASA/instruments/__init__.py @@ -10,7 +10,7 @@ 'formosat1_ivm', 'icon_euv', 'icon_fuv', 'icon_ivm', 'icon_mighti', 'iss_fpmu', 'jpl_gps', 'omni_hro', 'ses14_gold', - 'timed_saber', 'timed_see'] + 'timed_saber', 'timed_see','mvn_kp','mvn_mag'] for inst in __all__: exec("from pysatNASA.instruments import {x}".format(x=inst)) diff --git a/pysatNASA/instruments/methods/mvn.py b/pysatNASA/instruments/methods/mvn.py new file mode 100644 index 00000000..02d28213 --- /dev/null +++ b/pysatNASA/instruments/methods/mvn.py @@ -0,0 +1,2101 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Thu Jul 13 11:21:01 2023 + +@author: tesman +""" +import datetime as dt +import pysat +import xarray as xr +import pandas as pd + +ackn_str = ' '.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')) +references = ' '.join(('Connerney, J., and P. Lawton, MAVEN MAG PDS Archive SIS - This document ', + 'describes the format and content of the MAVEN Magnetometer (MAG) Planetary', + 'Data System (PDS) data archive. It includes descriptions of the Standard', + 'Data Products and associated metadata, and the volume archive format,', + 'content, and generation pipeline.',' ', + 'Connerney, J.E.P.; Espley, J.; Lawton, P.; Murphy, S.; Odom, J.; Oliversen, R.;', + 'and Sheppard, D., The MAVEN Magnetic Field Investigation, Space Sci Rev,', + 'Vol 195, Iss 1-4, pp.257-291, 2015. doi:10.1007/s11214-015-0169-4', + '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')) + +def scrub_mvn_mag(data): + """Make data labels and epoch compatible with SPASE and pysat. + Parameters + ---------- + data : pandas.Dataframe() + Metadata object containing the default metadata loaded from the sav files. + Returns + ------- + data : pandas.Dataframe() + Replacement data object with compatible variable names and epoch. + """ + + UTC = data['epoch'].values / 1e9 #UTC time from 01-Jan-2000 12:00:00.000, nanoseconds + unix_time = UTC + 946728000 + array_size = len(unix_time) + pdata = pd.DataFrame(index = unix_time) + for key in data.keys(): #For one dimensional arrays + try: + if len(data[key]) == array_size and key not in {'OB_B','POSN','OB_BDPL'}: + pdata[key] = data[key] + except TypeError: + pass + + for key in data.keys(): #For three-dimensional arrays + for coord in {'x','y','z'}: + try: + if len(data[key]) == array_size and key in {'OB_B','POSN','OB_BDPL'}: + if coord == 'x': ind = 0 + if coord == 'y': ind = 1 + if coord == 'z': ind = 2 + pdata[key+'_'+coord] = data[key].values[:,ind] + except TypeError: + pass + + xdata = xr.Dataset(pdata) #Switch to xarray type + data = xdata.rename(dim_0 = 'time') + return data + + +def generate_header(data): + """Generate the meta header info for mvn mag. + + Parameters + ---------- + inst_id : str + The VID of the associated dataset. + epoch : dt.datetime + The epoch of the datafile. Corresponds to the first data point. + Returns + ------- + header : dict + A dictionary compatible with the pysat.meta_header format. Top-level + metadata for the file. + + + Global attributes are used to provide information about the data set as an entity. Together with variables and variable attributes, the global attributes make the data correctly and independently usable by someone not connected with the instrument team, and hence, a good archive product. The global attributes are also used by the CDAWeb Display and Retrieval system. + +The required Global Attributes are listed here with example values. Note that CDF attributes are case-sensitive and must exactly follow what is shown here. Additional Global attributes can be defined but they must start with a letter and can otherwise contain letters, numbers and the unscore character (no other special characters allowed). See Global Attribute Definitions for the full set of defined Global Attributes. + + ATTRIBUTE EXAMPLE VALUE +-------------------------------------------------------------------- + + "Project" { "ISTP>International " - + "Solar-Terrestrial Physics" }. + + This attribute identifies the name of the project and indicates ownership. + For ISTP missions and investigations, the value used is "ISTP>International + Solar-Terrestrial Physics". For the Cluster mission, the value is "STSP Cluster>Solar + Terrestrial Science Programmes, Cluster". + + + + "Source_name" { "GEOTAIL>Geomagnetic Tail" }. + + This attribute identifies the mission or investigation that contains the sensors. + For ISTP, this is the mission name for spacecraft missions or the investigation name for + ground-based or theory investigations. Both a long name and a short name are provided. + This attribute should be single valued. + + + "Discipline" { "Space Physics>Magnetospheric Science" }. + "Data_type" { "K0>Key Parameter" }. + "Descriptor" { "EPI>Energetic Particles" - + " and Ion Composition" }. + This attribute identifies the name of the instrument or sensor + that collected the data + + "Data_version" { "1" }. + "Logical_file_id" { "GE_K0_EPI_19920908_V01" }. + "PI_name" { "D. Williams" }. + "PI_affiliation" { "JHU/APL" }. + "TEXT" { "reference to journal article, URL address" }. + + This attribute is an NSSDC standard global attribute which is a + text description of the experiment whose data is included in the CDF. + A reference to a journal article(s) or to a World Wide Web page describing + the experiment is essential, and constitutes the minimum requirement. + A written description of the data set is also desirable. This attribute + can have as many entries as necessary to contain the desired information. + + "Instrument_type" { "Magnetic Fields (space)" }. + "Mission_group" { "Geotail" }. + "Logical_source" { "GE_K0_EPI" }. + "Logical_source_description" { "Geotail Magnetic Field Key Parameters" }. + +-------------------------------------------------------------------- + + Medium Energy Proton and Electron Detector (MEPED) + """ + header = {'Project': data.Project, + 'Source_name': data.Source_name, + 'Discipline':data.Discipline, + 'Data_type': data.Data_type, + 'Descriptor': data.Descriptor, + 'Data_version': '', + 'Logical_file_id': data.Logical_file_id, + 'PI_name': data.PI_name, + 'PI_affiliation': data.PI_affiliation, + 'TEXT': data.TEXT, + 'Rules_of_use': data.Rules_of_use, + 'Instrument_type': data.Instrument_type, + 'Mission_group': data.Mission_group, + 'Logical_source': data.Logical_source, + 'Logical_source_description': data.Logical_source_description, + 'DOI':'10.17189/1414178', + 'File_naming_convention': data.File_naming_convention, + 'Time_resolution': data.Time_resolution, + 'Generated_by': data.Generated_by, + 'Generation_date': '', + 'Generation_datetime': dt.datetime.today().isoformat(), + 'Acknowledgement': ackn_str, + 'TITLE': data.TITLE, + 'spase_DatasetResourceID': {'spase://NASA/NumericalData', + '/MAVEN/MAG/SunState/Level2', + '/PT1S' }, + 'LINK_TEXT': data.LINK_TEXT, + 'LINK_TITLE': data.LINK_TITLE, + 'HTTP_LINK': data.HTTP_LINK} + + return header + + +def generate_metadata(header_data,data): + """Generate metadata object for mvn mag data compatible with SPASE and pysat. + Parameters + ---------- + header_data : dict + A dictionary compatible with the pysat.meta_header format. Required to + properly initialize metadata. + Returns + ------- + metadata : pandas.Dataframe() + Contains data compatible with SPASE standards to initialize pysat.Meta. + + Variables: + epoch, DDAY, OB_B, OB_B_range, POSN, OB_BDPL, OB_BDPL_range,compno_3, OB_B_labl, POSN_labl, OB_BDPL_labl + """ + meta = pysat.Meta(header_data=header_data) + + meta['time'] = {meta.labels.name: 'Unix time', + meta.labels.units: 'seconds', + meta.labels.min_val: float(data.epoch.VALIDMIN)/1e9 +946728000, + meta.labels.max_val: float(data.epoch.VALIDMAX)/1e9 +946728000, + meta.labels.desc: data.epoch.CATDESC, + meta.labels.fill_val: float(data.epoch.FILLVAL)} + + meta['DDAY'] ={meta.labels.name: data.DDAY.FIELDNAM, + meta.labels.units: data.DDAY.UNITS, + meta.labels.min_val: float(data.DDAY.VALIDMIN), + meta.labels.max_val: float(data.DDAY.VALIDMAX), + meta.labels.desc: data.DDAY.CATDESC, + meta.labels.fill_val: float(data.DDAY.FILLVAL)} + + meta['OB_B_x']={meta.labels.name: 'Outboard Magnetic Field x', + meta.labels.units: data.OB_B.UNITS, + meta.labels.desc: data.OB_B.CATDESC, + meta.labels.min_val: float(data.OB_B.VALIDMIN), + meta.labels.max_val: float(data.OB_B.VALIDMAX), + meta.labels.fill_val: float(data.OB_B.FILLVAL)} + meta['OB_B_y']={meta.labels.name: 'Outboard Magnetic Field y', + meta.labels.units: data.OB_B.UNITS, + meta.labels.desc: data.OB_B.CATDESC, + meta.labels.min_val: float(data.OB_B.VALIDMIN), + meta.labels.max_val: float(data.OB_B.VALIDMAX), + meta.labels.fill_val: float(data.OB_B.FILLVAL)} + meta['OB_B_z']={meta.labels.name: 'Outboard Magnetic Field z', + meta.labels.units: data.OB_B.UNITS, + meta.labels.desc: data.OB_B.CATDESC, + meta.labels.min_val: float(data.OB_B.VALIDMIN), + meta.labels.max_val: float(data.OB_B.VALIDMAX), + meta.labels.fill_val: float(data.OB_B.FILLVAL)} + + meta['OB_B_range']={meta.labels.name: data.OB_B_range.long_name, + meta.labels.units: data.OB_B_range.UNITS, + meta.labels.desc: data.OB_B_range.CATDESC, + meta.labels.min_val: float(data.OB_B_range.VALIDMIN), + meta.labels.max_val: float(data.OB_B_range.VALIDMAX), + meta.labels.fill_val: float(data.OB_B_range.FILLVAL)} + + meta['POSN_x']={meta.labels.name: 'Spacecraft Position x', + meta.labels.units: data.POSN.UNITS, + meta.labels.desc: 'Spacecraft position x', + meta.labels.min_val: float(data.POSN.VALIDMIN), + meta.labels.max_val: float(data.POSN.VALIDMAX), + meta.labels.fill_val:float(data.POSN.FILLVAL)} + meta['POSN_y']={meta.labels.name: 'Spacecraft Position y', + meta.labels.units: data.POSN.UNITS, + meta.labels.desc: 'Spacecraft position y', + meta.labels.min_val: float(data.POSN.VALIDMIN), + meta.labels.max_val: float(data.POSN.VALIDMAX), + meta.labels.fill_val:float(data.POSN.FILLVAL)} + meta['POSN_z']={meta.labels.name: 'Spacecraft Position z', + meta.labels.units: data.POSN.UNITS, + meta.labels.desc: 'Spacecraft position z', + meta.labels.min_val: float(data.POSN.VALIDMIN), + meta.labels.max_val: float(data.POSN.VALIDMAX), + meta.labels.fill_val:float(data.POSN.FILLVAL)} + + meta['OB_BDPL_x']={meta.labels.name: data.OB_BDPL_labl.values[0], + meta.labels.units: data.OB_BDPL.UNITS, + meta.labels.desc: data.OB_BDPL.CATDESC + ' x', + meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), + meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), + meta.labels.fill_val: float(data.OB_BDPL.FILLVAL)} + meta['OB_BDPL_y']={meta.labels.name: data.OB_BDPL_labl.values[1], + meta.labels.units: data.OB_BDPL.UNITS, + meta.labels.desc: data.OB_BDPL.CATDESC + ' y', + meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), + meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), + meta.labels.fill_val: float(data.OB_BDPL.FILLVAL)} + meta['OB_BDPL_z']={meta.labels.name: data.OB_BDPL_labl.values[2], + meta.labels.units: data.OB_BDPL.UNITS, + meta.labels.desc: data.OB_BDPL.CATDESC + ' z', + meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), + meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), + meta.labels.fill_val: float(data.OB_BDPL.FILLVAL)} + + meta['OB_BDPL_range']={meta.labels.name: data.OB_BDPL_range.FIELDNAM, + meta.labels.desc: data.OB_BDPL_range.CATDESC, + meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), + meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), + meta.labels.fill_val: float(data.OB_BDPL.FILLVAL), + meta.labels.units: data.OB_BDPL.UNITS} + + return meta + +"""Provides metadata specific routines for MGS KP data.""" +def scrub_mvn_kp(data): + """Make data labels and epoch compatible with SPASE and pysat. + Parameters + ---------- + data : pandas.Dataframe() + Metadata object containing the default metadata loaded from the sav files. + Returns + ------- + data : pandas.Datafram() + Replacement data object with compatible variable names and epoch. + """ + + # Now we make our Epoch variable + unix_time = data['epoch'].values/1e3 - 62167204800 #originally time from 0-0-0 0:00:00.000 ms + + #KP data from the MAVEN SDC is in the format yyyy-mm-ddThh:mm:ss + array_size = len(unix_time) + pdata = pd.DataFrame(index = unix_time) + p2data = pd.DataFrame(index = unix_time) + p3data = pd.DataFrame(index = unix_time) + for key in data.keys(): + try: + if len(data[key]) == array_size and key not in {'SWIA_Hplus_flow_velocity_MSO','SWIA_Hplus_flow_velocity_MSO_data_quality', + 'SWIA_Hplus_flow_velocity_MSO_dq_labl', 'STATIC_O2plus_flow_velocity_MAVEN_APP', + 'STATIC_O2plus_flow_velocity_MAVEN_APP_labl', 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality', + 'SPICE_spacecraft_GEO', + 'STATIC_O2plus_flow_velocity_MSO','MAG_field_GEO','MAG_field_MSO_data_quality', + 'STATIC_O2plus_flow_velocity_MSO_data_quality', + 'SPICE_app_attitude_MSO','SEP_Look_direction_1R_MSO', + 'STATIC_Hplus_characteristic_direction_MSO', + 'STATIC_dominant_pickup_ion_characteristic_direction_MSO', + 'MAG_field_MSO_dq_labl','MAG_field_MSO','MAG_field_GEO_labl', 'SEP_Look_direction_1F_MSO', + 'MAG_field_GEO_dq_labl','SEP_Look_direction_2F_MSO','MAG_field_GEO_data_quality', + 'SPICE_spacecraft_GEO_labl','SEP_Look_direction_2R_MSO', + 'SPICE_spacecraft_MSO_labl','SPICE_spacecraft_MSO','SPICE_spacecraft_attitude_MSO', + 'SPICE_spacecraft_attitude_GEO_labl','SPICE_spacecraft_attitude_GEO', + 'SPICE_spacecraft_attitude_MSO_labl','SPICE_app_attitude_GEO', + 'Rotation_matrix_SPACECRAFT_MAVEN_MSO','Rotation_matrix_IAU_MARS_MAVEN_MSO'}: + if pdata.shape[1] < 100: + pdata[key] = data[key] + else: + p2data[key] = data[key] + except TypeError: + pass + + for key in data.keys(): + for coord in {'x','y','z'}: + try: + if len(data[key]) == array_size and key in {'SWIA_Hplus_flow_velocity_MSO','SWIA_Hplus_flow_velocity_MSO_data_quality', + 'STATIC_O2plus_flow_velocity_MAVEN_APP','STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality', + 'SPICE_spacecraft_GEO','STATIC_O2plus_flow_velocity_MSO', + 'STATIC_O2plus_flow_velocity_MSO_dq_labl','MAG_field_GEO', + 'STATIC_Hplus_MSO_characteristic_direction_labl','MAG_field_GEO_data_quality', + 'MAG_field_MSO_data_quality','MAG_field_MSO', + 'STATIC_O2plus_flow_velocity_MSO_data_quality','SPICE_app_attitude_MSO', + 'SEP_Look_direction_1R_MSO', + 'STATIC_Hplus_characteristic_direction_MSO', + 'STATIC_dominant_pickup_ion_characteristic_direction_MSO', + 'SEP_Look_direction_1F_MSO','SEP_Look_direction_2F_MSO','SEP_Look_direction_2R_MSO', + 'SPICE_spacecraft_MSO','SPICE_spacecraft_attitude_MSO', + 'SPICE_spacecraft_attitude_GEO_labl','SPICE_spacecraft_attitude_GEO', + 'SPICE_spacecraft_attitude_MSO_labl','SPICE_app_attitude_GEO'}: + if coord == 'x': ind = 0 + if coord == 'y': ind = 1 + if coord == 'z': ind = 2 + p3data[key+'_'+coord] = data[key].values[:,ind] + except TypeError: + pass + xdata = xr.Dataset(pdata) + p2data = xr.Dataset(p2data) + p3data = xr.Dataset(p3data) + xdata = xdata.merge(p2data) + xdata = xdata.merge(p3data) + data = xdata.rename(dim_0 = 'time') + return data + +def generate_header_kp(data): + """Generate the meta header info for mvn kp data. + Parameters + ---------- + inst_id : str + The VID of the associated dataset. + epoch : dt.datetime + The epoch of the datafile. Corresponds to the first data point. + Returns + ------- + header : dict + A dictionary compatible with the pysat.meta_header format. Top-level + metadata for the file. + + Global attributes are used to provide information about the data set as an entity. + Together with variables and variable attributes, the global attributes make the data correctly and + independently usable by someone not connected with the instrument team, and hence, a good archive product. + The global attributes are also used by the CDAWeb Display and Retrieval system. + """ + header = {'Project': data.Project, + 'Source_name': data.Source_name, + 'Discipline':data.Discipline, + 'Data_type': data.Data_type, + 'Descriptor': data.Descriptor, + 'Data_version': '', + 'Logical_file_id': data.Logical_file_id, + 'PI_name': data.PI_name, + 'PI_affiliation': data.PI_affiliation, + 'TEXT': data.TEXT, + 'Rules_of_use': data.Rules_of_use, + 'Instrument_type': data.Instrument_type, + 'Mission_group': data.Mission_group, + 'Logical_source': data.Logical_source, + 'Logical_source_description': data.Logical_source_description, + 'DOI':'10.17189/1414178', + 'File_naming_convention': data.File_naming_convention, + 'Time_resolution': data.Time_resolution, + 'Generated_by': data.Generated_by, + 'Generation_date': '', + 'Generation_datetime': dt.datetime.today().isoformat(), + 'Acknowledgement': ackn_str, + 'TITLE': data.TITLE, + 'spase_DatasetResourceID': {'spase://NASA/NumericalData', + '/MAVEN/InSitu/KeyParameter/PT4S'}, + 'LINK_TEXT': data.LINK_TEXT, + 'LINK_TITLE': data.LINK_TITLE, + 'HTTP_LINK': data.HTTP_LINK} + + return header + + +def generate_metadata_kp(header_data,data): + """Generate metadata object for mvn kp data compatible with SPASE and pysat. + Parameters + ---------- + header_data : dict + A dictionary compatible with the pysat.meta_header format. Required to + properly initialize metadata. + Returns + ------- + metadata : pandas.Dataframe() + Contains data compatible with SPASE standards to initialize pysat.Meta. + + Variables: + + """ + meta = pysat.Meta(header_data=header_data) + meta['LPW_Electron_density'] = {meta.labels.name: 'LPW_Electron_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Derived from the LP sweep and when available from the plasma line', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron density (LPW) '} + + meta['LPW_Electron_density_min'] = {meta.labels.name: 'LPW_Electron_density_min', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron density min (LPW)'} + + meta['LPW_Electron_density_max'] = {meta.labels.name: 'LPW_Electron_density_max', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron density max (LPW)'} + + meta['LPW_Electron_temperature'] = {meta.labels.name: 'LPW_Electron_temperature', + meta.labels.units: 'K', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Derived from the LP sweep', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron temperature (LPW)'} + + meta['LPW_Electron_temperature_min'] = {meta.labels.name: 'LPW_Electron_temperature_min', + meta.labels.units: 'K', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron temperature min (LPW)'} + + meta['LPW_Electron_temperature_max'] = {meta.labels.name: 'LPW_Electron_temperature_max', + meta.labels.units: 'K', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron temperature max (LPW)'} + + meta['LPW_Spacecraft_potential'] = {meta.labels.name: 'LPW_Spacecraft_potential', + meta.labels.units: 'V', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Measured from the probe potentials', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Spacecraft potential (LPW)'} + + meta['LPW_Spacecraft_potential_min'] = {meta.labels.name: 'LPW_Spacecraft_potential_min', + meta.labels.units: 'V', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Spacecraft potential min (LPW)'} + + meta['LPW_Spacecraft_potential_max'] = {meta.labels.name: 'LPW_Spacecraft_potential_max', + meta.labels.units: 'V', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Spacecraft potential max (LPW)'} + + meta['LPW_E_field_wave_power_2_100'] = {meta.labels.name: 'LPW_E_field_wave_power_2_100', + meta.labels.units: '(V/m)^2/Hz', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Integrated wave power from the onboard calculated FFT, frequencies important for wave heating', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'E-field wave power 2-100 Hz (LPW)'} + + meta['LPW_E_field_wave_power_2_100_data_quality'] = {meta.labels.name: 'LPW_E_field_wave_power_2_100_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Range: 0-100, where 100 is the highest confidence level, use data with quality flag of 50 or above', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> E-field wave power 2-100 Hz data quality (LPW)'} + + meta['LPW_E_field_wave_power_100_800'] = {meta.labels.name: 'LPW_E_field_wave_power_100_800', + meta.labels.units: '(V/m)^2/Hz', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Integrated wave power from the onboard calculated FFT', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'E-field wave power 100-800 Hz (LPW)'} + + meta['LPW_E_field_wave_power_100_800_data_quality'] = {meta.labels.name: 'LPW_E_field_wave_power_100_800_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Range: 0-100, where 100 is the highest confidence level, use data with quality flag of 50 or above', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> E-field wave power 100-800 Hz data quality (LPW)'} + + meta['LPW_E_field_wave_power_800_1000'] = {meta.labels.name: 'LPW_E_field_wave_power_800_1000', + meta.labels.units: '(V/m)^2/Hz', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Integrated wave power from the onboard calculated FFT', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'E-field wave power 800-1000 Hz (LPW)'} + + meta['LPW_E_field_wave_power_800_1000_data_quality'] = {meta.labels.name: 'LPW_E_field_wave_power_800_1000_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Range: 0-100, where 100 is the highest confidence level, use data with quality flag of 50 or above', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> E-field wave power 800-1000 Hz data quality (LPW)'} + + meta['LPW_EUV_irradiance_pt1_7'] = {meta.labels.name: 'LPW_EUV_irradiance_pt1_7', + meta.labels.units: 'W/m^2', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'EUV irradiance wave power 0.1-7.0 nm bandpass (LPW-EUV)'} + + meta['LPW_EUV_irradiance_pt1_7_data_quality'] = {meta.labels.name: 'LPW_EUV_irradiance_pt1_7_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '0 = good solar, 1 = occultation, 2 = no pointing info, 3 = Sun NOT fully in FOV, 4 = Sun NOT in FOV, 5 = windowed, 6 = eclipse, 7 = spare', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> EUV irradiance wave power 0.1-7.0 nm data quality (LPW-EUV)'} + + meta['LPW_EUV_irradiance_17_22'] = {meta.labels.name: 'LPW_EUV_irradiance_17_22', + meta.labels.units: 'W/m^2', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'EUV irradiance wave power 17-22 nm bandpass (LPW-EUV)'} + + meta['LPW_EUV_irradiance_17_22_data_quality'] = {meta.labels.name: 'LPW_EUV_irradiance_17_22_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '0 = good solar, 1 = occultation, 2 = no pointing info, 3 = Sun NOT fully in FOV, 4 = Sun NOT in FOV, 5 = windowed, 6 = eclipse, 7 = spare', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> EUV irradiance wave power 17-22 nm data quality (LPW-EUV)'} + + meta['LPW_EUV_irradiance_lyman_alpha'] = {meta.labels.name: 'LPW_EUV_irradiance_lyman_alpha', + meta.labels.units: 'W/m^2', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'EUV irradiance wave power Lyman-alpha bandpass (LPW-EUV)'} + + meta['LPW_EUV_irradiance_lyman_alpha_data_quality'] = {meta.labels.name: 'LPW_EUV_irradiance_lyman_alpha_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '0 = good solar, 1 = occultation, 2 = no pointing info, 3 = Sun NOT fully in FOV, 4 = Sun NOT in FOV, 5 = windowed, 6 = eclipse, 7 = spare', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> EUV irradiance wave power Lyman-alpha data quality (LPW-EUV)'} + + meta['SWEA_Electron_density'] = {meta.labels.name: 'SWEA_Electron_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Density of solar wind or magnetosheath electrons based on moments of the electron distribution after correcting for the spacecraft potential', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Solar wind electron density (SWEA)'} + + meta['SWEA_Electron_density_quality'] = {meta.labels.name: 'SWEA_Electron_density_quality', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Statistical uncertainty, (1 sigma), not including systematic error', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Solar wind electron density data quality (SWEA)'} + + meta['SWEA_Electron_temperature'] = {meta.labels.name: 'SWEA_Electron_temperature', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Temperature of solar wind or magnetosheath electrons based on moments of the electron distribution after correcting for the spacecraft potential', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Solar wind electron temperature (SWEA)'} + + meta['SWEA_Electron_temperature_quality'] = {meta.labels.name: 'SWEA_Electron_temperature_quality', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Statistical uncertainty, (1 sigma), not including systematic error', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Solar wind electron temperature data quality (SWEA)'} + + meta['SWEA_Electron_parallel_flux_5_100'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_5_100', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Electron energy flux parallel to the magnetic field vector (0-90 degrees pitch angle)', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux parallel 5-100 eV (SWEA)'} + + meta['SWEA_Electron_parallel_flux_5_100_data_quality'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_5_100_data_quality', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux parallel 5-100 eV data quality (SWEA)'} + + meta['SWEA_Electron_parallel_flux_100_500'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_100_500', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Electron energy flux parallel to the magnetic field vector (0-90 degrees pitch angle)', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux parallel 100-500 eV (SWEA)'} + + meta['SWEA_Electron_parallel_flux_100_500_data_quality'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_100_500_data_quality', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux parallel 100-500 eV data quality (SWEA)'} + + meta['SWEA_Electron_parallel_flux_500_1000'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_500_1000', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Electron energy flux parallel to the magnetic field vector (0-90 degrees pitch angle)', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux parallel 500-1000 eV (SWEA)'} + + meta['SWEA_Electron_parallel_flux_500_1000_data_quality'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_500_1000_data_quality', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux parallel 500-1000 eV data quality (SWEA)'} + + meta['SWEA_Electron_anti_parallel_flux_5_100'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_5_100', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Electron energy flux anti-parallel to the magnetic field vector (90-180 degrees pitch angle)', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux anti-parallel 5-100 eV (SWEA)'} + + meta['SWEA_Electron_anti_parallel_flux_5_100_data_quality'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_5_100_data_quality', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux anti-parallel 5-100 eV data quality (SWEA)'} + + meta['SWEA_Electron_anti_parallel_flux_100_500'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_100_500', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Electron energy flux anti-parallel to the magnetic field vector (90-180 degrees pitch angle)', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux anti-parallel 100-500 eV (SWEA)'} + + meta['SWEA_Electron_anti_parallel_flux_100_500_data_quality'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_100_500_data_quality', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux anti-parallel 100-500 eV data quality (SWEA)'} + + meta['SWEA_Electron_anti_parallel_flux_500_1000'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_500_1000', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Electron energy flux anti-parallel to the magnetic field vector (90-180 degrees pitch angle)', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux anti-parallel 500-1000 eV (SWEA)'} + + meta['SWEA_Electron_anti_parallel_flux_500_1000_data_quality'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_500_1000_data_quality', + meta.labels.units: 'eV/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux anti-parallel 500-1000 eV data quality (SWEA)'} + + meta['SWEA_Electron_spectrum_shape'] = {meta.labels.name: 'SWEA_Electron_spectrum_shape', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Energy spectrum shape parameter used to distingush between ionospheric photoelectrons and solar wind electrons', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron spectrum shape parameter (SWEA)'} + + meta['SWEA_Electron_spectrum_shape_data_quality'] = {meta.labels.name: 'SWEA_Electron_spectrum_shape_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron spectrum shape parameter data quality (SWEA)'} + + meta['SWIA_Hplus_density'] = {meta.labels.name: 'SWIA_Hplus_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Total ion density from onboard moment calculation, assuming 100% protons (SWIA)'} + + meta['SWIA_Hplus_density_data_quality'] = {meta.labels.name: 'SWIA_Hplus_density_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Total ion density data quality (SWIA)'} + + + + + + + meta['SWIA_Hplus_flow_velocity_MSO_x'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_x', + meta.labels.units: 'km_s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Bulk ion flow velocity X component from onboard moment calculation, assuming 100% protons (SWIA)'} + + meta['SWIA_Hplus_flow_velocity_MSO_y'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_y', + meta.labels.units: 'km_s', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Bulk ion flow velocity Y component from onboard moment calculation, assuming 100% protons (SWIA)'} + + meta['SWIA_Hplus_flow_velocity_MSO_z'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_z', + meta.labels.units: 'km_s', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Bulk ion flow velocity Z component from onboard moment calculation, assuming 100% protons (SWIA)'} + + meta['SWIA_Hplus_flow_velocity_MSO_data_quality_x'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_data_quality_x', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', + meta.labels.desc: '---> Bulk ion flow velocity X data quality (SWIA)'} + + meta['SWIA_Hplus_flow_velocity_MSO_data_quality_y'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_data_quality_y', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', + meta.labels.desc: '---> Bulk ion flow velocity Y data quality (SWIA)'} + + meta['SWIA_Hplus_flow_velocity_MSO_data_quality_z'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_data_quality_z', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', + meta.labels.desc: '---> Bulk ion flow velocity Z data quality (SWIA)'} + + meta['SWIA_Hplus_temperature'] = {meta.labels.name: 'SWIA_Hplus_temperature', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Scalar ion temperature from onboard moment calculation, assuming 100% protons (SWIA)'} + + meta['SWIA_Hplus_temperature_data_quality'] = {meta.labels.name: 'SWIA_Hplus_temperature_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Scalar ion temperature data quality (SWIA)'} + + meta['SWIA_dynamic_pressure'] = {meta.labels.name: 'SWIA_dynamic_pressure', + meta.labels.units: 'nPa', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion dynamic pressure computed on ground from density and velocity moments, assuming 100% protons (SWIA)'} + + meta['SWIA_dynamic_pressure_data_quality'] = {meta.labels.name: 'SWIA_dynamic_pressure_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion dynamic pressure data quality (SWIA)'} + + meta['STATIC_Quality'] = {meta.labels.name: 'STATIC_Quality', + meta.labels.units: ' ', + meta.labels.min_val: 0.0, + meta.labels.max_val: 999999999.0, + meta.labels.notes: 'Integer flag bits, Valid=0, Flag=1, See KP SIS for bit descriptions (formatted as a float in order to include NaN values for data gaps) ', + meta.labels.fill_val: -2147483648.0, + meta.labels.desc: 'STATIC Data quality'} + + meta['STATIC_Hplus_density'] = {meta.labels.name: 'STATIC_Hplus_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'H+ number density below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ density (STATIC)'} + + meta['STATIC_Hplus_density_data_quality'] = {meta.labels.name: 'STATIC_Hplus_density_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> H+ density data quality (STATIC)'} + + meta['STATIC_Oplus_density'] = {meta.labels.name: 'STATIC_Oplus_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O+ number density below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O+ density (STATIC)'} + + meta['STATIC_Oplus_density_data_quality'] = {meta.labels.name: 'STATIC_Oplus_density_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O+ density data quality (STATIC)'} + + meta['STATIC_O2plus_density'] = {meta.labels.name: 'STATIC_O2plus_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O2+ number density below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ density (STATIC)'} + + meta['STATIC_O2plus_density_data_quality'] = {meta.labels.name: 'STATIC_O2plus_density_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ density data quality (STATIC)'} + + meta['STATIC_Hplus_temperature'] = {meta.labels.name: 'STATIC_Hplus_temperature', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'H+ RAM temperature below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ temperature (STATIC)'} + + meta['STATIC_Hplus_temperature_data_quality'] = {meta.labels.name: 'STATIC_Hplus_temperature_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> H+ temperature data quality (STATIC)'} + + meta['STATIC_Oplus_temperature'] = {meta.labels.name: 'STATIC_Oplus_temperature', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O+ RAM temperature below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O+ temperature (STATIC)'} + + meta['STATIC_Oplus_temperature_data_quality'] = {meta.labels.name: 'STATIC_Oplus_temperature_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O+ temperature data quality (STATIC)'} + + meta['STATIC_O2plus_temperature'] = {meta.labels.name: 'STATIC_O2plus_temperature', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O2+ RAM temperature below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ temperature (STATIC)'} + + meta['STATIC_O2plus_temperature_data_quality'] = {meta.labels.name: 'STATIC_O2plus_temperature_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ temperature data quality (STATIC)'} + + + + meta['STATIC_O2plus_flow_velocity_MAVEN_APP_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_x', + meta.labels.units: 'km/s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ MAVEN_APP X component of velocity below TBD altitude determined from APID c6 while in Ram or Conic mode (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MAVEN_APP_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_y', + meta.labels.units: 'km/s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ MAVEN_APP Y component of velocity below TBD altitude determined from APID c6 while in Ram or Conic mode (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MAVEN_APP_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_z', + meta.labels.units: 'km/s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ MAVEN_APP Z component of velocity below TBD altitude determined from APID c6 while in Ram or Conic mode (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_x', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.desc: '---> O2+ MAVEN_APP X component of velocity data quality (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_y', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ MAVEN_APP Y component of velocity data quality (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_z', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.desc: '---> O2+ MAVEN_APP Z component of velocity data quality (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MSO_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_x', + meta.labels.units: 'km/s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ MSO X component of velocity below TBD altitude while in Ram or Conic mode (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MSO_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_y', + meta.labels.units: 'km/s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ MSO Y component of velocity below TBD altitude while in Ram or Conic mode (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MSO_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_z', + meta.labels.units: 'km/s', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ MSO Y component of velocity below TBD altitude while in Ram or Conic mode (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MSO_data_quality_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_data_quality_x', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ MSO X component of velocity data quality (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MSO_data_quality_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_data_quality_y', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ MSO Y component of velocity data quality (STATIC)'} + + meta['STATIC_O2plus_flow_velocity_MSO_data_quality_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_data_quality_z', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ MSO Z component of velocity data quality (STATIC)'} + + + + meta['STATIC_Hplus_omni_directional_flux'] = {meta.labels.name: 'STATIC_Hplus_omni_directional_flux', + meta.labels.units: '(cm^2 s)^-1', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'H+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ omni-directional flux (STATIC)'} + + meta['STATIC_Hplus_characteristic_energy'] = {meta.labels.name: 'STATIC_Hplus_characteristic_energy', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'H+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ characteristic energy (STATIC)'} + + meta['STATIC_Hplus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_Hplus_characteristic_energy_DQ', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> H+ characteristic energy data quality (STATIC)'} + + meta['STATIC_HEplus_omni_directional_flux'] = {meta.labels.name: 'STATIC_HEplus_omni_directional_flux', + meta.labels.units: '(cm^2 s)^-1', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'HE+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'He+ omni-directional flux (STATIC)'} + + meta['STATIC_HEplus_characteristic_energy'] = {meta.labels.name: 'STATIC_HEplus_characteristic_energy', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'HE+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'He+ characteristic energy (STATIC)'} + + meta['STATIC_HEplus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_HEplus_characteristic_energy_DQ', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> He+ characteristic energy data quality (STATIC)'} + + meta['STATIC_Oplus_omni_directional_flux'] = {meta.labels.name: 'STATIC_Oplus_omni_directional_flux', + meta.labels.units: '(cm^2 s)^-1', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O+ omni-directional flux (STATIC)'} + + meta['STATIC_Oplus_characteristic_energy'] = {meta.labels.name: 'STATIC_Oplus_characteristic_energy', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O+ characteristic energy (STATIC)'} + + meta['STATIC_Oplus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_Oplus_characteristic_energy_DQ', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O+ characteristic energy data quality (STATIC)'} + + meta['STATIC_O2plus_omni_directional_flux'] = {meta.labels.name: 'STATIC_O2plus_omni_directional_flux', + meta.labels.units: '(cm^2 s)^-1', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O2+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ omni-directional flux (STATIC)'} + + meta['STATIC_O2plus_characteristic_energy'] = {meta.labels.name: 'STATIC_O2plus_characteristic_energy', + meta.labels.units: 'eV', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'O2+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O2+ characteristic energy (STATIC)'} + + meta['STATIC_O2plus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_O2plus_characteristic_energy_DQ', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O2+ characteristic energy data quality (STATIC)'} + + + meta['STATIC_Hplus_characteristic_direction_MSO_x'] = {meta.labels.name: 'STATIC_Hplus_characteristic_direction_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ MSO X-direction of flux above TBD altitude determined from TBD APID while in Pickup and Scan mode (STATIC)'} + + meta['STATIC_Hplus_characteristic_direction_MSO_y'] = {meta.labels.name: 'STATIC_Hplus_characteristic_direction_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ MSO Y-direction of flux above TBD altitude determined from TBD APID while in Pickup and Scan mode (STATIC)'} + + meta['STATIC_Hplus_characteristic_direction_MSO_z'] = {meta.labels.name: 'STATIC_Hplus_characteristic_direction_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ MSO Z-direction of flux above TBD altitude determined from TBD APID while in Pickup and Scan mode (STATIC)'} + + + + + + + + meta['STATIC_Hplus_characteristic_angular_width'] = {meta.labels.name: 'STATIC_Hplus_characteristic_angular_width', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'H+ flux angular width above TBD altitude determined from TBD APID while in Pickup and Scan mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'H+ characteristic width (STATIC)'} + + meta['STATIC_Hplus_characteristic_angular_width_DQ'] = {meta.labels.name: 'STATIC_Hplus_characteristic_angular_width_DQ', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> H+ characteristic width data quality (STATIC)'} + + + meta['STATIC_dominant_pickup_ion_characteristic_direction_MSO_z'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_direction_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Dominant pickup ion MSO Z direction of flux above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode'} + + meta['STATIC_dominant_pickup_ion_characteristic_direction_MSO_x'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_direction_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Dominant pickup ion MSO X direction of flux above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode'} + + meta['STATIC_dominant_pickup_ion_characteristic_direction_MSO_y'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_direction_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Dominant pickup ion MSO Y direction of flux above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode'} + + + + + + meta['STATIC_dominant_pickup_ion_characteristic_angular_width'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_angular_width', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Dominant pickup ion flux angular width above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Dominant pickup ion characteristic angular width (STATIC)'} + + meta['STATIC_dominant_pickup_ion_characteristic_angular_width_DQ'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_angular_width_DQ', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number of counts in the measurement', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Dominant pickup ion characteristic angular width DQ (STATIC)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_1F'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1F', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 1-F (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_1F_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1F_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 1-F data quality (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_1R'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1R', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 1-R (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_1R_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1R_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 1-R data quality (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_2F'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2F', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 2-F (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_2F_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2F_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 2-F data quality (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_2R'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2R', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 2-R (SEP)'} + + meta['SEP_Ion_Energy_Flux_30_1000_FOV_2R_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2R_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 2-R data quality (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_1F'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1F', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 1-F (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_1F_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1F_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 1-F data quality (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_1R'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1R', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 1-R (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_1R_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1R_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 1-R data quality (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_2F'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2F', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 2-F (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_2F_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2F_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 2-F data quality (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_2R'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2R', + meta.labels.units: 'n/(cm^2 s sr)', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 2-R (SEP)'} + + meta['SEP_Electron_Energy_Flux_30_300_FOV_2R_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2R_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 2-R data quality (SEP)'} + + + + + + + + + + meta['SEP_Look_direction_1F_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_1F_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'SEP look direction 1-F MSO X'} + + meta['SEP_Look_direction_1F_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_1F_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'SEP look direction 1-F MSO Y'} + + meta['SEP_Look_direction_1F_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_1F_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 1-F MSO Z'} + + meta['SEP_Look_direction_1R_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_1R_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 1-R MSO X'} + + meta['SEP_Look_direction_1R_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_1R_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 1-R MSO Y'} + + meta['SEP_Look_direction_1R_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_1R_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 1-R MSO Z'} + + meta['SEP_Look_direction_2F_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_2F_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 2-F MSO X'} + + meta['SEP_Look_direction_2F_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_2F_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 2-F MSO Y'} + + meta['SEP_Look_direction_2F_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_2F_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 2-F MSO Z'} + + meta['SEP_Look_direction_2R_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_2R_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 2-R MSO X'} + + meta['SEP_Look_direction_2R_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_2R_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 2-R MSO Y'} + + meta['SEP_Look_direction_2R_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_2R_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'SEP look direction 2-R MSO Z'} + + meta['MAG_field_MSO_x'] = {meta.labels.name: 'MAG_field_MSO_x', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Magnetic field vector component in the X direction in MSO coordinates (MAG)'} + + meta['MAG_field_MSO_y'] = {meta.labels.name: 'MAG_field_MSO_y', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Magnetic field vector component in the Y direction in MSO coordinates (MAG)'} + + meta['MAG_field_MSO_z'] = {meta.labels.name: 'MAG_field_MSO_z', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Magnetic field vector component in the Z direction in MSO coordinates (MAG)'} + + + meta['MAG_field_MSO_data_quality_x'] = {meta.labels.name: 'MAG_field_MSO_data_quality_x', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Unused column', + meta.labels.desc: '---> Magnetic field X vector component in MSO coordinates data quality (MAG)'} + + meta['MAG_field_MSO_data_quality_y'] = {meta.labels.name: 'MAG_field_MSO_data_quality_y', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Unused column', + meta.labels.desc: '---> Magnetic field Y vector component in MSO coordinates data quality (MAG)'} + + meta['MAG_field_MSO_data_quality_z'] = {meta.labels.name: 'MAG_field_MSO_data_quality_z', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Unused column', + meta.labels.desc: '---> Magnetic field Z vector component in MSO coordinates data quality (MAG)'} + + meta['MAG_field_GEO_x'] = {meta.labels.name: 'MAG_field_GEO_x', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Magnetic field vector component in the X direction in GEO coordinates (MAG)'} + + meta['MAG_field_GEO_y'] = {meta.labels.name: 'MAG_field_GEO_y', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.desc: 'Magnetic field vector component in the Y direction in GEO coordinates (MAG)'} + + meta['MAG_field_GEO_z'] = {meta.labels.name: 'MAG_field_GEO_z', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Magnetic field vector component in the Z direction in GEO coordinates (MAG)'} + + meta['MAG_field_GEO_data_quality_x'] = {meta.labels.name: 'MAG_field_GEO_data_quality_x', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Unused column', + meta.labels.desc: '---> Magnetic field X vector component in GEO coordinates data quality (MAG)'} + + meta['MAG_field_GEO_data_quality_y'] = {meta.labels.name: 'MAG_field_GEO_data_quality_y', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Unused column', + meta.labels.desc: '---> Magnetic field Y vector component in GEO coordinates data quality (MAG)'} + + meta['MAG_field_GEO_data_quality_z'] = {meta.labels.name: 'MAG_field_GEO_data_quality_z', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Unused column', + meta.labels.desc: '---> Magnetic field Z vector component in GEO coordinates data quality (MAG)'} + + + + meta['MAG_field_RMS_deviation'] = {meta.labels.name: 'MAG_field_RMS_deviation', + meta.labels.units: 'nT', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Deviations from the mean magnetic field magnitude (MAG)'} + + meta['MAG_field_RMS_deviation_data_quality'] = {meta.labels.name: 'MAG_field_RMS_deviation_data_quality', + meta.labels.units: ' ', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Unused column', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Deviations from the mean magnetic field magnitude data quality (MAG)'} + + meta['NGIMS_He_density'] = {meta.labels.name: 'NGIMS_He_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'He density (NGIMS)'} + + meta['NGIMS_He_density_precision'] = {meta.labels.name: 'NGIMS_He_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> He density precision (NGIMS)'} + + meta['NGIMS_He_density_data_quality'] = {meta.labels.name: 'NGIMS_He_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] He density data quality (NGIMS)'} + + meta['NGIMS_O_density'] = {meta.labels.name: 'NGIMS_O_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'O density (NGIMS)'} + + meta['NGIMS_O_density_precision'] = {meta.labels.name: 'NGIMS_O_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> O density precision (NGIMS)'} + + meta['NGIMS_O_density_data_quality'] = {meta.labels.name: 'NGIMS_O_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] O density data quality (NGIMS)'} + + meta['NGIMS_CO_density'] = {meta.labels.name: 'NGIMS_CO_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'CO density (NGIMS)'} + + meta['NGIMS_CO_density_precision'] = {meta.labels.name: 'NGIMS_CO_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> CO density precision (NGIMS)'} + + meta['NGIMS_CO_density_data_quality'] = {meta.labels.name: 'NGIMS_CO_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] CO density data quality (NGIMS)'} + + meta['NGIMS_N2_density'] = {meta.labels.name: 'NGIMS_N2_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'N2 density (NGIMS)'} + + meta['NGIMS_N2_density_precision'] = {meta.labels.name: 'NGIMS_N2_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> N2 density precision (NGIMS)'} + + meta['NGIMS_N2_density_data_quality'] = {meta.labels.name: 'NGIMS_N2_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] N2 density data quality (NGIMS)'} + + meta['NGIMS_NO_density'] = {meta.labels.name: 'NGIMS_NO_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'NO density (NGIMS)'} + + meta['NGIMS_NO_density_precision'] = {meta.labels.name: 'NGIMS_NO_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> NO density precision (NGIMS)'} + + meta['NGIMS_NO_density_data_quality'] = {meta.labels.name: 'NGIMS_NO_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] NO density data quality (NGIMS)'} + + meta['NGIMS_Ar_density'] = {meta.labels.name: 'NGIMS_Ar_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ar density (NGIMS)'} + + meta['NGIMS_Ar_density_precision'] = {meta.labels.name: 'NGIMS_Ar_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ar density precision (NGIMS)'} + + meta['NGIMS_Ar_density_data_quality'] = {meta.labels.name: 'NGIMS_Ar_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] Ar density data quality (NGIMS)'} + + meta['NGIMS_CO2_density'] = {meta.labels.name: 'NGIMS_CO2_density', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'CO2 density (NGIMS)'} + + meta['NGIMS_CO2_density_precision'] = {meta.labels.name: 'NGIMS_CO2_density_precision', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> CO2 density precision (NGIMS)'} + + meta['NGIMS_CO2_density_data_quality'] = {meta.labels.name: 'NGIMS_CO2_density_data_quality', + meta.labels.units: '-', + meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', + meta.labels.desc: '---> [DOES NOT PLOT] CO2 density data quality (NGIMS)'} + + meta['NGIMS_Ion_density_32plus'] = {meta.labels.name: 'NGIMS_Ion_density_32plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 32+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_32plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_32plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 32+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_32plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_32plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 32+ (NGIMS)'} + + meta['NGIMS_Ion_density_44plus'] = {meta.labels.name: 'NGIMS_Ion_density_44plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 44+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_44plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_44plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 44+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_44plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_44plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 44+ (NGIMS)'} + + meta['NGIMS_Ion_density_30plus'] = {meta.labels.name: 'NGIMS_Ion_density_30plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 30+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_30plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_30plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 30+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_30plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_30plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 30+ (NGIMS)'} + + meta['NGIMS_Ion_density_16plus'] = {meta.labels.name: 'NGIMS_Ion_density_16plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 16+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_16plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_16plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 16+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_16plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_16plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 16+ (NGIMS)'} + + meta['NGIMS_Ion_density_28plus'] = {meta.labels.name: 'NGIMS_Ion_density_28plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 28+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_28plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_28plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 28+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_28plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_28plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 28+ (NGIMS)'} + + meta['NGIMS_Ion_density_12plus'] = {meta.labels.name: 'NGIMS_Ion_density_12plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 12+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_12plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_12plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 12+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_12plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_12plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 12+ (NGIMS)'} + + meta['NGIMS_Ion_density_17plus'] = {meta.labels.name: 'NGIMS_Ion_density_17plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 17+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_17plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_17plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 17+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_17plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_17plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 17+ (NGIMS)'} + + meta['NGIMS_Ion_density_14plus'] = {meta.labels.name: 'NGIMS_Ion_density_14plus', + meta.labels.units: 'cm^-3', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Abundance or upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Ion density - amu 14+ (NGIMS)'} + + meta['NGIMS_Ion_density_precision_14plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_14plus', + meta.labels.units: '%', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: '---> Ion density precision - amu 14+ (NGIMS)'} + + meta['NGIMS_Ion_density_data_quality_14plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_14plus', + meta.labels.units: '-', + meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', + meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 14+ (NGIMS)'} + + + + + + + meta['SPICE_spacecraft_GEO_x'] = {meta.labels.name: 'SPICE_spacecraft_GEO_x', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'X-component of spacecraft position in Mars planetocentric (geographic) GEO coordinates'} + + meta['SPICE_spacecraft_GEO_y'] = {meta.labels.name: 'SPICE_spacecraft_GEO_y', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Y-component of spacecraft position in Mars planetocentric (geographic) GEO coordinates'} + + meta['SPICE_spacecraft_GEO_z'] = {meta.labels.name: 'SPICE_spacecraft_GEO_z', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Z-component of spacecraft position in Mars planetocentric (geographic) GEO coordinates'} + + meta['SPICE_spacecraft_MSO_x'] = {meta.labels.name: 'SPICE_spacecraft_MSO_x', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'X-component of spacecraft position in MSO coordinates'} + + meta['SPICE_spacecraft_MSO_y'] = {meta.labels.name: 'SPICE_spacecraft_MSO_y', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Y-component of spacecraft position in MSO coordinates'} + + meta['SPICE_spacecraft_MSO_z'] = {meta.labels.name: 'SPICE_spacecraft_MSO_z', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Z-component of spacecraft position in MSO coordinates'} + + + + meta['SPICE_spacecraft_longitude_GEO'] = {meta.labels.name: 'SPICE_spacecraft_longitude_GEO', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Longitudinal component of MAVEN\'s location with respect to Mars', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Spacecraft longitude GEO (SPICE)'} + + meta['SPICE_spacecraft_latitude_GEO'] = {meta.labels.name: 'SPICE_spacecraft_latitude_GEO', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Latitudinal (areodetic) component of MAVEN\'s location with respect to IAU Mars ellipsoid, equatorial radius of 3396.2 km, polar radius of', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Spacecraft latitude GEO (SPICE)'} + + meta['SPICE_spacecraft_sza'] = {meta.labels.name: 'SPICE_spacecraft_sza', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Angle measured from MAVEN to the geometric center of the Sun\'s disc, as described using a horizontal coordinate system', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Spacecraft solar zenith angle (SPICE)'} + + meta['SPICE_spacecraft_local_time'] = {meta.labels.name: 'SPICE_spacecraft_local_time', + meta.labels.units: 'hours', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Angle measured from MAVEN to the geometric center of the Sun\'s disc, as described using a horizontal coordinate system', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Spacecraft local time (SPICE)'} + + meta['SPICE_spacecraft_altitude'] = {meta.labels.name: 'SPICE_spacecraft_altitude', + meta.labels.units: 'km', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Altitude (areodetic) with respect to IAU Mars ellipsoid, equatorial radius of 3396.2 km, ', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Spacecraft altitude w.r.t. aeroid (SPICE)'} + + + meta['SPICE_spacecraft_attitude_GEO_x'] = {meta.labels.name: 'SPICE_spacecraft_attitude_GEO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'X-component of spacecraft attitude in GEO coordinates'} + + meta['SPICE_spacecraft_attitude_GEO_y'] = {meta.labels.name: 'SPICE_spacecraft_attitude_GEO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Y-component of spacecraft attitude in GEO coordinates'} + + meta['SPICE_spacecraft_attitude_GEO_z'] = {meta.labels.name: 'SPICE_spacecraft_attitude_GEO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Z-component of spacecraft attitude in GEO coordinates'} + + meta['SPICE_spacecraft_attitude_MSO_x'] = {meta.labels.name: 'SPICE_spacecraft_attitude_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'X-component of spacecraft attitude in MSO coordinates'} + + meta['SPICE_spacecraft_attitude_MSO_y'] = {meta.labels.name: 'SPICE_spacecraft_attitude_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Y-component of spacecraft attitude in MSO coordinates'} + + meta['SPICE_spacecraft_attitude_MSO_z'] = {meta.labels.name: 'SPICE_spacecraft_attitude_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Z-component of spacecraft attitude in MSO coordinates'} + + + meta['SPICE_app_attitude_GEO_x'] = {meta.labels.name: 'SPICE_app_attitude_GEO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'X-component of pointing direction of Articulated Payload Platform (z-axis of MAVEN_APP_BP frame) in GEO coordinates', + meta.labels.desc: 'X-component of articulated payload platform (app) attitude in GEO coordinates'} + + meta['SPICE_app_attitude_GEO_y'] = {meta.labels.name: 'SPICE_app_attitude_GEO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Y-component of pointing direction of Articulated Payload Platform (z-axis of MAVEN_APP_BP frame) in GEO coordinates', + meta.labels.desc: 'Y-component of articulated payload platform (app) attitude in GEO coordinates'} + + meta['SPICE_app_attitude_GEO_z'] = {meta.labels.name: 'SPICE_app_attitude_GEO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.notes: 'Z-component of pointing direction of Articulated Payload Platform (z-axis of MAVEN_APP_BP frame) in GEO coordinates', + meta.labels.desc: 'Z-component of articulated payload platform (app) attitude in GEO coordinates'} + + + meta['SPICE_app_attitude_MSO_x'] = {meta.labels.name: 'SPICE_app_attitude_MSO_x', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'X-component of articulated payload platform (app) attitude in MSO coordinates'} + + meta['SPICE_app_attitude_MSO_y'] = {meta.labels.name: 'SPICE_app_attitude_MSO_y', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Y-component of articulated payload platform (app) attitude in MSO coordinates'} + + meta['SPICE_app_attitude_MSO_z'] = {meta.labels.name: 'SPICE_app_attitude_MSO_z', + meta.labels.units: 'unit vector', + meta.labels.min_val: -999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'same as IAU_MARS in SPICE', + meta.labels.desc: 'Z-component of articulated payload platform (app) attitude in MSO coordinates'} + + meta['SPICE_Orbit_Number'] = {meta.labels.name: 'SPICE_Orbit_Number', + meta.labels.units: ' ', + meta.labels.min_val: 1.0, + meta.labels.max_val: 10000000.0, + meta.labels.notes: 'Orbit number increments each time MAVEN reaches geometric periapsis', + meta.labels.fill_val: -2147483648.0, + meta.labels.desc: 'Orbit number (SPICE)'} + + meta['Inbound_Outbound_Flag'] = {meta.labels.name: 'Inbound_Outbound_Flag', + meta.labels.units: ' ', + meta.labels.notes: 'Inbound (\'I\') is from geometric apoapsis to next geometric periapsis in time, outbound (\'O\') is the reverse', + meta.labels.desc: '---> [DOES NOT PLOT] Inbound/Outbound Flag (SPICE)'} + + meta['SPICE_Mars_season'] = {meta.labels.name: 'SPICE_Mars_season', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Martian solar longitude. Ls = 0 (northern spring equinox), Ls = 90 (northern summer solstice), etc.', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Mars Season (Ls) (SPICE)'} + + meta['SPICE_Mars_Sun_distance'] = {meta.labels.name: 'SPICE_Mars_Sun_distance', + meta.labels.units: 'AU', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Mars-Sun distance (SPICE)'} + + meta['SPICE_Subsolar_Point_longitude_GEO'] = {meta.labels.name: 'SPICE_Subsolar_Point_longitude_GEO', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'GEO longitude of the sub-solar point', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Subsolar Point longitude GEO (SPICE)'} + + meta['SPICE_Subsolar_Point_latitude_GEO'] = {meta.labels.name: 'SPICE_Subsolar_Point_latitude_GEO', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'GEO latitude of the sub-solar point', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Subsolar Point latitude GEO (SPICE)'} + + meta['SPICE_Sub_Mars_Point_longitude'] = {meta.labels.name: 'SPICE_Sub_Mars_Point_longitude', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Solar longitude of the center of the Sun as seen from Mars', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Sub-Mars Point on the Sun, Longitude (SPICE)'} + + meta['SPICE_Sub_Mars_Point_latitude'] = {meta.labels.name: 'SPICE_Sub_Mars_Point_latitude', + meta.labels.units: 'deg', + meta.labels.min_val: -999999995904.0, + meta.labels.max_val: 999999995904.0, + meta.labels.notes: 'Solar latitude of the center of the Sun as seen from Mars', + meta.labels.fill_val: -9.999999848243207e+30, + meta.labels.desc: 'Sub-Mars Point on the Sun, Latitude (SPICE)'} + + meta['Rotation_matrix_IAU_MARS_MAVEN_MSO'] = {meta.labels.name: 'Rotation_matrix_IAU_MARS_MAVEN_MSO', + meta.labels.units: ' ', + meta.labels.min_val: -1000000000000.0, + meta.labels.max_val: 1000000000000.0, + meta.labels.notes: 'From IAU_MARS frame to MAVEN_MSO frame', + meta.labels.fill_val: -1e+31, + meta.labels.desc: 'Rotation matrix (IAU_MARS -> MAVEN_MSO) (SPICE)'} + + meta['Rotation_matrix_SPACECRAFT_MAVEN_MSO'] = {meta.labels.name: 'Rotation_matrix_SPACECRAFT_MAVEN_MSO', + meta.labels.units: ' ', + meta.labels.min_val: -1000000000000.0, + meta.labels.max_val: 1000000000000.0, + meta.labels.notes: 'From MAVEN_SPACECRAFT frame to MAVEN_MSO frame', + meta.labels.fill_val: -1e+31, + meta.labels.desc: '---> Rotation matrix (MAVEN_SPACECRAFT -> MAVEN_MSO) (SPICE)'} + + + return meta diff --git a/pysatNASA/instruments/mvn_kp.py b/pysatNASA/instruments/mvn_kp.py new file mode 100644 index 00000000..c8a63e9a --- /dev/null +++ b/pysatNASA/instruments/mvn_kp.py @@ -0,0 +1,402 @@ +# -*- coding: utf-8 -*- +"""Module for the MAVEN kp instrument. +Created by: Teresa Esman, NPP at GSFC +Last editted: Jun 2, 2023 + May 12, 2023 + +Supports the 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. + +Properties +---------- +platform + 'mvn' +name + 'kp' +tag + None supported + +Warnings +-------- + +- Only supports level-2 sunstate 1 second data. + + +Examples +-------- +:: + + import pysat + from pysat.utils import registry + registry.register_by_module(pysatNASA.instruments) + + + kp = pysat.Instrument(platform='MAVEN', name='kp') + kp.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) + kp.load(2020, 1, use_header = True) +""" + +import datetime as dt +import functools +import numpy as np +import cdflib +import pysat +from pysat.instruments.methods import general as mm_gen +from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa +from pysatNASA.instruments.methods import mvn as mm_mvn + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'mvn' +name = 'kp' +tags = {'': ''} +inst_ids = {'': ['']} + +pandas_format = False + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {'': {'': dt.datetime(2020, 1, 1)}} +_test_load_opt = {'': {'': {'keep_original_names': True}}} + +# ---------------------------------------------------------------------------- +# Instrument methods + + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_mvn, name=name) + + +def preprocess(self, keep_original_names=False): + """Adjust epoch timestamps to datetimes and remove variable preambles. + + Parameters + ---------- + keep_original_names : bool + if True then the names as given in the netCDF MAVEN file + will be used as is. If False, a preamble is removed. (default=False) + + """ + + if not keep_original_names: + mm_gen.remove_leading_text(self, target='MAVEN_') + return + + +def clean(self): + """Clean MAVEN kp 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 + + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the MAVEN and pysat methods + +# Set the list_files routine +fname = ''.join(('mvn_insitu_kp-4sec_{year:04d}{month:02d}{day:02d}_', + 'v{version:02d}_r{revision:02d}.cdf')) +supported_tags = {'': {'': fname}} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the download routine +basic_tag = {'remote_dir': '/pub/data/maven/insitu/kp-4sec/cdfs/{year:04d}/{month:02d}', + 'fname': fname} +download_tags = {'': {'': basic_tag}} +download = functools.partial(cdw.download, supported_tags=download_tags) + +# Set the list_remote_files routine +list_remote_files = functools.partial(cdw.list_remote_files, + supported_tags=download_tags) + + +def filter_metadata(meta_dict): + """Filter kp metadata to remove warnings during loading. + + Parameters + ---------- + meta_dict : dict + Dictionary of metadata from file + + Returns + ------- + meta_dict : dict + Filtered kp metadata + + """ + vars = ['LPW_Electron_density', + 'LPW_Electron_density_min', + 'LPW_Electron_density_max', + 'LPW_Electron_temperature', + 'LPW_Electron_temperature_min', + 'LPW_Electron_temperature_max', + 'LPW_Spacecraft_potential', + 'LPW_Spacecraft_potential_min', + 'LPW_Spacecraft_potential_max', + 'LPW_E_field_wave_power_2_100', + 'LPW_E_field_wave_power_2_100_data_quality', + 'LPW_E_field_wave_power_100_800', + 'LPW_E_field_wave_power_100_800_data_quality', + 'LPW_E_field_wave_power_800_1000', + 'LPW_E_field_wave_power_800_1000_data_quality', + 'LPW_EUV_irradiance_pt1_7', + 'LPW_EUV_irradiance_pt1_7_data_quality', + 'LPW_EUV_irradiance_17_22', + 'LPW_EUV_irradiance_17_22_data_quality', + 'LPW_EUV_irradiance_lyman_alpha', + 'LPW_EUV_irradiance_lyman_alpha_data_quality', + 'SWEA_Electron_density', + 'SWEA_Electron_density_quality', + 'SWEA_Electron_temperature', + 'SWEA_Electron_temperature_quality', + 'SWEA_Electron_parallel_flux_5_100', + 'SWEA_Electron_parallel_flux_5_100_data_quality', + 'SWEA_Electron_parallel_flux_100_500', + 'SWEA_Electron_parallel_flux_100_500_data_quality', + 'SWEA_Electron_parallel_flux_500_1000', + 'SWEA_Electron_parallel_flux_500_1000_data_quality', + 'SWEA_Electron_anti_parallel_flux_5_100', + 'SWEA_Electron_anti_parallel_flux_5_100_data_quality', + 'SWEA_Electron_anti_parallel_flux_100_500', + 'SWEA_Electron_anti_parallel_flux_100_500_data_quality', + 'SWEA_Electron_anti_parallel_flux_500_1000', + 'SWEA_Electron_anti_parallel_flux_500_1000_data_quality', + 'SWEA_Electron_spectrum_shape', + 'SWEA_Electron_spectrum_shape_data_quality', + 'SWIA_Hplus_density', + 'SWIA_Hplus_density_data_quality', + 'SWIA_Hplus_flow_velocity_MSO', + 'SWIA_Hplus_flow_velocity_MSO_data_quality', + 'SWIA_Hplus_temperature', + 'SWIA_Hplus_temperature_data_quality', + 'SWIA_dynamic_pressure', + 'SWIA_dynamic_pressure_data_quality', + 'STATIC_Quality', + 'STATIC_Hplus_density', + 'STATIC_Hplus_density_data_quality', + 'STATIC_Oplus_density', + 'STATIC_Oplus_density_data_quality', + 'STATIC_O2plus_density', + 'STATIC_O2plus_density_data_quality', + 'STATIC_Hplus_temperature', + 'STATIC_Hplus_temperature_data_quality', + 'STATIC_Oplus_temperature', + 'STATIC_Oplus_temperature_data_quality', + 'STATIC_O2plus_temperature', + 'STATIC_O2plus_temperature_data_quality', + 'STATIC_O2plus_flow_velocity_MAVEN_APP', + 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality', + 'STATIC_O2plus_flow_velocity_MSO', + 'STATIC_O2plus_flow_velocity_MSO_data_quality', + 'STATIC_Hplus_omni_directional_flux', + 'STATIC_Hplus_characteristic_energy', + 'STATIC_Hplus_characteristic_energy_DQ', + 'STATIC_HEplus_omni_directional_flux', + 'STATIC_HEplus_characteristic_energy', + 'STATIC_HEplus_characteristic_energy_DQ', + 'STATIC_Oplus_omni_directional_flux', + 'STATIC_Oplus_characteristic_energy', + 'STATIC_Oplus_characteristic_energy_DQ', + 'STATIC_O2plus_omni_directional_flux', + 'STATIC_O2plus_characteristic_energy', + 'STATIC_O2plus_characteristic_energy_DQ', + 'STATIC_Hplus_characteristic_direction_MSO', + 'STATIC_Hplus_characteristic_angular_width', + 'STATIC_Hplus_characteristic_angular_width_DQ', + 'STATIC_dominant_pickup_ion_characteristic_direction_MSO', + 'STATIC_dominant_pickup_ion_characteristic_angular_width', + 'STATIC_dominant_pickup_ion_characteristic_angular_width_DQ', + 'SEP_Ion_Energy_Flux_30_1000_FOV_1F', + 'SEP_Ion_Energy_Flux_30_1000_FOV_1F_data_quality', + 'SEP_Ion_Energy_Flux_30_1000_FOV_1R', + 'SEP_Ion_Energy_Flux_30_1000_FOV_1R_data_quality', + 'SEP_Ion_Energy_Flux_30_1000_FOV_2F', + 'SEP_Ion_Energy_Flux_30_1000_FOV_2F_data_quality', + 'SEP_Ion_Energy_Flux_30_1000_FOV_2R', + 'SEP_Ion_Energy_Flux_30_1000_FOV_2R_data_quality', + 'SEP_Electron_Energy_Flux_30_300_FOV_1F', + 'SEP_Electron_Energy_Flux_30_300_FOV_1F_data_quality', + 'SEP_Electron_Energy_Flux_30_300_FOV_1R', + 'SEP_Electron_Energy_Flux_30_300_FOV_1R_data_quality', + 'SEP_Electron_Energy_Flux_30_300_FOV_2F', + 'SEP_Electron_Energy_Flux_30_300_FOV_2F_data_quality', + 'SEP_Electron_Energy_Flux_30_300_FOV_2R', + 'SEP_Electron_Energy_Flux_30_300_FOV_2R_data_quality', + 'SEP_Look_direction_1F_MSO', + 'SEP_Look_direction_1R_MSO', + 'SEP_Look_direction_2F_MSO', + 'SEP_Look_direction_2R_MSO', + 'MAG_field_MSO', + 'MAG_field_MSO_data_quality', + 'MAG_field_GEO', + 'MAG_field_GEO_data_quality', + 'MAG_field_RMS_deviation', + 'MAG_field_RMS_deviation_data_quality', + 'NGIMS_He_density', + 'NGIMS_He_density_precision', + 'NGIMS_He_density_data_quality', + 'NGIMS_O_density', + 'NGIMS_O_density_precision', + 'NGIMS_O_density_data_quality', + 'NGIMS_CO_density', + 'NGIMS_CO_density_precision', + 'NGIMS_CO_density_data_quality', + 'NGIMS_N2_density', + 'NGIMS_N2_density_precision', + 'NGIMS_N2_density_data_quality', + 'NGIMS_NO_density', + 'NGIMS_NO_density_precision', + 'NGIMS_NO_density_data_quality', + 'NGIMS_Ar_density', + 'NGIMS_Ar_density_precision', + 'NGIMS_Ar_density_data_quality', + 'NGIMS_CO2_density', + 'NGIMS_CO2_density_precision', + 'NGIMS_CO2_density_data_quality', + 'NGIMS_Ion_density_32plus', + 'NGIMS_Ion_density_precision_32plus', + 'NGIMS_Ion_density_data_quality_32plus', + 'NGIMS_Ion_density_44plus', + 'NGIMS_Ion_density_precision_44plus', + 'NGIMS_Ion_density_data_quality_44plus', + 'NGIMS_Ion_density_30plus', + 'NGIMS_Ion_density_precision_30plus', + 'NGIMS_Ion_density_data_quality_30plus', + 'NGIMS_Ion_density_16plus', + 'NGIMS_Ion_density_precision_16plus', + 'NGIMS_Ion_density_data_quality_16plus', + 'NGIMS_Ion_density_28plus', + 'NGIMS_Ion_density_precision_28plus', + 'NGIMS_Ion_density_data_quality_28plus', + 'NGIMS_Ion_density_12plus', + 'NGIMS_Ion_density_precision_12plus', + 'NGIMS_Ion_density_data_quality_12plus', + 'NGIMS_Ion_density_17plus', + 'NGIMS_Ion_density_precision_17plus', + 'NGIMS_Ion_density_data_quality_17plus', + 'NGIMS_Ion_density_14plus', + 'NGIMS_Ion_density_precision_14plus', + 'NGIMS_Ion_density_data_quality_14plus', + 'SPICE_spacecraft_GEO', + 'SPICE_spacecraft_MSO', + 'SPICE_spacecraft_longitude_GEO', + 'SPICE_spacecraft_latitude_GEO', + 'SPICE_spacecraft_sza', + 'SPICE_spacecraft_local_time', + 'SPICE_spacecraft_altitude', + 'SPICE_spacecraft_attitude_GEO', + 'SPICE_spacecraft_attitude_MSO', + 'SPICE_app_attitude_GEO', + 'SPICE_app_attitude_MSO', + 'SPICE_Orbit_Number', + 'Inbound_Outbound_Flag', + 'SPICE_Mars_season', + 'SPICE_Mars_Sun_distance', + 'SPICE_Subsolar_Point_longitude_GEO', + 'SPICE_Subsolar_Point_latitude_GEO', + 'SPICE_Sub_Mars_Point_longitude', + 'SPICE_Sub_Mars_Point_latitude', + 'Rotation_matrix_IAU_MARS_MAVEN_MSO', + 'Rotation_matrix_SPACECRAFT_MAVEN_MSO'] + + for var in vars: + if var in meta_dict: + meta_dict[var]['FillVal'] = np.nan + + # Deal with string arrays + for var in meta_dict.keys(): + if 'Var_Notes' in meta_dict[var]: + meta_dict[var]['Var_Notes'] = ' '.join(pysat.utils.listify( + meta_dict[var]['Var_Notes'])) + + return meta_dict + +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 + +def load(fnames, tag='', inst_id='', keep_original_names=False): + """Load MAVEN kp data into `xarray.Dataset` object and `pysat.Meta` objects. + + This routine is called as needed by pysat. It is not intended + for direct user interaction. + + Parameters + ---------- + fnames : array-like + Iterable of filename strings, full path, to data files to be loaded. + This input is nominally provided by pysat itself. + tag : str + Tag name used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. (default='') + inst_id : str + Instrument ID used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. (default='') + keep_original_names : bool + If True then the names as given in the netCDF MAVEN file + will be used as is. If False, a preamble is removed. (default=False) + + Returns + ------- + data : xr.Dataset + An xarray Dataset with data prepared for the pysat.Instrument + meta : pysat.Meta + Metadata formatted for a pysat.Instrument object. + + Note + ---- + Any additional keyword arguments passed to pysat.Instrument + upon instantiation are passed along to this routine. + + The 'Altitude' dimension is renamed as 'Alt' to avoid confusion with the + 'Altitude' variable when performing xarray operations + + Examples + -------- + :: + + inst = pysat.Instrument('mvn', 'kp') + inst.load(2020, 1) + + """ + + + data = cdflib.cdf_to_xarray(fnames[0]) + + meta = [] + + xdata = mm_mvn.scrub_mvn_kp(data) + #this switches type to xarray + + # Add meta here + header_data = mm_mvn.generate_header_kp(data) + meta = mm_mvn.generate_metadata_kp(header_data,data) + + data = xdata + + return data,meta diff --git a/pysatNASA/instruments/mvn_mag.py b/pysatNASA/instruments/mvn_mag.py new file mode 100644 index 00000000..14635c4f --- /dev/null +++ b/pysatNASA/instruments/mvn_mag.py @@ -0,0 +1,230 @@ +# -*- coding: utf-8 -*- +"""Module for the MAVEN mag instrument. +Created by: Teresa Esman, NPP at GSFC +Last editted: Jul 13, 2023 + May 24, 2023 + May 12, 2023 + +Supports the Magnetometer (MAG) onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. +Accesses local data in CDF format. +Downloads from CDAWeb. + +Properties +---------- +platform + 'mvn' +name + 'mag' +tag + None supported + +Warnings +-------- + +- Only supports level-2 sunstate 1 second data. + + +Examples +-------- +:: + + import pysat + from pysat.utils import registry + registry.register_by_module(pysatNASA.instruments) + + + mag = pysat.Instrument(platform='MAVEN', name='mag') + mag.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) + mag.load(2020, 1, use_header = True) +""" + +import datetime as dt +import functools +import numpy as np +import cdflib +import pysat +from pysat.instruments.methods import general as mm_gen +from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa +from pysatNASA.instruments.methods import mvn as mm_mvn + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'mvn' +name = 'mag' +tags = {'': 'l2'} +inst_ids = {'': ['']} + +pandas_format = False + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {'': {'': dt.datetime(2020, 1, 1)}} +_test_load_opt = {'': {'': {'keep_original_names': True}}} + +# ---------------------------------------------------------------------------- +# Instrument methods + + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_mvn, name=name) + + +def preprocess(self, keep_original_names=False): + """Adjust epoch timestamps to datetimes and remove variable preambles. + + Parameters + ---------- + keep_original_names : bool + if True then the names as given in the netCDF MAVEN file + will be used as is. If False, a preamble is removed. (default=False) + + """ + + if not keep_original_names: + mm_gen.remove_leading_text(self, target='MAVEN_') + return + + +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 + + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the CDAWeb and pysat methods + +# Set the list_files routine +fname = ''.join(('mvn_mag_l2-sunstate-1sec_{year:04d}{month:02d}{day:02d}_', + 'v{version:02d}_r{revision:02d}.cdf')) +supported_tags = {'': {'': fname}} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the download routine +basic_tag = {'remote_dir': '/pub/data/maven/mag/l2/sunstate-1sec/cdfs/{year:04d}/{month:02d}', + 'fname': fname} +download_tags = {'': {'': basic_tag}} +download = functools.partial(cdw.download, supported_tags=download_tags) + +# Set the list_remote_files routine +list_remote_files = functools.partial(cdw.list_remote_files, + supported_tags=download_tags) + + +def filter_metadata(meta_dict): + """Filter mag metadata to remove warnings during loading. + + Parameters + ---------- + meta_dict : dict + Dictionary of metadata from file + + Returns + ------- + meta_dict : dict + Filtered mag metadata + + """ + vars = ['time', 'DDAY', 'OB_B_x', 'OB_B_y','OB_B_z', 'OB_B_range', + 'POSN_x','POSN_y','POSN_z', 'OB_BDPL_x','OB_BDPL_y','OB_BDPL_z', + 'OB_BDPL_range'] + + for var in vars: + if var in meta_dict: + meta_dict[var]['FillVal'] = np.nan + + # Deal with string arrays + for var in meta_dict.keys(): + if 'Var_Notes' in meta_dict[var]: + meta_dict[var]['Var_Notes'] = ' '.join(pysat.utils.listify( + meta_dict[var]['Var_Notes'])) + + return meta_dict + +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 + +def load(fnames, tag='', inst_id='', keep_original_names=False): + """Load MAVEN mag data into `xarray.Dataset` object and `pysat.Meta` objects. + + This routine is called as needed by pysat. It is not intended + for direct user interaction. + + Parameters + ---------- + fnames : array-like + Iterable of filename strings, full path, to data files to be loaded. + This input is nominally provided by pysat itself. + tag : str + Tag name used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. (default='') + inst_id : str + Instrument ID used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. (default='') + keep_original_names : bool + If True then the names as given in the netCDF MAVEN file + will be used as is. If False, a preamble is removed. (default=False) + + Returns + ------- + data : xr.Dataset + An xarray Dataset with data prepared for the pysat.Instrument + meta : pysat.Meta + Metadata formatted for a pysat.Instrument object. + + Note + ---- + Any additional keyword arguments passed to pysat.Instrument + upon instantiation are passed along to this routine. + + + Examples + -------- + :: + + inst = pysat.Instrument('mvn', 'mag') + inst.load(2020, 1) + + """ + + + data = cdflib.cdf_to_xarray(fnames[0]) + + meta = [] + + xdata = mm_mvn.scrub_mvn_mag(data) + # mm_mvn.scrub_mvn_mag switches the type to xarray + + # Add meta here + header_data = mm_mvn.generate_header(data) + meta = mm_mvn.generate_metadata(header_data,data) + + data = xdata + + return data,meta From 7e194134fec30c4b931b4c6c92a76f7a678e8982 Mon Sep 17 00:00:00 2001 From: Jeff Klenzing Date: Thu, 13 Jul 2023 14:54:19 -0400 Subject: [PATCH 02/33] Merge branch 'develop' into maven_mgs_jk --- .github/ISSUE_TEMPLATE/bug_report.md | 34 +- .github/ISSUE_TEMPLATE/feature_request.md | 24 +- .github/ISSUE_TEMPLATE/question.md | 19 + .github/pull_request_template.md | 13 +- .github/workflows/docs.yml | 9 +- .github/workflows/main.yml | 42 +- .github/workflows/pip_rc_install.yml | 40 ++ .github/workflows/pysat_rc.yml | 14 +- .gitignore | 3 + .readthedocs.yml | 22 + .zenodo.json | 5 + CHANGELOG.md | 63 +++ CONTRIBUTING.md | 55 ++- LICENSE | 2 +- README.md | 56 ++- docs/conf.py | 18 +- docs/figures/{logo.png => pysatnasa_logo.png} | Bin docs/installation.rst | 28 +- docs/overview.rst | 2 +- docs/supported_constellations.rst | 2 + docs/supported_instruments.rst | 72 ++++ pyproject.toml | 88 ++++ pysatNASA/__init__.py | 14 +- pysatNASA/constellations/de2.py | 23 +- pysatNASA/constellations/icon.py | 22 +- pysatNASA/instruments/__init__.py | 12 +- pysatNASA/instruments/ace_epam_l2.py | 101 +++++ pysatNASA/instruments/ace_mag_l2.py | 127 ++++++ pysatNASA/instruments/ace_sis_l2.py | 96 +++++ pysatNASA/instruments/ace_swepam_l2.py | 100 +++++ pysatNASA/instruments/cnofs_ivm.py | 45 +- pysatNASA/instruments/cnofs_plp.py | 40 +- pysatNASA/instruments/cnofs_vefi.py | 22 +- pysatNASA/instruments/de2_fpi.py | 107 +++++ pysatNASA/instruments/de2_lang.py | 25 +- pysatNASA/instruments/de2_nacs.py | 27 +- pysatNASA/instruments/de2_rpa.py | 52 ++- pysatNASA/instruments/de2_vefi.py | 105 +++++ pysatNASA/instruments/de2_wats.py | 27 +- pysatNASA/instruments/dmsp_ssusi.py | 124 ++++++ pysatNASA/instruments/formosat1_ivm.py | 15 +- pysatNASA/instruments/icon_euv.py | 18 +- pysatNASA/instruments/icon_fuv.py | 21 +- pysatNASA/instruments/icon_ivm.py | 16 +- pysatNASA/instruments/icon_mighti.py | 47 +- pysatNASA/instruments/igs_gps.py | 134 ++++++ pysatNASA/instruments/iss_fpmu.py | 32 +- pysatNASA/instruments/jpl_gps.py | 47 +- pysatNASA/instruments/methods/__init__.py | 5 + pysatNASA/instruments/methods/_cdf.py | 55 ++- pysatNASA/instruments/methods/ace.py | 87 ++++ pysatNASA/instruments/methods/cdaweb.py | 408 ++++++++++++++---- pysatNASA/instruments/methods/de2.py | 17 +- pysatNASA/instruments/methods/dmsp.py | 16 + pysatNASA/instruments/methods/general.py | 47 +- pysatNASA/instruments/methods/gold.py | 24 -- pysatNASA/instruments/methods/gps.py | 8 +- pysatNASA/instruments/methods/igs.py | 45 ++ pysatNASA/instruments/methods/jhuapl.py | 335 ++++++++++++++ pysatNASA/instruments/methods/omni.py | 19 +- pysatNASA/instruments/methods/ses14.py | 24 ++ pysatNASA/instruments/methods/timed.py | 33 ++ pysatNASA/instruments/omni_hro.py | 62 +-- pysatNASA/instruments/ses14_gold.py | 193 +++++++-- pysatNASA/instruments/timed_guvi.py | 199 +++++++++ pysatNASA/instruments/timed_saber.py | 42 +- pysatNASA/instruments/timed_see.py | 53 +-- pysatNASA/tests/test_instruments.py | 94 +++- pysatNASA/tests/test_methods_cdaweb.py | 35 +- pysatNASA/tests/test_methods_platform.py | 129 ++++++ pysatNASA/version.txt | 1 - requirements.txt | 11 +- setup.cfg | 62 +-- setup.py | 17 - 74 files changed, 3269 insertions(+), 762 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/workflows/pip_rc_install.yml create mode 100644 .readthedocs.yml rename docs/figures/{logo.png => pysatnasa_logo.png} (100%) create mode 100644 pyproject.toml create mode 100644 pysatNASA/instruments/ace_epam_l2.py create mode 100644 pysatNASA/instruments/ace_mag_l2.py create mode 100644 pysatNASA/instruments/ace_sis_l2.py create mode 100644 pysatNASA/instruments/ace_swepam_l2.py create mode 100644 pysatNASA/instruments/de2_fpi.py create mode 100644 pysatNASA/instruments/de2_vefi.py create mode 100644 pysatNASA/instruments/dmsp_ssusi.py create mode 100644 pysatNASA/instruments/igs_gps.py create mode 100644 pysatNASA/instruments/methods/ace.py create mode 100644 pysatNASA/instruments/methods/dmsp.py delete mode 100644 pysatNASA/instruments/methods/gold.py create mode 100644 pysatNASA/instruments/methods/igs.py create mode 100644 pysatNASA/instruments/methods/jhuapl.py create mode 100644 pysatNASA/instruments/methods/ses14.py create mode 100644 pysatNASA/instruments/methods/timed.py create mode 100644 pysatNASA/instruments/timed_guvi.py create mode 100644 pysatNASA/tests/test_methods_platform.py delete mode 100644 pysatNASA/version.txt delete mode 100644 setup.py diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 23d236d6..57640182 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,35 +1,29 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to report a problem that needs to be fixed +labels: bug +title: "BUG: " --- -**Describe the bug** -A clear and concise description of what the bug is. +# Description +A clear and concise description of what the bug is, including a description +of what you expected the outcome to be. -**To Reproduce** +# To Reproduce this bug: Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -or +Consider including images or test files to help others reproduce the bug and +solve the problem. -``` -# test code here -``` - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Version [e.g. Python 3.7] +## Test configuration + - OS: [e.g. Hal] + - Version [e.g. Python 3.47] - Other details about your setup that could be relevant -**Additional context** -Add any other context about the problem here. +# Additional context +Add any other context about the problem here, including expected behaviour. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 066b2d92..d02da2ef 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,17 +1,27 @@ --- name: Feature request about: Suggest an idea for this project +title: "ENH: " +labels: enhancement --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +# Description +A clear and concise description of the new feature or behaviour you would like. -**Describe the solution you'd like** +## Potential impact + +- Is the feature related to an existing problem? +- How critical is this feature to your workflow? +- How wide of an impact to you anticipate this enhancement having? +- Would this break any existing functionality? + +## Potential solution(s) A clear and concise description of what you want to happen. -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. +# Alternatives +A clear description of any alternative solutions or features you've considered. -**Additional context** -Add any other context or screenshots about the feature request here. +# Additional context +Add any other context or screenshots about the feature request here, potentially +including your operational configuration. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..da43edc7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,19 @@ +--- +name: Question +about: A question about this project +title: "QUEST: " +labels: question + +--- + +# Description +A clear and concise summary of your query + +## Example code (optional) +If relevant, include sample code, images, or files so that others can understand +the full context of your question. + +## Configuration + - OS: [e.g. Hal] + - Version: [e.g. Python 3.47] + - Other details about your setup that could be relevant diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5331eb30..e1d2dbe5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,12 +1,12 @@ # Description -Addresses # (issue) +Addresses #(issue) Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Please see ``CONTRIBUTING.md`` for more guidelines. -## Type of change +# Type of change Please delete options that are not relevant. @@ -25,9 +25,9 @@ your test configuration - Test A - Test B -## Test Configuration -* Operating system: [Os Type] -* Version number: [Python 2.9] +**Test Configuration**: +* Operating system: Hal +* Version number: Python 3.X * Any details about your local setup that are relevant # Checklist: @@ -43,3 +43,6 @@ your test configuration - [ ] Any dependent changes have been merged and published in downstream modules - [ ] Add a note to ``CHANGELOG.md``, summarizing the changes - [ ] Update zenodo.json file for new code contributors + +If this is a release PR, replace the first item of the above checklist with the release +checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dffe178e..fe6d6ca4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# This workflow will install Python dependencies and check the sphinx build, links in the docs, and the readability of the zenodo file # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Documentation Check @@ -8,11 +8,11 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ["ubuntu-latest"] strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: ["3.10"] # Keep this version at the highest supported Python version name: Documentation tests steps: @@ -25,8 +25,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r test_requirements.txt - pip install -r requirements.txt + pip install .[doc] - name: Set up pysat run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be920387..61125636 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,13 +10,19 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10"] - numpy_ver: [latest] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.10", "3.11"] + numpy_ver: ["latest"] + test_config: ["latest"] include: - - python-version: "3.8" - numpy_ver: "1.20" + - python-version: "3.9" + numpy_ver: "1.21" os: ubuntu-latest + test_config: "NEP29" + - python-version: "3.6.8" + numpy_ver: "1.19.5" + os: "ubuntu-20.04" + test_config: "Ops" name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }} runs-on: ${{ matrix.os }} @@ -31,18 +37,25 @@ jobs: if: ${{ matrix.os == 'macos-latest' }} run: brew reinstall gcc + - name: Install Operational dependencies + if: ${{ matrix.test_config == 'Ops'}} + run: | + pip install --no-cache-dir numpy==${{ matrix.numpy_ver }} + pip install "cdflib<1.0" + pip install -r requirements.txt + pip install -r test_requirements.txt + pip install . + - name: Install NEP29 dependencies - if: ${{ matrix.numpy_ver != 'latest'}} + if: ${{ matrix.test_config == 'NEP29'}} run: | - pip install --no-binary :numpy: numpy==${{ matrix.numpy_ver }} - # Need to force a version of pandas compliant with NEP29 - pip install "pandas<1.5" + pip install numpy==${{ matrix.numpy_ver }} + pip install --upgrade-strategy only-if-needed .[test] - name: Install standard dependencies + if: ${{ matrix.test_config == 'latest'}} run: | - pip install -r requirements.txt - pip install pysatCDF --no-binary=pysatCDF - pip install -r test_requirements.txt + pip install .[test] - name: Set up pysat run: | @@ -56,10 +69,9 @@ jobs: run: flake8 . --count --exit-zero --max-complexity=10 --statistics - name: Test with pytest - run: | - pytest -vs --cov=pysatNASA/ + run: pytest - name: Publish results to coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: coveralls --rcfile=setup.cfg --service=github + run: coveralls --rcfile=pyproject.toml --service=github diff --git a/.github/workflows/pip_rc_install.yml b/.github/workflows/pip_rc_install.yml new file mode 100644 index 00000000..5191c994 --- /dev/null +++ b/.github/workflows/pip_rc_install.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies and the latest RC of pysatNASA from test pypi. +# This test should be manually run before a pysatNASA RC is officially approved and versioned. +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Test install of latest RC from pip + +on: [workflow_dispatch] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.10"] # Keep this version at the highest supported Python version + + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install standard dependencies + run: pip install -r requirements.txt + + - name: Install pysatNASA RC + run: pip install --no-deps --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysatNASA + + - name: Set up pysat + run: | + mkdir pysatData + python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'" + + - name: Check that install imports correctly + run: | + cd .. + python -c "import pysatNASA; print(pysatNASA.__version__)" diff --git a/.github/workflows/pysat_rc.yml b/.github/workflows/pysat_rc.yml index ec9e4d20..b6292e18 100644 --- a/.github/workflows/pysat_rc.yml +++ b/.github/workflows/pysat_rc.yml @@ -1,4 +1,6 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# This workflow will install Python dependencies and the latest RC of pysat from test pypi. +# All unit tests for pysatNASA will be run using the pysat RC. +# This test should be manually run before a pysat RC is officially approved and versioned. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Test with latest pysat RC @@ -10,8 +12,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10"] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.10"] # Keep this version at the highest supported Python version name: Python ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -27,14 +29,12 @@ jobs: run: brew reinstall gcc - name: Install pysat RC - run: | - pip install -r test_requirements.txt - pip install --no-deps -i https://test.pypi.org/simple/ pysat + run: pip install --no-deps --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysat - name: Install standard dependencies run: | pip install -r requirements.txt - pip install pysatCDF --no-binary=pysatCDF + pip install -r test_requirements.txt - name: Set up pysat run: | diff --git a/.gitignore b/.gitignore index 6db464db..c8350919 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,6 @@ custom_lint.sh # IDEs .idea/ + +# vscode +.vscode diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..23fa5ade --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,22 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/requirements.txt diff --git a/.zenodo.json b/.zenodo.json index a5bcff9a..1052a817 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -27,6 +27,11 @@ { "name": "Spence, Carey", "orcid": "0000-0001-8340-5625" + }, + { + "affilitation":"University of Colorado at Boulder", + "name": "Navarro, Luis", + "orcid": "0000-0002-6362-6575" } ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a1d903..45d86081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,69 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [0.0.5] - 2023-XX-XX +* New Instruments + * ACE EPAM + * ACE MAG + * ACE SIS + * ACE SWEPAM + * DE2 Fabry-Perot Interferometer (FPI) + * DE2 Vector Electric Field Instrument (VEFI) and magnetometer + * DMSP SSUSI EDR-Aurora data + * IGS GPS (TEC and ROTI) + * SES-14 GOLD -- tdisk, tlimb and o2den data products added + * 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 + * Pandas datasets made with cdflib now have header level meta + * Updated CDAWeb routines to allow for data stored by year/day-of-year + * Updated GOLD nmax to sort scans by time. + * Added 1 usec to GOLD nmax channel B times to ensure uniqueness + * Fixed multi-file loads for cdf xarray datasets. + * Adds a 0.1 sec delay between file downloads to avoid excessive calls + to servers. +* Documentation + * Added TIMED-GUVI platform + * Added missing sub-module imports + * Added discussion of ICON constellation to docstrings, including caveats +* Enhancements + * Updated platform methods to follow a consistent style and work with the + general `init` function + * Added unit tests for the different platform method attributes + * xarray support for TIMED SABER and SEE + * Added `drop_dims` kwarg to `load_xarray` interface so that orphan dims can + be removed before attempting to merge. + * Added `var_translation` kwarg to `load_xarray` interface so that variables can + be renamed before attempting to merge. + * Improved usage of cdflib for users in xarray instruments + * Added a generalized `clean` routine to replace fill vals with NaNs +* Deprecations + * Deprecated jpl_gps instrtument module, moved roti instrument to igs_gps +* Maintenance + * Updated download functions to take data_path as an arg, not a kwarg + * Removed duplicate tests if pysatCDF not isntalled + * Removed pysatCDF tests on GitHub Actions workflows (see #167) + * Updated actions and templates based on pysatEcosystem docs + * Remove pandas cap on NEP29 tests + * Updated dosctring style for consistency + * Removed version cap for xarray + * Added manual workflow to check that latest RC is installable through test pip + * Update meta label type for instruments + * Updated GitHub Actions workflows for improved compliance with pip>=23.0 + * Added .readthedocs.yml to configure settings there. + * Use pyproject.toml to manage installation and metadata + * Set use_cdflib=True for supported xarray instruments + * Set pysat 3.1.0 minimum + * Use pysat logger to raise non-deprecation warnings + * Update syntax based on latest pysat deprecations to make the code compatible with pysat 3.2.0. + * Updated syntax compliance with cdflib 1.0+ + * Updated use of `decode_times` kwarg when loading xarray data to maintain current behaviour + ## [0.0.4] - 2022-11-07 * Update instrument tests with new test class * Support xarray datasets through cdflib diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e9b2a04..45943ed4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,33 +78,44 @@ To set up `pysatNASA` for local development: 4. When you're done making changes, run all the checks to ensure that nothing - is broken on your local system, as well as check for flake8 compliance: + is broken on your local system: - ``` - pytest -vs --flake8 pysatNASA - ``` + ``` + pytest pysatNASA + ``` + +5. You should also check for flake8 style compliance: + + ``` + flake8 . --count --select=D,E,F,H,W --show-source --statistics + ``` -5. Update/add documentation (in ``docs``), if relevant + Note that pysat uses the `flake-docstrings` and `hacking` packages to ensure + standards in docstring formatting. -6. Add your name to the .zenodo.json file as an author -7. Commit your changes: - ``` - git add . - git commit -m "AAA: Brief description of your changes" - ``` - Where AAA is a standard shorthand for the type of change (eg, BUG or DOC). - `pysat` follows the [numpy development workflow](https://numpy.org/doc/stable/dev/development_workflow.html), - see the discussion there for a full list of this shorthand notation. +6. Update/add documentation (in ``docs``), if relevant -8. Once you are happy with the local changes, push to Github: - ``` - git push origin name-of-your-bugfix-or-feature - ``` - Note that each push will trigger the Continuous Integration workflow. +7. Add your name to the .zenodo.json file as an author + +8. Commit your changes: + ``` + git add . + git commit -m "AAA: Brief description of your changes" + ``` + Where AAA is a standard shorthand for the type of change (eg, BUG or DOC). + `pysat` follows the [numpy development workflow](https://numpy.org/doc/stable/dev/development_workflow.html), + see the discussion there for a full list of this shorthand notation. + +9. Once you are happy with the local changes, push to Github: + ``` + git push origin name-of-your-bugfix-or-feature + ``` + Note that each push will trigger the Continuous Integration workflow. -9. Submit a pull request through the GitHub website. Pull requests should be - made to the ``develop`` branch. +10. Submit a pull request through the GitHub website. Pull requests should be + made to the ``develop`` branch. Note that automated tests will be run on + github actions, but these must be initialized by a member of the pysat team. Pull Request Guidelines ----------------------- @@ -160,3 +171,5 @@ These include: * Block and inline comments should use proper English grammar and punctuation with the exception of single sentences in a block, which may then omit the final period +* When casting is necessary, use `np.int64` and `np.float64` to ensure operating + system agnosticism diff --git a/LICENSE b/LICENSE index c9a10064..666d8f5d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020, pysat +Copyright (c) 2023, pysat All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index d04d1045..de310e27 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- pysatNASA + pysatNASA
# pysatNASA: pysat support for NASA Space Science instruments @@ -20,37 +20,41 @@ some examples on how to use the routines pysatNASA uses common Python modules, as well as modules developed by and for the Space Physics community. This module officially supports -Python 3.8+. - -| Common modules | Community modules | -| ---------------- | ----------------- | -| beautifulsoup4 | cdflib | -| lxml | pysat>=3.0.4 | -| netCDF4 | | -| numpy | | -| pandas | | -| requests | | -| xarray<2022.11 | | +Python 3.6+. + +| Common modules | Community modules | Optional Modules | +| ---------------- | ----------------- |------------------| +| beautifulsoup4 | cdflib>=0.4.4 | pysatCDF | +| lxml | pysat>=3.1.0 | | +| netCDF4 | | | +| numpy | | | +| pandas | | | +| requests | | | +| xarray | | | + +## PyPi Installation +``` +pip install pysatNASA +``` ## GitHub Installation -Currently, the main way to get pysatNASA is through github. - ``` git clone https://github.com/pysat/pysatNASA.git ``` -Change directories into the repository folder and run the setup.py file. For +Change directories into the repository folder and build the project. For a local install use the "--user" flag after "install". ``` cd pysatNASA/ -python setup.py install +pip install . ``` Note: pre-1.0.0 version ----------------------- pysatNASA is currently in an initial development phase and requires pysat 3.0.4. +Feedback and contributions are appreciated. # Using with pysat @@ -62,7 +66,9 @@ from pysatNASA.instruments import icon_ivm ivm = pysat.Instrument(inst_module=icon_ivm, inst_id='a') ``` -Another way to use the instruments in an external repository is to register the instruments. This only needs to be done the first time you load an instrument. Afterward, pysat will identify them using the `platform` and `name` keywords. +Another way to use the instruments in an external repository is to register the +instruments. This only needs to be done the first time you load an instrument. +Afterward, pysat will identify them using the `platform` and `name` keywords. ``` import pysat @@ -70,3 +76,19 @@ import pysat pysat.utils.registry.register(['pysatNASA.instruments.icon_ivm']) ivm = pysat.Instrument('icon', 'ivm', inst_id='a') ``` + +# CDF Integration +For data products stored as CDF files, this package can use either `cdflib` or +`pysatCDF`. Note that `cdflib` is a pure python package and more readily +deployable across systems, whereas `pysatCDF` interfaces with the fortran. +This is a faster approach for loading data, but may not install on all systems. +There are known issues with `numpy`>=1.24. Therefore, `pysatCDF` is optional +rather than required. + +You can specify which load routine to use via the optional `use_cdflib` kwarg. +If no kwarg is specified, `pysatNASA` will default to `pysatCDF` if it is +successfully installed, and default to `cdflib` otherwise. + +``` +ivm = pysat.Instrument('cnofs', 'ivm', use_cdflib=True) +``` diff --git a/docs/conf.py b/docs/conf.py index c3398628..43245c9d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,6 +10,7 @@ import json import os +import pkg_resources import sys sys.path.insert(0, os.path.abspath('..')) @@ -52,19 +53,18 @@ master_doc = 'index' # General information about the project. -zenodo = json.loads(open('../.zenodo.json').read()) project = 'pysatNASA' -author = ', '.join([creator['name'] for creator in zenodo['creators']]) -manual_copyright = ', '.join(['2021', author]) title = '{:s} Documentation'.format(project) +zenodo = json.loads(open('../.zenodo.json').read()) +author = ', '.join([creator['name'] for creator in zenodo['creators']]) +manual_copyright = ', '.join(['2023', author]) +category = 'Space Physics' description = 'Tools for NASA CDAWeb instruments.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. -doc_dir = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(doc_dir, "..", project, "version.txt"), "r") as fin: - version = fin.read().strip() +version = pkg_resources.get_distribution('pysatNASA').version release = '{:s}-alpha'.format(version) # Include alpha/beta/rc tags. # The language for content autogenerated by Sphinx. Refer to documentation @@ -96,7 +96,7 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_logo = os.path.join(os.path.abspath('.'), 'figures', 'logo.png') +html_logo = os.path.join(os.path.abspath('.'), 'figures', 'pysatnasa_logo.png') html_theme_options = {'logo_only': True} # Add any paths that contain custom static files (such as style sheets) here, @@ -148,8 +148,8 @@ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) -texinfo_documents = [(master_doc, project, title, author, project, description, - 'Space Physics')] +texinfo_documents = [(master_doc, project, title, author, project, + description, category)] # -- Options for Epub output ---------------------------------------------- diff --git a/docs/figures/logo.png b/docs/figures/pysatnasa_logo.png similarity index 100% rename from docs/figures/logo.png rename to docs/figures/pysatnasa_logo.png diff --git a/docs/installation.rst b/docs/installation.rst index 82f840fa..7b5858b7 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -14,18 +14,18 @@ Prerequisites pysatNASA uses common Python modules, as well as modules developed by and for the Space Physics community. This module officially supports -Python 3.8+ and pysat 3.0.4+. +Python 3.6+ and pysat 3.1.0+. ================== ================= Common modules Community modules ================== ================= beautifulsoup4 cdflib>=0.4.4 - lxml pysat>=3.0.4 + lxml pysat>=3.1.0 netCDF4 numpy pandas requests - xarray<2022.11 + xarray ================== ================= @@ -40,24 +40,32 @@ Installation Options 2. Install pysatNASA: - Change directories into the repository folder and run the setup.py file. + Change directories into the repository folder and build the project. There are a few ways you can do this: A. Install on the system (root privileges required):: - sudo python setup.py install + sudo pip install . + B. Install at the user level:: - python setup.py install --user - C. Install with the intent to develop locally:: + pip install --user . + + C. Install with the intent to change the code:: + + + pip install --user -e . +.. extras-require:: pysatcdf + :pyproject: - python setup.py develop --user +.. extras-require:: test + :pyproject: -.. extras-require:: all - :setup.cfg: +.. extras-require:: doc + :pyproject: .. _post-install: diff --git a/docs/overview.rst b/docs/overview.rst index c103d568..4c8a8d4e 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -5,7 +5,7 @@ This is a library of ``pysat`` instrument modules and methods designed to suppor NASA instruments and missions archived at the Community Data Analysis Web portal. -.. image:: figures/logo.png +.. image:: figures/pysatnasa_logo.png :width: 400px :align: center :alt: pysatNASA Logo, a blue planet with red orbiting python and the module name superimposed diff --git a/docs/supported_constellations.rst b/docs/supported_constellations.rst index f5ebf71f..d7e7eaa3 100644 --- a/docs/supported_constellations.rst +++ b/docs/supported_constellations.rst @@ -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: diff --git a/docs/supported_instruments.rst b/docs/supported_instruments.rst index 054bc982..0980414e 100644 --- a/docs/supported_instruments.rst +++ b/docs/supported_instruments.rst @@ -1,6 +1,38 @@ Supported Instruments ===================== +.. _ace_epam: + +ACE EPAM +-------- + +.. automodule:: pysatNASA.instruments.ace_epam_l2 + :members: + +.. _ace_mag: + +ACE MAG +------- + +.. automodule:: pysatNASA.instruments.ace_mag_l2 + :members: + +.. _ace_sis: + +ACE SIS +------- + +.. automodule:: pysatNASA.instruments.ace_sis_l2 + :members: + +.. _ace_swepam: + +ACE SWEPAM +---------- + +.. automodule:: pysatNASA.instruments.ace_swepam_l2 + :members: + .. _cnofs_ivm: C/NOFS IVM @@ -25,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 @@ -49,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 @@ -57,6 +105,14 @@ DE2 WATS .. automodule:: pysatNASA.instruments.de2_wats :members: +.. _dmsp_ssusi: + +DMSP SSUSI +---------- + +.. automodule:: pysatNASA.instruments.dmsp_ssusi + :members: + .. _formosat1_ivm: FORMOSAT-1 IVM @@ -98,6 +154,14 @@ ICON MIGHTI .. automodule:: pysatNASA.instruments.icon_mighti :members: +.. _igs_gps: + +IGS GPS +------- + +.. automodule:: pysatNASA.instruments.igs_gps + :members: + .. _iss_fpmu: ISS FPMU @@ -130,6 +194,14 @@ SES14 GOLD .. automodule:: pysatNASA.instruments.ses14_gold :members: +.. _timed_guvi: + +TIMED GUVI +---------- + +.. automodule:: pysatNASA.instruments.timed_guvi + :members: + .. _timed_saber: TIMED SABER diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..646969a3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,88 @@ +[build-system] +requires = ["setuptools", "pip >= 10"] +build-backend = "setuptools.build_meta" + +[project] +name = "pysatNASA" +version = "0.0.5" +description = "pysat support for NASA Instruments" +readme = "README.md" +requires-python = ">=3.6" +license = {file = "LICENSE"} +authors = [ + {name = "Jeff Klenzing, et al.", email = "pysat.developers@gmail.com"}, +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Topic :: Scientific/Engineering :: Astronomy", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Scientific/Engineering :: Atmospheric Science", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows" +] +keywords = [ + "pysat", + "ionosphere", + "magnetosphere", + "solar wind", + "thermosphere" +] +dependencies = [ + "beautifulsoup4", + "cdasws", + "cdflib >= 0.4.4", + "lxml", + "netCDF4", + "numpy", + "pandas", + "pysat >= 3.1", + "requests", + "xarray" +] + +[project.optional-dependencies] +pysatcdf = ["pysatCDF"] +test = [ + "coveralls < 3.3", + "flake8", + "flake8-docstrings", + "hacking >= 1.0", + "pytest", + "pytest-cov", + "pytest-ordering" +] +doc = [ + "extras_require", + "ipython", + "m2r2", + "numpydoc", + "sphinx", + "sphinx_rtd_theme" +] + +[project.urls] +Documentation = "https://pysatnasa.readthedocs.io/en/latest/" +Source = "https://github.com/pysat/pysatNASA" + +[tool.coverage.report] +omit = ["*/instruments/templates/"] + +[tool.pytest.ini_options] +addopts = "-vs --cov=pysatNASA" +markers = [ + "all_inst", + "download", + "no_download", + "load_options", + "first", + "second" +] diff --git a/pysatNASA/__init__.py b/pysatNASA/__init__.py index 1df92789..ea9f8ff2 100644 --- a/pysatNASA/__init__.py +++ b/pysatNASA/__init__.py @@ -6,13 +6,15 @@ """ -import os +import importlib +import importlib_metadata + from pysatNASA import constellations # noqa F401 from pysatNASA import instruments # noqa F401 # set version -here = os.path.abspath(os.path.dirname(__file__)) -version_filename = os.path.join(here, 'version.txt') -with open(version_filename, 'r') as version_file: - __version__ = version_file.read().strip() -del here, version_filename, version_file +try: + __version__ = importlib.metadata.version('pysatNASA') +except AttributeError: + # Python 3.6 requires a different version + __version__ = importlib_metadata.version('pysatNASA') diff --git a/pysatNASA/constellations/de2.py b/pysatNASA/constellations/de2.py index eca99b6a..2a5ad572 100644 --- a/pysatNASA/constellations/de2.py +++ b/pysatNASA/constellations/de2.py @@ -1,13 +1,32 @@ -"""Creates a constellation from the NASA DE2 satellite platform.""" +"""Creates a constellation from the NASA DE2 satellite platform. + +Includes the core supported instruments. + + +Examples +-------- +:: + + import pysat + import pysatNASA + + de2 = pysat.Constellation(const_module=pysatNASA.constellations.de2) + + de2.load(1983, 1) + + +""" import pysat 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] diff --git a/pysatNASA/constellations/icon.py b/pysatNASA/constellations/icon.py index 3df198a0..42cd6462 100644 --- a/pysatNASA/constellations/icon.py +++ b/pysatNASA/constellations/icon.py @@ -1,4 +1,24 @@ -"""Creates a constellation from NASA the ICON satellite platform.""" +"""Creates a constellation from NASA the ICON satellite platform. + +Includes the core instruments without the line of sight winds. + +Note that IVM A and B are nominally never active at the same time. This +constellation should be initialized with `common_index=False`. This forgoes +the pysat check that ensures all instruments load data. + +Examples +-------- +:: + + import pysat + import pysatNASA + + icon = pysat.Constellation(const_module=pysatNASA.constellations.icon, + common_index=False) + + icon.load(2020, 1) + +""" import pysat diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index a56c7e99..60967d8a 100644 --- a/pysatNASA/instruments/__init__.py +++ b/pysatNASA/instruments/__init__.py @@ -4,13 +4,15 @@ Each instrument is contained within a subpackage of this set. """ +from pysatNASA.instruments import methods # noqa F401 -__all__ = ['cnofs_ivm', 'cnofs_plp', 'cnofs_vefi', - 'de2_lang', 'de2_nacs', 'de2_rpa', 'de2_wats', - 'formosat1_ivm', +__all__ = ['ace_epam_l2', 'ace_mag_l2', 'ace_sis_l2', 'ace_swepam_l2', + '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', - 'timed_saber', 'timed_see','mvn_kp','mvn_mag'] + 'igs_gps', 'iss_fpmu', 'jpl_gps', 'mvn_kp', 'mvn_mag', 'omni_hro', + 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] for inst in __all__: exec("from pysatNASA.instruments import {x}".format(x=inst)) diff --git a/pysatNASA/instruments/ace_epam_l2.py b/pysatNASA/instruments/ace_epam_l2.py new file mode 100644 index 00000000..61dddf8e --- /dev/null +++ b/pysatNASA/instruments/ace_epam_l2.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +"""Module for the Advanced Composition Explorer (ACE) EPAM instrument. + +Properties +---------- +platform + 'ace' +name + 'epam_l2' +tag + 'base' or 'key' +inst_id + '12sec', '5min', '1hr' + +References +---------- +- Stone, E., Frandsen, A., Mewaldt, R. et al. The Advanced Composition Explorer. + Space Science Reviews 86, 1–22 (1998). https://doi.org/10.1023/A:1005082526237 +- Gold, R., Krimigis, S., Hawkins, S. et al. Electron, Proton, and Alpha Monitor + on the Advanced Composition Explorer spacecraft. Space Science Reviews 86, + 541–562 (1998). https://doi.org/10.1023/A:1005088115759 + +Note +---- +- Level 1 ACE data is maintained at pysatSpaceWeather. +- Release notes at + https://cdaweb.gsfc.nasa.gov/pub/data/ace/epam/epam_level2_release_notes.txt + +Warnings +-------- +- The cleaning parameters for the instrument are still under development. + +""" + +import datetime as dt +import functools + +from pysat.instruments.methods import general as mm_gen + +from pysatNASA.instruments.methods import ace as mm_ace +from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'ace' +name = 'epam_l2' +tags = {'base': 'ACE/EPAM Solar Energetic Particle Base Data', + 'key': 'ACE/EPAM Solar Energetic Particle Key Parameters'} +inst_ids = {'12sec': ['base'], + '5min': ['key', 'base'], + '1hr': ['key', 'base']} + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {id: {tag: dt.datetime(2022, 1, 1) for tag in inst_ids[id]} + for id in inst_ids.keys()} + +# ---------------------------------------------------------------------------- +# Instrument methods + + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_ace, name=name) + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# Instrument functions +# + +# Use the default CDAWeb and pysat methods + +# Set the list_files routine +strid = {'12sec': {'base': 'h3'}, + '5min': {'base': 'h1', 'key': 'k0'}, + '1hr': {'base': 'h2', 'key': 'k1'}} +fname = ''.join(('ac_{sid:s}_epm_{{year:4d}}{{month:02d}}{{day:02d}}_', + 'v{{version:02d}}.cdf')) +supported_tags = {id: {tag: fname.format(sid=strid[id][tag]) + for tag in inst_ids[id]} + for id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the load routine +load = functools.partial(mm_ace.load, to_pandas=True) + +# Set the download routine +download_tags = {'12sec': {'base': 'AC_H3_EPM'}, + '5min': {'base': 'AC_H1_EPM', 'key': 'AC_K0_EPM'}, + '1hr': {'base': 'AC_H2_EPM', 'key': 'AC_K1_EPM'}} + +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) diff --git a/pysatNASA/instruments/ace_mag_l2.py b/pysatNASA/instruments/ace_mag_l2.py new file mode 100644 index 00000000..dfe26153 --- /dev/null +++ b/pysatNASA/instruments/ace_mag_l2.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +"""Module for the Advanced Composition Explorer (ACE) MAG instrument. + +Properties +---------- +platform + 'ace' +name + 'mag_l2' +tag + 'base' or 'key' +inst_id + '1sec', '16sec', '4min', '5min', '1hr' + +References +---------- +- Stone, E., Frandsen, A., Mewaldt, R. et al. The Advanced Composition Explorer. + Space Science Reviews 86, 1–22 (1998). https://doi.org/10.1023/A:1005082526237 +- Smith, C., L'Heureux, J., Ness, N. et al. The ACE Magnetic Fields Experiment. + Space Science Reviews 86, 613–632 (1998). + https://doi.org/10.1023/A:1005092216668 + +Note +---- +- Level 1 ACE data is maintained at pysatSpaceWeather. +- Release notes at + https://cdaweb.gsfc.nasa.gov/pub/data/ace/mag/mag_level2_release_notes.txt + +Warnings +-------- +- The cleaning parameters for the instrument are still under development. + +""" + +import datetime as dt +import functools + +from pysat.instruments.methods import general as mm_gen + +from pysatNASA.instruments.methods import ace as mm_ace +from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'ace' +name = 'mag_l2' +tags = {'base': 'ACE Magnetic Field Base Data', + 'key': 'ACE Magnetic Field Key Parameters'} +inst_ids = {'1sec': ['base'], + '16sec': ['base', 'key'], + '4min': ['base'], + '5min': ['key'], + '1hr': ['base', 'key']} +pandas_format = False + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {id: {tag: dt.datetime(2022, 1, 1) for tag in inst_ids[id]} + for id in inst_ids.keys()} + +# ---------------------------------------------------------------------------- +# Instrument methods + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_ace, name=name) + + +def preprocess(self): + """Adjust dimensionality of metadata.""" + + # TODO(https://github.com/pysat/pysat/issues/1078): Update the metadata by + # removing value_min0, value_min1, etc, once possible + self.meta['BGSEc'] = {'value_min': min([self.meta['BGSEc']['value_min0'], + self.meta['BGSEc']['value_min1'], + self.meta['BGSEc']['value_min2']]), + 'value_max': max([self.meta['BGSEc']['value_max0'], + self.meta['BGSEc']['value_max1'], + self.meta['BGSEc']['value_max2']]), + 'SCALEMIN': min([self.meta['BGSEc']['SCALEMIN0'], + self.meta['BGSEc']['SCALEMIN1'], + self.meta['BGSEc']['SCALEMIN2']]), + 'SCALEMAX': max([self.meta['BGSEc']['SCALEMAX0'], + self.meta['BGSEc']['SCALEMAX1'], + self.meta['BGSEc']['SCALEMAX2']])} + return + + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the default CDAWeb and pysat methods + +# Set the list_files routine +strid = {'1sec': {'base': 'h3'}, + '16sec': {'base': 'h0', 'key': 'k1'}, + '4min': {'base': 'h1'}, + '5min': {'key': 'k0'}, + '1hr': {'base': 'h2', 'key': 'k2'}} +fname = ''.join(('ac_{sid:s}_mfi_{{year:4d}}{{month:02d}}{{day:02d}}_', + 'v{{version:02d}}.cdf')) +supported_tags = {id: {tag: fname.format(sid=strid[id][tag]) + for tag in inst_ids[id]} + for id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the load routine +load = functools.partial(mm_ace.load, to_pandas=False) + +# Set the download routine +download_tags = {'1sec': {'base': 'AC_H3_MFI'}, + '16sec': {'base': 'AC_H0_MFI', 'key': 'AC_K1_MFI'}, + '4min': {'base': 'AC_H1_MFI'}, + '5min': {'key': 'AC_K0_MFI'}, + '1hr': {'base': 'AC_H2_MFI', 'key': 'AC_K2_MFI'}} + +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) diff --git a/pysatNASA/instruments/ace_sis_l2.py b/pysatNASA/instruments/ace_sis_l2.py new file mode 100644 index 00000000..188f5973 --- /dev/null +++ b/pysatNASA/instruments/ace_sis_l2.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +"""Module for the Advanced Composition Explorer (ACE) SIS instrument. + +Properties +---------- +platform + 'ace' +name + 'sis_l2' +tag + 'base' or 'key' +inst_id + '256sec' or '1hr' + +References +---------- +- Stone, E., Frandsen, A., Mewaldt, R. et al. The Advanced Composition Explorer. + Space Science Reviews 86, 1–22 (1998). https://doi.org/10.1023/A:1005082526237 +- Stone, E., Cohen, C., Cook, W. et al. The Solar Isotope Spectrometer for the + Advanced Composition Explorer. Space Science Reviews 86, 357–408 (1998). + https://doi.org/10.1023/A:1005027929871 + +Note +---- +- Level 1 ACE data is maintained at pysatSpaceWeather. + +Warnings +-------- +- The cleaning parameters for the instrument are still under development. + +""" + +import datetime as dt +import functools + +from pysat.instruments.methods import general as mm_gen + +from pysatNASA.instruments.methods import ace as mm_ace +from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'ace' +name = 'sis_l2' +tags = {'base': 'ACE/SIS Solar Isotope Spectrometer Base Data', + 'key': 'ACE/SIS Solar Isotope Spectrometer Key Parameters'} +inst_ids = {'256sec': ['base'], + '1hr': ['base', 'key']} +pandas_format = False + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {id: {tag: dt.datetime(2022, 1, 1) for tag in inst_ids[id]} + for id in inst_ids.keys()} + +# ---------------------------------------------------------------------------- +# Instrument methods + + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_ace, name=name) + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the default CDAWeb and pysat methods + +# Set the list_files routine +strid = {'256sec': {'base': 'h1'}, + '1hr': {'base': 'h2', 'key': 'k0'}} +fname = ''.join(('ac_{sid:s}_sis_{{year:4d}}{{month:02d}}{{day:02d}}_', + 'v{{version:02d}}.cdf')) +supported_tags = {id: {tag: fname.format(sid=strid[id][tag]) + for tag in inst_ids[id]} + for id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the load routine +load = functools.partial(mm_ace.load, to_pandas=False) + +# Set the download routine +download_tags = {'256sec': {'base': 'AC_H1_SIS'}, + '1hr': {'base': 'AC_H2_SIS', 'key': 'AC_K0_SIS'}} + +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) diff --git a/pysatNASA/instruments/ace_swepam_l2.py b/pysatNASA/instruments/ace_swepam_l2.py new file mode 100644 index 00000000..b16b37ed --- /dev/null +++ b/pysatNASA/instruments/ace_swepam_l2.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +"""Module for the Advanced Composition Explorer (ACE) EPAM instrument. + +Properties +---------- +platform + 'ace' +name + 'swepam_l2' +tag + 'base' or 'key' +inst_id + '64sec', '5min', '1hr' + +References +---------- +- Stone, E., Frandsen, A., Mewaldt, R. et al. The Advanced Composition Explorer. + Space Science Reviews 86, 1–22 (1998). https://doi.org/10.1023/A:1005082526237 +- McComas, D., Bame, S., Barker, P. et al. Solar Wind Electron Proton Alpha + Monitor (SWEPAM) for the Advanced Composition Explorer. Space Science Reviews + 86, 563–612 (1998). https://doi.org/10.1023/A:1005040232597 + +Note +---- +- Level 1 ACE data is maintained at pysatSpaceWeather. +- Release notes at + https://cdaweb.gsfc.nasa.gov/pub/data/ace/swepam/swepam_level2_release_notes.txt + +Warnings +-------- +- The cleaning parameters for the instrument are still under development. + +""" + +import datetime as dt +import functools + +from pysat.instruments.methods import general as mm_gen + +from pysatNASA.instruments.methods import ace as mm_ace +from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'ace' +name = 'swepam_l2' +tags = {'base': 'ACE/SWEPAM Solar Wind Experiment Base Data', + 'key': 'ACE/SWEPAM Solar Wind Experiment Key Parameters'} +inst_ids = {'64sec': ['base'], + '5min': ['key'], + '1hr': ['key', 'base']} + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {id: {tag: dt.datetime(2021, 1, 1) for tag in inst_ids[id]} + for id in inst_ids.keys()} + +# ---------------------------------------------------------------------------- +# Instrument methods + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_ace, name=name) + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the default CDAWeb and pysat methods + +# Set the list_files routine +strid = {'64sec': {'base': 'h0'}, + '5min': {'key': 'k0'}, + '1hr': {'base': 'h2', 'key': 'k1'}} +fname = ''.join(('ac_{sid:s}_swe_{{year:4d}}{{month:02d}}{{day:02d}}_', + 'v{{version:02d}}.cdf')) +supported_tags = {id: {tag: fname.format(sid=strid[id][tag]) + for tag in inst_ids[id]} + for id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + + +# Set the load routine +load = functools.partial(mm_ace.load, to_pandas=True) + +# Set the download routine +download_tags = {'64sec': {'base': 'AC_H0_SWE'}, + '5min': {'key': 'AC_K0_SWE'}, + '1hr': {'base': 'AC_H2_SWE', 'key': 'AC_K1_SWE'}} + +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) diff --git a/pysatNASA/instruments/cnofs_ivm.py b/pysatNASA/instruments/cnofs_ivm.py index a7693648..59dbf57b 100644 --- a/pysatNASA/instruments/cnofs_ivm.py +++ b/pysatNASA/instruments/cnofs_ivm.py @@ -16,23 +16,6 @@ motion of the satellite the angle is converted into ion motion along two orthogonal directions, perpendicular to the satellite track. -References ----------- -A brief discussion of the C/NOFS mission and instruments can be found at -de La Beaujardière, O., et al. (2004), C/NOFS: A mission to forecast -scintillations, J. Atmos. Sol. Terr. Phys., 66, 1573–1591, -doi:10.1016/j.jastp.2004.07.030. - -Discussion of cleaning parameters for ion drifts can be found in: -Burrell, Angeline G., Equatorial topside magnetic field-aligned ion drifts -at solar minimum, The University of Texas at Dallas, ProQuest -Dissertations Publishing, 2012. 3507604. - -Discussion of cleaning parameters for ion temperature can be found in: -Hairston, M. R., W. R. Coley, and R. A. Heelis (2010), Mapping the -duskside topside ionosphere with CINDI and DMSP, J. Geophys. Res.,115, -A08324, doi:10.1029/2009JA015051. - Properties ---------- @@ -45,6 +28,7 @@ inst_id None supported + Warnings -------- - The sampling rate of the instrument changes on July 29th, 2010. @@ -52,6 +36,24 @@ - The cleaning parameters for the instrument are still under development. + +References +---------- +A brief discussion of the C/NOFS mission and instruments can be found at +de La Beaujardière, O., et al. (2004), C/NOFS: A mission to forecast +scintillations, J. Atmos. Sol. Terr. Phys., 66, 1573–1591, +doi:10.1016/j.jastp.2004.07.030. + +Discussion of cleaning parameters for ion drifts can be found in: +Burrell, Angeline G., Equatorial topside magnetic field-aligned ion drifts +at solar minimum, The University of Texas at Dallas, ProQuest +Dissertations Publishing, 2012. 3507604. + +Discussion of cleaning parameters for ion temperature can be found in: +Hairston, M. R., W. R. Coley, and R. A. Heelis (2010), Mapping the +duskside topside ionosphere with CINDI and DMSP, J. Geophys. Res.,115, +A08324, doi:10.1029/2009JA015051. + """ import datetime as dt @@ -245,12 +247,9 @@ def clean(self): # Set the load routine load = cdw.load -# Set the download routine -basic_tag = {'remote_dir': '/pub/data/cnofs/cindi/ivm_500ms_cdf/{year:4d}/', - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'CNOFS_CINDI_IVM_500MS'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/cnofs_plp.py b/pysatNASA/instruments/cnofs_plp.py index fb43ab9e..1b5b546e 100644 --- a/pysatNASA/instruments/cnofs_plp.py +++ b/pysatNASA/instruments/cnofs_plp.py @@ -29,12 +29,6 @@ The data is PRELIMINARY, and as such, is intended for BROWSE PURPOSES ONLY. -References ----------- -A brief discussion of the C/NOFS mission and instruments can be found at -de La Beaujardière, O., et al. (2004), C/NOFS: A mission to forecast -scintillations, J. Atmos. Sol. Terr. Phys., 66, 1573–1591, -doi:10.1016/j.jastp.2004.07.030. Properties ---------- @@ -54,11 +48,18 @@ - Currently no cleaning routine. - Module not written by PLP team. + +References +---------- +A brief discussion of the C/NOFS mission and instruments can be found at +de La Beaujardière, O., et al. (2004), C/NOFS: A mission to forecast +scintillations, J. Atmos. Sol. Terr. Phys., 66, 1573–1591, +doi:10.1016/j.jastp.2004.07.030. + """ import datetime as dt import functools -import numpy as np from pysat.instruments.methods import general as mm_gen @@ -86,21 +87,8 @@ init = functools.partial(mm_nasa.init, module=mm_cnofs, name=name) -def clean(self): - """Clean C/NOFS PLP data to the specified level. - - Note - ---- - Basic cleaning to find valid Epoch values - - """ - - for key in self.data.columns: - if key != 'Epoch': - fill = self.meta[key, self.meta.labels.fill_val] - idx, = np.where(self[key] == fill) - self[idx, key] = np.nan - return +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- @@ -119,11 +107,9 @@ def clean(self): load = cdw.load # Set the download routine -basic_tag = {'remote_dir': '/pub/data/cnofs/plp/plasma_1sec/{year:4d}/', - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'CNOFS_PLP_PLASMA_1SEC'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/cnofs_vefi.py b/pysatNASA/instruments/cnofs_vefi.py index 78d54e36..f2e4bf24 100644 --- a/pysatNASA/instruments/cnofs_vefi.py +++ b/pysatNASA/instruments/cnofs_vefi.py @@ -26,12 +26,6 @@ The data is PRELIMINARY, and as such, is intended for BROWSE PURPOSES ONLY. -References ----------- -A brief discussion of the C/NOFS mission and instruments can be found at -de La Beaujardière, O., et al. (2004), C/NOFS: A mission to forecast -scintillations, J. Atmos. Sol. Terr. Phys., 66, 1573–1591, -doi:10.1016/j.jastp.2004.07.030. Properties ---------- @@ -56,6 +50,14 @@ - Limited cleaning routine. - Module not written by VEFI team. + +References +---------- +A brief discussion of the C/NOFS mission and instruments can be found at +de La Beaujardière, O., et al. (2004), C/NOFS: A mission to forecast +scintillations, J. Atmos. Sol. Terr. Phys., 66, 1573–1591, +doi:10.1016/j.jastp.2004.07.030. + """ import datetime as dt @@ -122,11 +124,9 @@ def clean(self): load = cdw.load # Set the download routine -basic_tag = {'remote_dir': '/pub/data/cnofs/vefi/bfield_1sec/{year:4d}/', - 'fname': fname} -download_tags = {'': {'dc_b': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'dc_b': 'CNOFS_VEFI_BFIELD_1SEC'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/de2_fpi.py b/pysatNASA/instruments/de2_fpi.py new file mode 100644 index 00000000..4f0d210e --- /dev/null +++ b/pysatNASA/instruments/de2_fpi.py @@ -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) + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# 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) diff --git a/pysatNASA/instruments/de2_lang.py b/pysatNASA/instruments/de2_lang.py index 07430357..01a77c56 100644 --- a/pysatNASA/instruments/de2_lang.py +++ b/pysatNASA/instruments/de2_lang.py @@ -25,12 +25,6 @@ or correct the inflight processed data. Time resolution was 0.5 seconds. -References ----------- -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., 5, -493-502, 1981. - Properties ---------- platform @@ -48,6 +42,12 @@ - Currently no cleaning routine. +References +---------- +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., 5, +493-502, 1981. + """ import datetime as dt @@ -79,8 +79,8 @@ # 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 +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- # Instrument functions @@ -97,12 +97,9 @@ load = cdw.load # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/de/de2/plasma_lang', - '/plasma500ms_lang_cdaweb/{year:4d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'DE2_PLASMA500MS_LANG'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/de2_nacs.py b/pysatNASA/instruments/de2_nacs.py index b03212fe..dd6b7d16 100644 --- a/pysatNASA/instruments/de2_nacs.py +++ b/pysatNASA/instruments/de2_nacs.py @@ -50,12 +50,6 @@ were lost between 12 March 1982 and 31 March 1982 when the counter overflowed. -References ----------- -G. R. Carrignan, B. P. Block, J. C. Maurer, A. E. Hedin, C. A. Reber, -N. W. Spencer, "The neutral mass spectrometer on Dynamics Explorer B", -Space Sci. Instrum., 5, 429-441, 1981. - Properties ---------- platform @@ -67,10 +61,18 @@ tag None Supported + Warnings -------- - Currently no cleaning routine. + +References +---------- +G. R. Carrignan, B. P. Block, J. C. Maurer, A. E. Hedin, C. A. Reber, +N. W. Spencer, "The neutral mass spectrometer on Dynamics Explorer B", +Space Sci. Instrum., 5, 429-441, 1981. + """ import datetime as dt @@ -102,8 +104,8 @@ # 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 +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- # Instrument functions @@ -120,12 +122,9 @@ load = cdw.load # Support download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/de/de2/neutral_gas_nacs', - '/neutral1s_nacs_cdaweb/{year:4d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'DE2_NEUTRAL1S_NACS'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Support listing files currently on CDAWeb -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/de2_rpa.py b/pysatNASA/instruments/de2_rpa.py index 912dd66f..e06b67b3 100644 --- a/pysatNASA/instruments/de2_rpa.py +++ b/pysatNASA/instruments/de2_rpa.py @@ -26,21 +26,11 @@ 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. -References ----------- -W. B. Hanson, R. A. Heelis, R. A. Power, C. R. 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). Properties ---------- @@ -53,10 +43,18 @@ tag None Supported + Warnings -------- - Currently no cleaning routine. + +References +---------- +W. B. Hanson, R. A. Heelis, R. A. Power, C. R. 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). + """ import datetime as dt @@ -73,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 @@ -88,8 +86,8 @@ # 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 +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- # Instrument functions @@ -97,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) @@ -106,12 +107,9 @@ load = cdw.load # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/de/de2/plasma_rpa', - '/ion2s_cdaweb/{year:4d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'DE2_ION2S_RPA'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/de2_vefi.py b/pysatNASA/instruments/de2_vefi.py new file mode 100644 index 00000000..9e4140e6 --- /dev/null +++ b/pysatNASA/instruments/de2_vefi.py @@ -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) + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# 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) diff --git a/pysatNASA/instruments/de2_wats.py b/pysatNASA/instruments/de2_wats.py index 1345841a..e3b52bb7 100644 --- a/pysatNASA/instruments/de2_wats.py +++ b/pysatNASA/instruments/de2_wats.py @@ -47,12 +47,6 @@ about the processing done at NSSDC is given in WATS_NSSDC_PRO_DE.DOC. -References ----------- -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., 5, 417-428, 1981. - Properties ---------- platform @@ -64,10 +58,18 @@ tag None Supported + Warnings -------- - Currently no cleaning routine. + +References +---------- +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., 5, 417-428, 1981. + """ import datetime as dt @@ -99,8 +101,8 @@ # 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 +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- # Instrument functions @@ -117,12 +119,9 @@ load = cdw.load # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/de/de2/neutral_gas_wats', - '/wind2s_wats_cdaweb/{year:4d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'DE2_WIND2S_WATS'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/dmsp_ssusi.py b/pysatNASA/instruments/dmsp_ssusi.py new file mode 100644 index 00000000..268985a8 --- /dev/null +++ b/pysatNASA/instruments/dmsp_ssusi.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +"""Module for the DMSP SSUSI instrument. + +Supports the Special Sensor Ultraviolet Spectrographic Imager (SSUSI) +instrument on Defense Meteorological Satellite Program (DMSP). + +From JHU APL: + +SSUSI was designed for the DMSP Block 5D-3 satellites. These satellites are +placed into nearly polar, sun-synchronous orbits at an altitude of about 850 km. +SSUSI is a remote-sensing instrument which measures ultraviolet (UV) emissions +in five different wavelength bands from the Earth's upper atmosphere. SSUSI is +mounted on a nadir-looking panel of the satellite. The multicolor images from +SSUSI cover the visible Earth disk from horizon to horizon and the anti-sunward +limb up to an altitude of approximately 520 km. + +The UV images and the derived environmental data provide the Air Force Weather +Agency (Offutt Air Force Base, Bellevue, NE) with near real-time information +that can be utilized in a number of applications, such as maintenance of high +frequency (HF) communication links and related systems and assessment of the +environmental hazard to astronauts on the Space Station. + + +Properties +---------- +platform + 'dmsp' +name + 'ssusi' +tag + 'edr-aurora' +inst_id + 'f16', 'f17', 'f18', 'f19' + + +Warnings +-------- +- Currently no cleaning routine. + + +References +---------- +Larry J. Paxton, Daniel Morrison, Yongliang Zhang, Hyosub Kil, Brian Wolven, +Bernard S. Ogorzalek, David C. Humm, and Ching-I. Meng "Validation of remote +sensing products produced by the Special Sensor Ultraviolet Scanning Imager +(SSUSI): a far UV-imaging spectrograph on DMSP F-16", Proc. SPIE 4485, Optical +Spectroscopic Techniques, Remote Sensing, and Instrumentation for Atmospheric +and Space Research IV, (30 January 2002); doi:10.1117/12.454268 + +""" + +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 dmsp as mm_dmsp +from pysatNASA.instruments.methods import general as mm_nasa +from pysatNASA.instruments.methods import jhuapl + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'dmsp' +name = 'ssusi' +tags = {'edr-aurora': ''.join(['Electron energy flux and mean energy, auroral', + ' boundaries, identified discrete auroral arcs,', + ' hemispheric power, and magnetic field lines ', + 'traced to 4 Earth radii'])} +inst_ids = {sat_id: list(tags.keys()) + for sat_id in ['f16', 'f17', 'f18', 'f19']} + +pandas_format = False +multi_file_day = True + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {inst_id: {tag: dt.datetime(2015, 1, 1) for tag in tags.keys()} + for inst_id in inst_ids.keys()} + +# ---------------------------------------------------------------------------- +# Instrument methods + + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_dmsp, 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 = ''.join(['dmsp{inst_id:s}_ssusi_{tag:s}_{{year:04d}}{{day:03d}}T', + '{{hour:02d}}{{minute:02d}}{{second:02d}}-???????T??????-REV', + '?????_vA{{version:1d}}.?.?r{{cycle:03d}}.nc']) +supported_tags = {sat_id: {tag: fname.format(tag=tag, inst_id=sat_id) + for tag in tags.keys()} + for sat_id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the load routine +load = functools.partial(jhuapl.load_edr_aurora, pandas_format=pandas_format, + strict_dim_check=False) + +# Set the download routine +basic_tag = {'remote_dir': ''.join(('/pub/data/dmsp/dmsp{inst_id:s}/ssusi/', + '/data/{tag:s}/{{year:4d}}/{{day:03d}}/')), + 'fname': fname} +download_tags = { + sat_id: {tag: {btag: basic_tag[btag].format(tag=tag, inst_id=sat_id) + for btag in basic_tag.keys()} for tag in tags.keys()} + for sat_id in inst_ids.keys()} +download = functools.partial(cdw.download, supported_tags=download_tags) + +# Set the list_remote_files routine +list_remote_files = functools.partial(cdw.list_remote_files, + supported_tags=download_tags) diff --git a/pysatNASA/instruments/formosat1_ivm.py b/pysatNASA/instruments/formosat1_ivm.py index 24be65bd..3ac177d9 100644 --- a/pysatNASA/instruments/formosat1_ivm.py +++ b/pysatNASA/instruments/formosat1_ivm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Module for the ICON EUV instrument. +"""Module for the Formosat-1 IVM instrument. Supports the Ion Velocity Meter (IVM) onboard the Formosat-1 (formerly ROCSAT-1) mission. Downloads data from the NASA Coordinated Data Analysis @@ -74,8 +74,8 @@ def init(self): return -# No cleaning, use standard warning function instead -clean = mm_nasa.clean_warn +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- # Instrument functions @@ -92,12 +92,9 @@ def init(self): load = cdw.load # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/formosat-rocsat/formosat-1', - '/ipei/{year:4d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'RS_K0_IPEI'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/icon_euv.py b/pysatNASA/instruments/icon_euv.py index 7a5be9e4..f3abcf58 100644 --- a/pysatNASA/instruments/icon_euv.py +++ b/pysatNASA/instruments/icon_euv.py @@ -127,13 +127,11 @@ def clean(self): supported_tags=supported_tags) # Set the download routine -basic_tag = {'remote_dir': '/pub/data/icon/l2/l2-6_euv/{year:04d}/', - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'ICON_L2-6_EUV'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) @@ -214,19 +212,21 @@ def load(fnames, tag='', inst_id='', keep_original_names=False): """ labels = {'units': ('Units', str), 'name': ('Long_Name', str), 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), - 'min_val': ('ValidMin', float), - 'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)} + 'min_val': ('ValidMin', (int, float)), + 'max_val': ('ValidMax', (int, float)), + 'fill_val': ('FillVal', (int, float))} meta_translation = {'FieldNam': 'plot'} data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch', pandas_format=pandas_format, - labels=labels, + meta_kwargs={'labels': labels}, meta_processor=filter_metadata, meta_translation=meta_translation, drop_meta_labels=['Valid_Max', 'Valid_Min', - '_FillValue']) + '_FillValue'], + decode_times=False) # xarray can't merge if variable and dim names are the same if 'Altitude' in data.dims: diff --git a/pysatNASA/instruments/icon_fuv.py b/pysatNASA/instruments/icon_fuv.py index 19b3cae5..7749f006 100644 --- a/pysatNASA/instruments/icon_fuv.py +++ b/pysatNASA/instruments/icon_fuv.py @@ -119,16 +119,13 @@ def clean(self): supported_tags=supported_tags) # Set the download routine -basic_tag24 = {'remote_dir': '/pub/data/icon/l2/l2-4_fuv_day/{year:04d}/', - 'fname': fname24} -basic_tag25 = {'remote_dir': '/pub/data/icon/l2/l2-5_fuv_night/{year:04d}/', - 'fname': fname25} -download_tags = {'': {'day': basic_tag24, 'night': basic_tag25}} +download_tags = {'': {'day': 'ICON_L2-4_FUV_DAY', + 'night': 'ICON_L2-5_FUV_NIGHT'}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) @@ -211,8 +208,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False): """ labels = {'units': ('Units', str), 'name': ('Long_Name', str), 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), - 'min_val': ('ValidMin', float), - 'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)} + 'min_val': ('ValidMin', (int, float)), + 'max_val': ('ValidMax', (int, float)), + 'fill_val': ('FillVal', (int, float))} meta_translation = {'FieldNam': 'plot', 'LablAxis': 'axis', 'FIELDNAM': 'plot', 'LABLAXIS': 'axis', @@ -223,8 +221,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False): data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch', pandas_format=pandas_format, - labels=labels, + meta_kwargs={'labels': labels}, meta_processor=filter_metadata, meta_translation=meta_translation, - drop_meta_labels=drop_labels) + drop_meta_labels=drop_labels, + decode_times=False) return data, meta diff --git a/pysatNASA/instruments/icon_ivm.py b/pysatNASA/instruments/icon_ivm.py index e16ca5b0..ff6012d0 100644 --- a/pysatNASA/instruments/icon_ivm.py +++ b/pysatNASA/instruments/icon_ivm.py @@ -192,13 +192,12 @@ def clean(self): # Set the download routine dirstr = '/pub/data/icon/l2/l2-7_ivm-{id:s}/{{year:4d}}/' -download_tags = {id: {'': {'remote_dir': dirstr.format(id=id), - 'fname': supported_tags[id]['']}} - for id in ['a', 'b']} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'a': {'': 'ICON_L2-7_IVM-A'}, 'b': {'': 'ICON_L2-7_IVM-B'}} + +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) @@ -273,15 +272,16 @@ def load(fnames, tag='', inst_id='', keep_original_names=False): labels = {'units': ('Units', str), 'name': ('Long_Name', str), 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), - 'min_val': ('ValidMin', float), - 'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)} + 'min_val': ('ValidMin', (int, float)), + 'max_val': ('ValidMax', (int, float)), + 'fill_val': ('FillVal', (int, float))} meta_translation = {'FieldNam': 'plot', 'LablAxis': 'axis', 'ScaleTyp': 'scale', '_FillValue': 'FillVal'} data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch', - labels=labels, + meta_kwargs={'labels': labels}, meta_processor=filter_metadata, meta_translation=meta_translation, drop_meta_labels=['Valid_Max', diff --git a/pysatNASA/instruments/icon_mighti.py b/pysatNASA/instruments/icon_mighti.py index 006a9f8a..a108e8d2 100644 --- a/pysatNASA/instruments/icon_mighti.py +++ b/pysatNASA/instruments/icon_mighti.py @@ -226,30 +226,23 @@ def _clean_vars(var_list, flag, min_level): supported_tags=supported_tags) # Set the download routine -dirstr1 = '/pub/data/icon/l2/l2-1_mighti-{{id:s}}_los-wind-{color:s}/' -dirstr2 = '/pub/data/icon/l2/l2-2_mighti_vector-wind-{color:s}/' -dirstr3 = '/pub/data/icon/l2/l2-3_mighti-{id:s}_temperature/' -dirnames = {'los_wind_green': dirstr1.format(color='green'), - 'los_wind_red': dirstr1.format(color='red'), - 'vector_wind_green': dirstr2.format(color='green'), - 'vector_wind_red': dirstr2.format(color='red'), - 'temperature': dirstr3} - -download_tags = {} -for inst_id in supported_tags.keys(): - download_tags[inst_id] = {} - for tag in supported_tags[inst_id].keys(): - fname = supported_tags[inst_id][tag] - - download_tags[inst_id][tag] = { - 'remote_dir': ''.join((dirnames[tag].format(id=inst_id), - '{year:04d}/')), - 'fname': fname} - -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'vector': + {'vector_wind_green': 'ICON_L2-2_MIGHTI_VECTOR-WIND-GREEN', + 'vector_wind_red': 'ICON_L2-2_MIGHTI_VECTOR-WIND-RED'}, + 'a': + {'los_wind_green': 'ICON_L2-1_MIGHTI-A_LOS-WIND-GREEN', + 'los_wind_red': 'ICON_L2-1_MIGHTI-A_LOS-WIND-RED', + 'temperature': 'ICON_L2-3_MIGHTI-A_TEMPERATURE'}, + 'b': + {'los_wind_green': 'ICON_L2-1_MIGHTI-B_LOS-WIND-GREEN', + 'los_wind_red': 'ICON_L2-1_MIGHTI-B_LOS-WIND-RED', + 'temperature': 'ICON_L2-3_MIGHTI-B_TEMPERATURE'}} + + +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) @@ -325,8 +318,9 @@ def load(fnames, tag='', inst_id='', keep_original_names=False): """ labels = {'units': ('Units', str), 'name': ('Long_Name', str), 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), - 'min_val': ('ValidMin', float), - 'max_val': ('ValidMax', float), 'fill_val': ('FillVal', float)} + 'min_val': ('ValidMin', (int, float)), + 'max_val': ('ValidMax', (int, float)), + 'fill_val': ('FillVal', (int, float))} meta_translation = {'FieldNam': 'plot', 'LablAxis': 'axis', 'FIELDNAM': 'plot', 'LABLAXIS': 'axis', @@ -335,14 +329,15 @@ def load(fnames, tag='', inst_id='', keep_original_names=False): data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch', pandas_format=pandas_format, - labels=labels, + meta_kwargs={'labels': labels}, meta_processor=filter_metadata, meta_translation=meta_translation, drop_meta_labels=['Valid_Max', 'Valid_Min', 'Valid_Range', '_Fillvalue', - 'ScaleTyp']) + 'ScaleTyp'], + decode_times=False) # xarray can't merge if variable and dim names are the same if 'Altitude' in data.dims: diff --git a/pysatNASA/instruments/igs_gps.py b/pysatNASA/instruments/igs_gps.py new file mode 100644 index 00000000..99cd4690 --- /dev/null +++ b/pysatNASA/instruments/igs_gps.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +"""Module for the IGS GPS data products. + +Supports GPS data produced from International GNSS Service Total Electron +Content (TEC). + +From CDAWeb (modified): + +This directory contains the GPS Total Electron Content (TEC) data produced by +the International Global Navigation Satellite Systems Service (IGS) Ionosphere +Working Group and by the Analysis Centers that have contributed to the IGS data +including CODE of the University of Bern (Switzerland), ESA of the European +Space Operations Center (ESOC) in Darmstadt (Germany), JPL of the Jet Propulsion +Laboratory, Pasadena (USA), and UPC of the University Politechnical Catalonia in +Barcelona (Spain). The IGS data are a computed as a weighted mean of the data +from the four analysis centers. + +The rate of TEC index (ROTI) characterizes TEC fluctuations observed along +receiver-to-satellite line of sight links over a 5-minute interval. +The measurement is obtained by processing GNSS dual-frequency phase data and +computing the standard deviation of the rate of TEC change over that interval +after removing its background variation trend. + +ROTI data are provided as global maps using a 2.5 x 5 degree (geographic +latitude x longitude) grid. The median ROTI value is calculated in each bin. +GNSS data contributing to the ROTI computation are primarily collected from +the global network of International GNSS Service and the regional network of +Continuous Operating Reference Station (CORS). + +Properties +---------- +platform + 'igs' +name + 'gps' +tag + ['tec', 'roti'] +inst_id + ['15min', '1hr', '2hr'] + + +Warnings +-------- +- The cleaning parameters for the instrument are still under development. + + +References +---------- +M. Hernández-Pajares, J.M. Juan, J. Sanz, R. Orus, A. Garcia-Rigo, J. Feltens, +A. Komjathy, S.C. Schaer, and A. Krankowski, The IGS VTEC maps: a reliable +source of ionospheric information since 1998Journal of Geodesy (2009) 83:263–275 +doi:10.1007/s00190-008-0266-1 + +Feltens, J., M. Angling, N. Jackson‐Booth, N. Jakowski, M. Hoque, M. +Hernández‐Pajares, A. Aragón‐Àngel, R. Orús, and R. Zandbergen (2011), +Comparative testing of four ionospheric models driven with GPS measurements, +Radio Sci., 46, RS0D12, doi:10.1029/2010RS004584 + +Peng Chen, Hang Liu, Yongchao Ma, Naiquan Zheng, Accuracy and consistency of +different global ionospheric maps released by IGS ionosphere associate analysis +centers, Advances in Space Research, Volume 65, Issue 1, 2020, Pages 163-174, +doi:10.1016/j.asr.2019.09.042. + +""" + +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 general as mm_nasa +from pysatNASA.instruments.methods import igs as mm_igs + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'igs' +name = 'gps' +tags = {'tec': 'Total Electron Content', + 'roti': 'Rate of Change in TEC'} +# tags = {'15min': '15 min cadence TEC', +# '1hr': '1 hour cadence TEC', +# '2hr': '2 hour cadence TEC'} +inst_ids = {'15min': ['tec', 'roti'], + '1hr': ['tec'], + '2hr': ['tec']} +pandas_format = False +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {jj: {kk: dt.datetime(2013, 1, 1) for kk in inst_ids[jj]} + for jj in inst_ids.keys()} +# ---------------------------------------------------------------------------- +# Instrument methods + + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_igs, name=name) + + +# Use default clean +clean = mm_nasa.clean + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the default CDAWeb and pysat methods + +# Set the list_files routine +cdas_labels = {'15min': {'tec': 'GPS_TEC15MIN_IGS', + 'roti': 'GPS_ROTI15MIN_JPL'}, + '1hr': {'tec': 'GPS_TEC1HR_IGS'}, + '2hr': {'tec': 'GPS_TEC2HR_IGS'}} + +date_ver = '{year:4d}{month:02d}{day:02d}_v{version:02d}' +fname = '{cdas:s}_{date_ver:s}.cdf' + +supported_tags = {id: {tag: fname.format(cdas=cdas_labels[id][tag].lower(), + date_ver=date_ver) + for tag in inst_ids[id]} for id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the load routine +load = functools.partial(cdw.load, pandas_format=pandas_format, + use_cdflib=True) + +# Set the download routine +download = functools.partial(cdw.cdas_download, supported_tags=cdas_labels) + +# Set the list_remote_files routine +list_remote_files = functools.partial(cdw.cdas_list_remote_files, + supported_tags=cdas_labels) diff --git a/pysatNASA/instruments/iss_fpmu.py b/pysatNASA/instruments/iss_fpmu.py index b85c6aa5..c98f907c 100644 --- a/pysatNASA/instruments/iss_fpmu.py +++ b/pysatNASA/instruments/iss_fpmu.py @@ -26,12 +26,12 @@ import datetime as dt import functools -import numpy as np from pysat.instruments.methods import general as mm_gen from pysat import logger from pysatNASA.instruments.methods import cdaweb as cdw +from pysatNASA.instruments.methods import general as mm_nasa # ---------------------------------------------------------------------------- # Instrument attributes @@ -79,25 +79,8 @@ def init(self): return -def clean(self): - """Clean ISS FPMU data to the specified level. - - Note - ---- - 'clean' - Replace Te and Ni fill values with NaN - 'dusty' - Same as clean - 'dirty' - Same as clean - 'none' - Not applied, default fill values are preserved - - """ - - # Replace Te data fill - self.data.replace(-999., np.nan, inplace=True) - - # Replace Ne data fill - self.data.replace(-9.9999998e+30, np.nan, inplace=True) - - return +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- @@ -115,12 +98,9 @@ def clean(self): load = cdw.load # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/international_space_station_iss', - '/sp_fpmu/{year:4d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'ISS_SP_FPMU'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/jpl_gps.py b/pysatNASA/instruments/jpl_gps.py index ddbe66cf..040ceac0 100644 --- a/pysatNASA/instruments/jpl_gps.py +++ b/pysatNASA/instruments/jpl_gps.py @@ -1,6 +1,11 @@ # -*- coding: utf-8 -*- """Module for the JPL GPS data products. +.. deprecated:: 0.0.5 + This module is now included in igs_gps.py. + This instrument will be removed in 0.1.0+ to reduce redundancy. + + Supports ROTI data produced at JPL from International GNSS Service Total Electron Content (TEC) @@ -16,16 +21,6 @@ the global network of International GNSS Service and the regional network of Continuous Operating Reference Station (CORS). -References ----------- -Pi, X., A. J. Mannucci, U. J. Lindqwister, and C. M. Ho, Monitoring of global -ionospheric irregularities using the worldwide GPS network, Geophys. Res. -Lett., 24, 2283, 1997. - -Pi, X., F. J. Meyer, K. Chotoo, Anthony Freeman, R. G. Caton, and C. T. -Bridgwood, Impact of ionospheric scintillation on Spaceborne SAR observations -studied using GNSS, Proc. ION-GNSS, pp.1998-2006, 2012. - Properties ---------- @@ -38,14 +33,27 @@ inst_id None supported + Warnings -------- - The cleaning parameters for the instrument are still under development. + +References +---------- +Pi, X., A. J. Mannucci, U. J. Lindqwister, and C. M. Ho, Monitoring of global +ionospheric irregularities using the worldwide GPS network, Geophys. Res. +Lett., 24, 2283, 1997. + +Pi, X., F. J. Meyer, K. Chotoo, Anthony Freeman, R. G. Caton, and C. T. +Bridgwood, Impact of ionospheric scintillation on Spaceborne SAR observations +studied using GNSS, Proc. ION-GNSS, pp.1998-2006, 2012. + """ import datetime as dt import functools +import warnings import pysat from pysat.instruments.methods import general as mm_gen @@ -78,6 +86,10 @@ def init(self): """ + warnings.warn(" ".join(["The instrument module `jpl_gps` has", + "been deprecated and will be removed in 0.1.0+."]), + DeprecationWarning, stacklevel=2) + pysat.logger.info('') self.acknowledgements = mm_gps.ackn_str self.references = '\n'.join((mm_gps.refs['mission'], @@ -86,8 +98,8 @@ def init(self): return -# No cleaning, use standard warning function instead -clean = mm_nasa.clean_warn +# Use default clean +clean = mm_nasa.clean # ---------------------------------------------------------------------------- # Instrument functions @@ -101,14 +113,13 @@ def init(self): supported_tags=supported_tags) # Set the load routine -load = functools.partial(cdw.load, pandas_format=pandas_format) +load = functools.partial(cdw.load, pandas_format=pandas_format, + use_cdflib=True) # Set the download routine -basic_tag = {'remote_dir': '/pub/data/gps/roti15min_jpl/{year:4d}/', - 'fname': fname} -download_tags = {'': {'roti': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'roti': 'GPS_ROTI15MIN_JPL'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/methods/__init__.py b/pysatNASA/instruments/methods/__init__.py index 5bde9a41..8542fcbc 100644 --- a/pysatNASA/instruments/methods/__init__.py +++ b/pysatNASA/instruments/methods/__init__.py @@ -4,6 +4,11 @@ from pysatNASA.instruments.methods import cdaweb # noqa F401 from pysatNASA.instruments.methods import cnofs # noqa F401 from pysatNASA.instruments.methods import de2 # noqa F401 +from pysatNASA.instruments.methods import dmsp # noqa F401 from pysatNASA.instruments.methods import general # noqa F401 +from pysatNASA.instruments.methods import gps # noqa F401 from pysatNASA.instruments.methods import icon # noqa F401 +from pysatNASA.instruments.methods import jhuapl # noqa F401 from pysatNASA.instruments.methods import omni # noqa F401 +from pysatNASA.instruments.methods import ses14 # noqa F401 +from pysatNASA.instruments.methods import timed # noqa F401 diff --git a/pysatNASA/instruments/methods/_cdf.py b/pysatNASA/instruments/methods/_cdf.py index 29071ff8..c02dc55d 100644 --- a/pysatNASA/instruments/methods/_cdf.py +++ b/pysatNASA/instruments/methods/_cdf.py @@ -87,12 +87,18 @@ def __init__(self, filename, self._cdf_file = cdflib.CDF(self._filename) self._cdf_info = self._cdf_file.cdf_info() + self.global_attrs = self._cdf_file.globalattsget() self.data = {} self.meta = {} self._dependencies = {} - self._variable_names = (self._cdf_info['rVariables'] - + self._cdf_info['zVariables']) + if hasattr(self._cdf_info, 'rVariables'): + self._variable_names = (self._cdf_info.rVariables + + self._cdf_info.zVariables) + else: + # cdflib < 1.0 stores info as a dict + self._variable_names = (self._cdf_info['rVariables'] + + self._cdf_info['zVariables']) self.load_variables() @@ -156,8 +162,13 @@ def set_epoch(self, x_axis_var): """ - data_type_description = self._cdf_file.varinq( - x_axis_var)['Data_Type_Description'] + if hasattr(self._cdf_file.varinq(x_axis_var), 'Data_Type_Description'): + data_type_description = self._cdf_file.varinq( + x_axis_var).Data_Type_Description + else: + # cdflib < 1.0 stores this as a dict + data_type_description = self._cdf_file.varinq( + x_axis_var)['Data_Type_Description'] center_measurement = self._center_measurement cdf_file = self._cdf_file @@ -298,7 +309,12 @@ def load_variables(self): if not re.match(var_regex, variable_name): # Skip this variable continue - var_atts = self._cdf_file.varattsget(variable_name, to_np=True) + try: + var_atts = self._cdf_file.varattsget(variable_name, to_np=True) + except TypeError: + # cdflib 1.0+ drops to_np kwarg, assumes True + var_atts = self._cdf_file.varattsget(variable_name) + for k in var_atts: var_atts[k] = var_atts[k] # [0] @@ -319,13 +335,14 @@ def load_variables(self): continue if "FILLVAL" in var_atts: - if (var_properties['Data_Type_Description'] == 'CDF_FLOAT' - or var_properties['Data_Type_Description'] - == 'CDF_REAL4' - or var_properties['Data_Type_Description'] - == 'CDF_DOUBLE' - or var_properties['Data_Type_Description'] - == 'CDF_REAL8'): + if hasattr(var_properties, 'Data_Type_Description'): + data_type_desc = var_properties.Data_Type_Description + else: + # cdflib < 1.0 stores this as a dict + data_type_desc = var_properties['Data_Type_Description'] + + if data_type_desc in ['CDF_FLOAT', 'CDF_REAL4', 'CDF_DOUBLE', + 'CDF_REAL8']: if ydata[ydata == var_atts["FILLVAL"]].size != 0: ydata[ydata == var_atts["FILLVAL"]] = np.nan @@ -360,9 +377,9 @@ def load_variables(self): def to_pysat(self, flatten_twod=True, labels={'units': ('Units', str), 'name': ('Long_Name', str), 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), - 'min_val': ('ValidMin', float), - 'max_val': ('ValidMax', float), - 'fill_val': ('FillVal', float)}): + 'min_val': ('ValidMin', (float, int, str)), + 'max_val': ('ValidMax', (float, int, str)), + 'fill_val': ('FillVal', (float, int, str))}): """Export loaded CDF data into data, meta for pysat module. Parameters @@ -382,9 +399,9 @@ def to_pysat(self, flatten_twod=True, that order. (default={'units': ('units', str), 'name': ('long_name', str), 'notes': ('notes', str), 'desc': ('desc', str), - 'min_val': ('value_min', float), - 'max_val': ('value_max', float) - 'fill_val': ('fill', float)}) + 'min_val': ('value_min', (float, int, str)), + 'max_val': ('value_max', (float, int, str)) + 'fill_val': ('fill', (float, int, str))}) Returns ------- @@ -407,7 +424,7 @@ def to_pysat(self, flatten_twod=True, # and utilizing the attribute labels provided by the user meta = pysat.Meta(pds.DataFrame.from_dict(self.meta, orient='index'), labels=labels) - + meta.header = pysat.MetaHeader(header_data=self.global_attrs) cdata = self.data.copy() lower_names = [name.lower() for name in meta.keys()] for name, true_name in zip(lower_names, meta.keys()): diff --git a/pysatNASA/instruments/methods/ace.py b/pysatNASA/instruments/methods/ace.py new file mode 100644 index 00000000..f9e78412 --- /dev/null +++ b/pysatNASA/instruments/methods/ace.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +"""Provides non-instrument specific routines for ACE data.""" + +from pysatNASA.instruments.methods import cdaweb as cdw + +ackn_str = ' '.join(("Please acknowledge the NASA National Space Science Data", + "Center, the Space Physics Data Facility, and the ACE", + "Principal Investigator, Edward C. Stone of the", + "California Institute of Technology, for usage of ACE", + "data from this site in publications and presentations.")) + +refs = {'mission': ' '.join(('Stone, E., Frandsen, A., Mewaldt, R. et al.', + 'The Advanced Composition Explorer. Space Science', + 'Reviews 86, 1–22 (1998).', + 'https://doi.org/10.1023/A:1005082526237')), + 'epam_l2': ' '.join(('Gold, R., Krimigis, S., Hawkins, S. et al.', + 'Electron, Proton, and Alpha Monitor on the', + 'Advanced Composition Explorer spacecraft.', + 'Space Science Reviews 86, 541–562 (1998).', + 'https://doi.org/10.1023/A:1005088115759')), + 'mag_l2': ' '.join(("Smith, C., L'Heureux, J., Ness, N. et al. The ACE", + "Magnetic Fields Experiment. Space Science Reviews", + "86, 613–632 (1998).", + "https://doi.org/10.1023/A:1005092216668")), + 'sis_l2': ' '.join(('Stone, E., Cohen, C., Cook, W. et al. The Solar', + 'Isotope Spectrometer for the Advanced Composition', + 'Explorer. Space Science Reviews 86, 357–408', + '(1998). https://doi.org/10.1023/A:1005027929871')), + 'swepam_l2': ' '.join(('McComas, D., Bame, S., Barker, P. et al. Solar', + 'Wind Electron Proton Alpha Monitor (SWEPAM)', + 'for the Advanced Composition Explorer. Space', + 'Science Reviews 86, 563–612 (1998).', + 'https://doi.org/10.1023/A:1005040232597')) + } + + +def load(fnames, tag='', inst_id='', to_pandas=False, **kwargs): + """Load ACE data via xarray and convert to pandas if needed. + + This routine is called as needed by pysat. It is not intended + for direct user interaction. + + Parameters + ---------- + fnames : array-like + Iterable of filename strings, full path, to data files to be loaded. + This input is nominally provided by pysat itself. + tag : str + Tag name used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. (default='') + inst_id : str + Instrument ID used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. (default='') + to_pandas : bool + If True, convert to pandas. If False, leave as xarray. (default=False) + + Returns + ------- + data : pds.DataFrame or xr.Dataset + A pandas DataFrame or xarray Dataset with data prepared for the + `pysat.Instrument`. + meta : pysat.Meta + Metadata formatted for a pysat.Instrument object. + + Note + ---- + Several variables relating to time stored in different formats are dropped. + These are redundant and complicate the load procedure. + + """ + + meta_translation = {'CATDESC': 'desc', 'FILLVAL': 'fill', + 'LABLAXIS': 'plot_label', 'VALIDMAX': 'value_max', + 'VALIDMIN': 'value_min', 'VAR_NOTES': 'notes'} + data, meta = cdw.load(fnames, tag=tag, inst_id=inst_id, pandas_format=False, + meta_translation=meta_translation, + drop_dims=['dim_empty', 'dim0', 'unit_time'], + use_cdflib=True) + + if to_pandas: + if hasattr(data, 'to_pandas'): + data = data.to_pandas() + else: + # xarray 0.16 support required for operational server + data = data.to_dataframe() + + return data, meta diff --git a/pysatNASA/instruments/methods/cdaweb.py b/pysatNASA/instruments/methods/cdaweb.py index c71115f2..235090eb 100644 --- a/pysatNASA/instruments/methods/cdaweb.py +++ b/pysatNASA/instruments/methods/cdaweb.py @@ -7,15 +7,16 @@ """ -import cdflib import datetime as dt +import numpy as np import os import pandas as pds import requests -import warnings +from time import sleep import xarray as xr from bs4 import BeautifulSoup +from cdasws import CdasWs import pysat from pysat.instruments.methods import general @@ -24,6 +25,13 @@ from pysat.utils import io from pysatNASA.instruments.methods import CDF as libCDF +try: + # cdflib 1.0 syntax + from cdflib.xarray import cdf_to_xarray +except ModuleNotFoundError: + # cdflib 0.4 syntax required for backwards compatibility + from cdflib import cdf_to_xarray + try: import pysatCDF auto_CDF = pysatCDF.CDF @@ -31,10 +39,39 @@ auto_CDF = libCDF +def try_inst_dict(inst_id, tag, supported_tags): + """Check that the inst_id and tag combination is valid. + + Parameters + ---------- + tag : str + Data product tag (default='') + inst_id : str + Instrument ID (default='') + supported_tags : dict + dict of dicts. Keys are supported tag names for download. Value is + a dict with 'remote_dir', 'fname'. Inteded to be + pre-set with functools.partial then assigned to new instrument code. + (default=None) + + Returns + ------- + inst_dict : dict or str + dictionary containing file location in spdf archive, or dataset ID for + cdasws + """ + try: + inst_dict = supported_tags[inst_id][tag] + except KeyError: + raise ValueError('inst_id / tag combo unknown.') + + return inst_dict + + def load(fnames, tag='', inst_id='', file_cadence=dt.timedelta(days=1), flatten_twod=True, pandas_format=True, epoch_name='Epoch', - meta_processor=None, meta_translation=None, drop_meta_labels=None, - use_cdflib=None): + drop_dims=None, var_translation=None, meta_processor=None, + meta_translation=None, drop_meta_labels=None, use_cdflib=None): """Load NASA CDAWeb CDF files. Parameters @@ -62,6 +99,13 @@ def load(fnames, tag='', inst_id='', file_cadence=dt.timedelta(days=1), specified by `epoch_origin` with units specified by `epoch_unit`. This epoch variable will be converted to a `DatetimeIndex` for consistency across pysat instruments. (default='Epoch') + drop_dims : list or NoneType + List of variable dimensions that should be dropped. Applied + to data as loaded from the file. Used only from xarray Dataset. + (default=None) + var_translation : dict or NoneType + Variables that should be renamed. Applied to data as loaded + from the file. Used only from xarray Dataset. (default=None) meta_processor : function or NoneType If not None, a dict containing all of the loaded metadata will be passed to `meta_processor` which should return a filtered version @@ -93,8 +137,10 @@ def load(fnames, tag='', inst_id='', file_cadence=dt.timedelta(days=1), Note ---- - This routine is intended to be used by pysat instrument modules supporting - a particular NASA CDAWeb dataset + - This routine is intended to be used by pysat instrument modules supporting + a particular NASA CDAWeb dataset + - pysatCDF (as of v0.3.2) does not support numpy>=1.24. Load errors may + arise. See https://github.com/pysat/pysatCDF/issues/46 """ @@ -106,10 +152,13 @@ def load(fnames, tag='', inst_id='', file_cadence=dt.timedelta(days=1), else: if not use_cdflib: estr = 'The `use_cdflib` option is not currently enabled for xarray' - warnings.warn(estr) + pysat.logger.warn(estr) data, meta = load_xarray(fnames, tag=tag, inst_id=inst_id, epoch_name=epoch_name, + drop_dims=drop_dims, + var_translation=var_translation, + file_cadence=file_cadence, meta_processor=meta_processor, meta_translation=meta_translation, drop_meta_labels=drop_meta_labels) @@ -224,15 +273,15 @@ def load_pandas(fnames, tag='', inst_id='', file_cadence=dt.timedelta(days=1), def load_xarray(fnames, tag='', inst_id='', - labels={'units': ('units', str), 'name': ('long_name', str), - 'notes': ('notes', str), 'desc': ('desc', str), - 'plot': ('plot_label', str), 'axis': ('axis', str), - 'scale': ('scale', str), - 'min_val': ('value_min', float), - 'max_val': ('value_max', float), - 'fill_val': ('fill', float)}, - epoch_name='Epoch', meta_processor=None, - meta_translation=None, drop_meta_labels=None): + file_cadence=dt.timedelta(days=1), + labels={'units': ('Units', str), 'name': ('Long_Name', str), + 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), + 'min_val': ('ValidMin', (float, int, str)), + 'max_val': ('ValidMax', (float, int, str)), + 'fill_val': ('FillVal', (float, int, str))}, + epoch_name='Epoch', drop_dims=None, var_translation=None, + meta_processor=None, meta_translation=None, + drop_meta_labels=None): """Load NASA CDAWeb CDF files into an xarray Dataset. Parameters @@ -243,20 +292,31 @@ def load_xarray(fnames, tag='', inst_id='', Data product tag (default='') inst_id : str Instrument ID (default='') + file_cadence : dt.timedelta or pds.DateOffset + pysat assumes a daily file cadence, but some instrument data files + contain longer periods of time. This parameter allows the specification + of regular file cadences greater than or equal to a day (e.g., weekly, + monthly, or yearly). (default=dt.timedelta(days=1)) labels : dict Dict where keys are the label attribute names and the values are tuples that have the label values and value types in that order. - (default={'units': ('units', str), 'name': ('long_name', str), - 'notes': ('notes', str), 'desc': ('desc', str), - 'min_val': ('value_min', np.float64), - 'max_val': ('value_max', np.float64), - 'fill_val': ('fill', np.float64)}) + (default={'units': ('Units', str), 'name': ('Long_Name', str), + 'notes': ('Var_Notes', str), 'desc': ('CatDesc', str), + 'min_val': ('ValidMin', (float, int, str)), + 'max_val': ('ValidMax', (float, int, str)), + 'fill_val': ('FillVal', (float, int, str))}) epoch_name : str Data key for epoch variable. The epoch variable is expected to be an array of integer or float values denoting time elapsed from an origin specified by `epoch_origin` with units specified by `epoch_unit`. This epoch variable will be converted to a `DatetimeIndex` for consistency across pysat instruments. (default='Epoch') + drop_dims : list or NoneType + List of variable dimensions that should be dropped. Applied + to data as loaded from the file. (default=None) + var_translation : dict or NoneType + Variables that should be renamed. Applied to data as loaded + from the file. Used only from xarray Dataset. (default=None) meta_processor : function or NoneType If not None, a dict containing all of the loaded metadata will be passed to `meta_processor` which should return a filtered version @@ -308,33 +368,27 @@ def load_xarray(fnames, tag='', inst_id='', # metadata for pysat using some assumptions. Depending upon your needs # the resulting pandas DataFrame may need modification. ldata = [] - for lfname in fnames: - temp_data = cdflib.cdf_to_xarray(lfname, to_datetime=True) + + # Find unique files for monthly / yearly cadence. + # Arbitrary timestamp needed for comparison. + t0 = dt.datetime(2009, 1, 1) + if (t0 + file_cadence) > (t0 + dt.timedelta(days=1)): + lfnames = list(np.unique([fname[:-11] for fname in fnames])) + else: + lfnames = fnames + + for lfname in lfnames: + temp_data = cdf_to_xarray(lfname, to_datetime=True) + if drop_dims: + temp_data = temp_data.drop_dims(drop_dims) + if var_translation: + temp_data = temp_data.rename(var_translation) ldata.append(temp_data) - # Combine individual files together + # Combine individual files together, concat along epoch if len(ldata) > 0: - data = xr.combine_by_coords(ldata) - - all_vars = io.xarray_all_vars(data) - - # Convert output epoch name to 'time' for pysat consistency - if epoch_name != 'time': - if 'time' not in all_vars: - if epoch_name in data.dims: - data = data.rename({epoch_name: 'time'}) - elif epoch_name in all_vars: - data = data.rename({epoch_name: 'time'}) - wstr = ''.join(['Epoch label: "', epoch_name, '"', - ' is not a dimension.']) - pysat.logger.warning(wstr) - else: - estr = ''.join(['Epoch label: "', epoch_name, '"', - ' not found in loaded data, ', - repr(all_vars)]) - raise ValueError(estr) - - epoch_name = 'time' + data = xr.combine_nested(ldata, epoch_name, + combine_attrs='override') all_vars = io.xarray_all_vars(data) @@ -390,15 +444,35 @@ def load_xarray(fnames, tag='', inst_id='', for key in filt_mdict: meta[key] = filt_mdict[key] + # Convert output epoch name to 'time' for pysat consistency + # This needs to be done last so that meta is updated properly + if epoch_name != 'time': + if 'time' not in all_vars: + if epoch_name in data.dims: + data = data.rename({epoch_name: 'time'}) + elif epoch_name in all_vars: + data = data.rename({epoch_name: 'time'}) + wstr = ''.join(['Epoch label: "', epoch_name, '"', + ' is not a dimension.']) + pysat.logger.warning(wstr) + else: + estr = ''.join(['Epoch label: "', epoch_name, '"', + ' not found in loaded data, ', + repr(all_vars)]) + raise ValueError(estr) + + epoch_name = 'time' + # Remove attributes from the data object data.attrs = {} return data, meta -def download(date_array, tag='', inst_id='', supported_tags=None, - remote_url='https://cdaweb.gsfc.nasa.gov', data_path=None): - """Download NASA CDAWeb CDF data. +# TODO(#103): Include support to unzip / untar files after download. +def download(date_array, data_path, tag='', inst_id='', supported_tags=None, + remote_url='https://cdaweb.gsfc.nasa.gov'): + """Download NASA CDAWeb data. This routine is intended to be used by pysat instrument modules supporting a particular NASA CDAWeb dataset. @@ -407,6 +481,8 @@ def download(date_array, tag='', inst_id='', supported_tags=None, ---------- date_array : array-like Array of datetimes to download data for. Provided by pysat. + data_path : str + Path to data directory. tag : str Data product tag (default='') inst_id : str @@ -419,15 +495,12 @@ def download(date_array, tag='', inst_id='', supported_tags=None, remote_url : str Remote site to download data from (default='https://cdaweb.gsfc.nasa.gov') - data_path : str or NoneType - Path to data directory. If None is specified, the value previously - set in Instrument.files.data_path is used. (default=None) Examples -------- :: - # download support added to cnofs_vefi.py using code below + # Download support added to cnofs_vefi.py using code below fn = 'cnofs_vefi_bfield_1sec_{year:4d}{month:02d}{day:02d}_v05.cdf' dc_b_tag = {'remote_dir': ''.join(('/pub/data/cnofs/vefi/bfield_1sec', '/{year:4d}/')), @@ -439,10 +512,7 @@ def download(date_array, tag='', inst_id='', supported_tags=None, """ - try: - inst_dict = supported_tags[inst_id][tag] - except KeyError: - raise ValueError('inst_id / tag combo unknown.') + inst_dict = try_inst_dict(inst_id, tag, supported_tags) # Naming scheme for files on the CDAWeb server remote_dir = inst_dict['remote_dir'] @@ -457,12 +527,21 @@ def download(date_array, tag='', inst_id='', supported_tags=None, # Download only requested files that exist remotely for date, fname in remote_files.items(): # Format files for specific dates and download location - formatted_remote_dir = remote_dir.format(year=date.year, - month=date.month, - day=date.day, - hour=date.hour, - min=date.minute, - sec=date.second) + # Year and day found in remote_dir: day is assumed to be day of year + if 'day' in remote_dir and 'month' not in remote_dir: + doy = date.timetuple().tm_yday + formatted_remote_dir = remote_dir.format(year=date.year, + day=doy, + hour=date.hour, + min=date.minute, + sec=date.second) + else: + formatted_remote_dir = remote_dir.format(year=date.year, + month=date.month, + day=date.day, + hour=date.hour, + min=date.minute, + sec=date.second) remote_path = '/'.join((remote_url.strip('/'), formatted_remote_dir.strip('/'), fname)) @@ -485,6 +564,104 @@ def download(date_array, tag='', inst_id='', supported_tags=None, except requests.exceptions.RequestException as exception: logger.info(' '.join((str(exception), '- File not available for', date.strftime('%d %B %Y')))) + # Pause to avoid excessive pings to server + sleep(0.2) + return + + +def cdas_download(date_array, data_path, tag='', inst_id='', + supported_tags=None): + """Download NASA CDAWeb CDF data using cdasws. + + This routine is intended to be used by pysat instrument modules supporting + a particular NASA CDAWeb dataset. + + Parameters + ---------- + date_array : array-like + Array of datetimes to download data for. Provided by pysat. + data_path : str + Path to data directory. + tag : str + Data product tag (default='') + inst_id : str + Instrument ID (default='') + supported_tags : dict + dict of dicts. Keys are supported tag names for download. Value is + a dict with 'remote_dir', 'fname'. Inteded to be pre-set with + functools.partial then assigned to new instrument code. + (default=None) + + Note + ---- + Supported tags for this function use the cdaweb dataset naming convention. + You can find the data set names on CDAWeb or you can use cdasws. + + Starting from scratch using cdasws + :: + from cdasws import CdasWs + cdas = CdasWs() + + # Get list of available observatories/platforms. + cdas.get_observatories() + + # Once your observatory is located, list the available instruments. + cdas.get_instruments(observatory=‘observatory_name’) + + # Now list the available data sets for one instrument. + cdas.get_datasets(observatory=‘observatory_name’, + instrument=‘instrument_name’) + + # You can also list all of the datasets for an observatory. + cdas.get_datasets(observatory=‘observatory_name’) + + Alternatively + :: + Visit https://cdaweb.gsfc.nasa.gov/ + Select the observatory you want from the list and press submit. + The following page will have a list of the data sets. + The bolded names are in the format that cdasws uses. + + Examples + -------- + :: + # Download support added to cnofs_vefi.py using code below + download_tags = {'': {'dc_b': 'CNOFS_VEFI_BFIELD_1SEC'}} + download = functools.partial(cdw.cdas_download, + supported_tags=download_tags) + + """ + + start = date_array[0] + stop = date_array[-1] + remote_files = cdas_list_remote_files(tag=tag, inst_id=inst_id, + start=start, stop=stop, + supported_tags=supported_tags, + series_out=False) + + for file in remote_files: + + fname = file.split('/')[-1] + saved_local_fname = os.path.join(data_path, fname) + + # Perform download + logger.info(' '.join(('Attempting to download file: ', + file))) + try: + with requests.get(file) as req: + if req.status_code != 404: + with open(saved_local_fname, 'wb') as open_f: + open_f.write(req.content) + logger.info('Successfully downloaded {:}.'.format( + saved_local_fname)) + else: + logger.info(' '.join(('File: "', file, + '" is not available'))) + except requests.exceptions.RequestException as exception: + logger.info(' '.join((str(exception), '- File: "', file, + '" Is not available'))) + # Pause to avoid excessive pings to server + sleep(0.2) return @@ -551,10 +728,7 @@ def list_remote_files(tag='', inst_id='', start=None, stop=None, """ - try: - inst_dict = supported_tags[inst_id][tag] - except KeyError: - raise ValueError('inst_id / tag combo unknown.') + inst_dict = try_inst_dict(inst_id, tag, supported_tags) # Naming scheme for files on the CDAWeb server format_str = '/'.join((inst_dict['remote_dir'].strip('/'), @@ -599,18 +773,27 @@ def list_remote_files(tag='', inst_id='', start=None, stop=None, stop = dt.datetime.now() if (stop is None) else stop if 'year' in search_dir['keys']: + url_list = [] if 'month' in search_dir['keys']: search_times = pds.date_range(start, stop + pds.DateOffset(months=1), freq='M') + for time in search_times: + subdir = format_dir.format(year=time.year, month=time.month) + url_list.append('/'.join((remote_url, subdir))) else: - search_times = pds.date_range(start, - stop + pds.DateOffset(years=1), - freq='Y') - url_list = [] - for time in search_times: - subdir = format_dir.format(year=time.year, month=time.month) - url_list.append('/'.join((remote_url, subdir))) + if 'day' in search_dir['keys']: + search_times = pds.date_range(start, stop + + pds.DateOffset(days=1), + freq='D') + else: + search_times = pds.date_range(start, stop + + pds.DateOffset(years=1), + freq='Y') + for time in search_times: + doy = int(time.strftime('%j')) + subdir = format_dir.format(year=time.year, day=doy) + url_list.append('/'.join((remote_url, subdir))) try: for top_url in url_list: for level in range(n_layers + 1): @@ -654,3 +837,82 @@ def list_remote_files(tag='', inst_id='', start=None, stop=None, stored_list = stored_list[mask] return stored_list + + +def cdas_list_remote_files(tag='', inst_id='', start=None, stop=None, + supported_tags=None, series_out=True): + """Return a list of every file for chosen remote data. + + This routine is intended to be used by pysat instrument modules supporting + a particular NASA CDAWeb dataset. + + Parameters + ---------- + tag : str + Data product tag (default='') + inst_id : str + Instrument ID (default='') + start : dt.datetime or NoneType + Starting time for file list. A None value will start with the first + file found. + (default=None) + stop : dt.datetime or NoneType + Ending time for the file list. A None value will stop with the last + file found. + (default=None) + supported_tags : dict + dict of dicts. Keys are supported tag names for download. Value is + a dict with 'remote_dir', 'fname'. Inteded to be + pre-set with functools.partial then assigned to new instrument code. + (default=None) + series_out : bool + boolean to determine output type. True for pandas series of file names, + and False for a list of the full web address. + + Returns + ------- + file_list : list + A list containing the verified available files + + Note + ---- + Supported tags for this function use the cdaweb dataset naming convention. + You can find the dataset names on cdaweb or you can use cdasws. + + Examples + -------- + :: + download_tags = {'': {'dc_b': 'CNOFS_VEFI_BFIELD_1SEC'}} + list_remote_files = functools.partial(cdw.cdas_list_remote_files, + supported_tags=download_tags) + + download_tags = {'': {'': 'CNOFS_CINDI_IVM_500MS'}} + list_remote_files = functools.partial(cdw.cdas_list_remote_files, + supported_tags=download_tags) + """ + cdas = CdasWs() + dataset = try_inst_dict(inst_id, tag, supported_tags) + + if start is None and stop is None: + # Use the topmost directory without variables + start = cdas.get_inventory(identifier=dataset)[0].start + stop = cdas.get_inventory(identifier=dataset)[-1].end + elif stop is None: + stop = start + dt.timedelta(days=1) + elif start == stop: + stop = start + dt.timedelta(days=1) + + if isinstance(start, pds._libs.tslibs.timestamps.Timestamp): + start = start.tz_localize('utc') + stop = stop.tz_localize('utc') + + og_files = cdas.get_original_files(dataset=dataset, start=start, end=stop) + + if series_out: + name_list = [os.path.basename(f['Name']) for f in og_files[1]] + t_stamp = [pds.Timestamp(f['StartTime'][:10]) for f in og_files[1]] + file_list = pds.Series(data=name_list, index=t_stamp) + else: + file_list = [f['Name'] for f in og_files[1]] + + return file_list diff --git a/pysatNASA/instruments/methods/de2.py b/pysatNASA/instruments/methods/de2.py index ea33e23b..8e44575d 100644 --- a/pysatNASA/instruments/methods/de2.py +++ b/pysatNASA/instruments/methods/de2.py @@ -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.')), @@ -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.')) } diff --git a/pysatNASA/instruments/methods/dmsp.py b/pysatNASA/instruments/methods/dmsp.py new file mode 100644 index 00000000..3f930c0b --- /dev/null +++ b/pysatNASA/instruments/methods/dmsp.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +"""Provides non-instrument specific routines for the DMSP data.""" + +ackn_str = "".join(["This Defense Meteorological Satellite Program (DMSP) ", + "satellite data is provided through CDAWeb"]) + +refs = {'ssusi': ''.join(('Larry J. Paxton, Daniel Morrison, Yongliang Zhang,', + ' Hyosub Kil, Brian Wolven, Bernard S. Ogorzalek, ', + 'David C. Humm, and Ching-I. Meng "Validation of ', + 'remote sensing products produced by the Special ', + 'Sensor Ultraviolet Scanning Imager (SSUSI): a far ', + 'UV-imaging spectrograph on DMSP F-16", Proc. SPIE ', + '4485, Optical Spectroscopic Techniques, Remote ', + 'Sensing, and Instrumentation for Atmospheric and ', + 'Space Research IV, (30 January 2002); ', + 'doi:10.1117/12.454268'))} diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index 60ead57f..cc6a24e9 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -1,6 +1,6 @@ """General methods for NASA instruments.""" -import warnings +import numpy as np import pysat @@ -23,15 +23,52 @@ def init(self, module, name): # Set acknowledgements self.acknowledgements = getattr(module, 'ackn_str') + + if hasattr(module, 'rules_url'): + self.acknowledgements.format(getattr(module, 'rules_url')[name]) + pysat.logger.info(self.acknowledgements) # Set references refs = getattr(module, 'refs') + try: + # See if there is a tag level reference + inst_refs = refs[name][self.tag] + except TypeError: + # No tag-level ref, use name-levele + inst_refs = refs[name] if 'mission' in refs.keys(): - self.references = '\n'.join((refs['mission'], refs[name])) + self.references = '\n'.join((refs['mission'], inst_refs)) + else: + self.references = inst_refs + + return + + +def clean(self): + """Clean data to the specified level. + + Note + ---- + Basic cleaning to replace fill values with NaN + + """ + + # Get a list of coords for the data + if self.pandas_format: + coords = [self.data.index.name] else: - self.references = refs[name] + coords = [key for key in self.data.coords.keys()] + + for key in self.variables: + # Skip over the coordinates when cleaning + if key not in coords: + fill = self.meta[key, self.meta.labels.fill_val] + # Replace fill with nan + fill_mask = self[key] == fill + self[key] = self.data[key].where(~fill_mask) + self.meta[key] = {self.meta.labels.fill_val: np.nan} return @@ -46,7 +83,7 @@ def clean_warn(self): 'none' No cleaning applied, routine not called in this case. """ - warnings.warn(' '.join(('No cleaning routines available for', - self.platform, self.name))) + pysat.logger.warning(' '.join(('No cleaning routines available for', + self.platform, self.name))) return diff --git a/pysatNASA/instruments/methods/gold.py b/pysatNASA/instruments/methods/gold.py deleted file mode 100644 index 9ac51312..00000000 --- a/pysatNASA/instruments/methods/gold.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -"""Provides non-instrument specific routines for GOLD data.""" - -ack_str = ' '.join(('This is a data product from the NASA Global-scale', - 'Observations of the Limb and Disk (GOLD) mission, an', - 'Heliophysics Explorer mission of opportunity launched', - 'in January 2018.\n Responsibility of the mission', - 'science falls to the Principal Investigator, Dr.', - 'Richard Eastes at University of Colorado/LASP.\n', - 'Validation of the L1B data products falls to the', - 'instrument lead investigators/scientists.\n* EUV', - 'Dr. Bill McClintock\nValidation of the L2 data', - 'products falls to Computational Physics, Inc.\n* Dr.', - 'Jerry Lumpe\n (https://gold.cs.ucf.edu/).\nOverall', - 'validation of the products is overseen by the GOLD', - 'Project Scientist Dr. Alan Burns.\nUsers of these', - 'data should contact and acknowledge the Principal', - 'Investigator Dr. Richard Eastes and the party', - 'directly responsible for the data product and the', - 'NASA Explorers Project Office.')) -ref_str = ' '.join(('Eastes, R.W., McClintock, W.E., Burns, A.G. et al.', - 'The Global-Scale Observations of the Limb and Disk', - '(GOLD) Mission. Space Sci Rev 212, 383–408 (2017).', - 'https://doi.org/10.1007/s11214-017-0392-2')) diff --git a/pysatNASA/instruments/methods/gps.py b/pysatNASA/instruments/methods/gps.py index bb11168e..684ab544 100644 --- a/pysatNASA/instruments/methods/gps.py +++ b/pysatNASA/instruments/methods/gps.py @@ -1,5 +1,11 @@ # -*- coding: utf-8 -*- -"""Provides non-instrument specific routines for JPL ROTI data.""" +"""Provides non-instrument specific routines for JPL ROTI data. + +.. deprecated:: 0.0.5 + This module is now included in `methods.igs`. + This instrument will be removed in 0.1.0+ to reduce redundancy. + +""" ackn_str = ' '.join(("The GPS Total Electron Content (TEC) data", "produced by the International Global Navigation", diff --git a/pysatNASA/instruments/methods/igs.py b/pysatNASA/instruments/methods/igs.py new file mode 100644 index 00000000..63ad4a5d --- /dev/null +++ b/pysatNASA/instruments/methods/igs.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +"""Provides non-instrument specific routines for JPL ROTI data.""" + +ackn_str = ' '.join(("The GPS Total Electron Content (TEC) data", + "produced by the International Global Navigation", + "Satellite Systems Service (IGS) Ionosphere Working", + "Group is provided through CDAWeb")) + +refs = {'mission': ' '.join(('Feltens J, Schaer S (1998) IGS Products for the', + 'Ionosphere, IGS Position Paper. In:', + 'Proceedings of the IGS analysis centers', + 'workshop, ESOC, Darmstadt, Germany,', + 'pp 225–232, 9–11 February')), + 'gps': {'tec': ' '.join(('M. Hernández-Pajares, J.M. Juan, J. Sanz, R.', + 'Orus, A. Garcia-Rigo, J. Feltens, A.', + 'Komjathy, S.C. Schaer, and A. Krankowski,', + 'The IGS VTEC maps: a reliable source of', + 'ionospheric information since 1998, Journal', + 'of Geodesy (2009) 83:263–275', + 'doi:10.1007/s00190-008-0266-1.\n', + 'Feltens, J., M. Angling, N. Jackson‐Booth,', + 'N. Jakowski, M. Hoque, M. Hernández‐Pajares,', + 'A. Aragón‐Àngel, R. Orús, and R. Zandbergen', + '(2011), Comparative testing of four', + 'ionospheric models driven with GPS', + 'measurements, Radio Sci., 46, RS0D12,', + 'doi:10.1029/2010RS004584.\n', + 'Peng Chen, Hang Liu, Yongchao Ma, Naiquan', + 'Zheng, Accuracy and consistency of different', + 'global ionospheric maps released by IGS', + 'ionosphere associate analysis centers,', + 'Advances in Space Research, Volume 65, Issue', + '1, 2020, Pages 163-174,', + 'doi:10.1016/j.asr.2019.09.042.\n')), + 'roti': ' '.join(('Pi, X., A. J. Mannucci, U. J.', + 'Lindqwister, and C. M. Ho, Monitoring of', + 'global ionospheric irregularities using', + 'the worldwide GPS network, Geophys. Res.', + 'Lett., 24, 2283, 1997.\n', + 'Pi, X., F. J. Meyer, K. Chotoo, Anthony', + 'Freeman, R. G. Caton, and C. T. Bridgwood,', + 'Impact of ionospheric scintillation on', + 'Spaceborne SAR observations studied using', + 'GNSS, Proc. ION-GNSS, pp.1998-2006,', + '2012.'))}} diff --git a/pysatNASA/instruments/methods/jhuapl.py b/pysatNASA/instruments/methods/jhuapl.py new file mode 100644 index 00000000..1f92c802 --- /dev/null +++ b/pysatNASA/instruments/methods/jhuapl.py @@ -0,0 +1,335 @@ +# -*- coding: utf-8 -*- +"""Module for data sets created by JHU APL.""" + +import datetime as dt +import numpy as np +import pandas as pds +import xarray as xr + +from pysat.utils.coords import expand_xarray_dims +from pysat.utils.io import load_netcdf + + +def build_dtimes(data, var, epoch=None, epoch_var='time'): + """Build datetime objects from standard JHU APL time variables. + + Parameters + ---------- + data : xr.Dataset + Xarray dataset with time variables + var : str + Common string to identify desired year, day of year, and seconds of day + epoch : dt.datetime or NoneType + Epoch to subtract from data or NoneType to get seconds of day from + `data` (default=None) + epoch_var : str + Epoch variable containing time data that seconds of day will be + obtained from if `epoch` != None (default='time') + + Returns + ------- + dtimes : list-like + List of datetime objects + + """ + ykey = 'YEAR{:s}'.format(var) + dkey = 'DOY{:s}'.format(var) + skey = 'TIME{:s}'.format(var) + + if epoch is None: + hours = [int(np.floor(sec / 3600.0)) for sec in data[skey].values] + mins = [int(np.floor((sec - hours[i] * 3600) / 60.0)) + for i, sec in enumerate(data[skey].values)] + secs = [int(np.floor((sec - hours[i] * 3600 - mins[i] * 60))) + for i, sec in enumerate(data[skey].values)] + dtimes = [ + dt.datetime.strptime( + "{:4d}-{:03d}-{:02d}-{:02d}-{:02d}-{:06.0f}".format( + int(data[ykey].values[i]), int(data[dkey].values[i]), + hours[i], mins[i], secs[i], + (sec - hours[i] * 3600 - mins[i] * 60 - secs[i]) * 1.0e6), + '%Y-%j-%H-%M-%S-%f') + for i, sec in enumerate(data[skey].values)] + else: + dtimes = [ + dt.datetime.strptime("{:4d}-{:03d}".format( + int(data[ykey].values[i]), int(data[dkey].values[i])), '%Y-%j') + + (pds.to_datetime(etime).to_pydatetime() - epoch) + for i, etime in enumerate(data[epoch_var].values)] + + return dtimes + + +def load_edr_aurora(fnames, tag='', inst_id='', pandas_format=False, + strict_dim_check=True): + """Load JHU APL EDR Aurora data and meta data. + + Parameters + ---------- + fnames : array-like + Iterable of filename strings, full path, to data files to be loaded. + tag : str + Tag name used to identify particular data set to be loaded (default='') + inst_id : str + Instrument ID name used to identify different instrument carriers + (default='') + pandas_format : bool + False for xarray format, True for pandas (default=False) + strict_dim_check : bool + Used for xarray data (`pandas_format` is False). If True, warn the user + that the desired epoch, 'TIME', is not present as a dimension in the + NetCDF file. If False, no warning is raised. (default=True) + + Returns + ------- + data : pds.DataFrame or xr.Dataset + Data to be assigned to the pysat.Instrument.data object. + mdata : pysat.Meta + Pysat Meta data for each data variable. + + Note + ---- + Logger warning 'Epoch label: TIME is not a dimension.' is raised due to + the data format and pysat file expectations. + + Examples + -------- + :: + + inst = pysat.Instrument('timed', 'guvi', tag='edr-aur') + inst.load(2003, 1) + + """ + # Define the input variables + labels = {'units': ('UNITS', str), 'desc': ('TITLE', str)} + + # CDAWeb stores these files in the NetCDF format instead of the CDF format + single_data = list() + for fname in fnames: + # There are multiple files per day, with time as a variable rather + # than a dimension or coordinate. Additionally, no coordinates + # are assigned. + sdata, mdata = load_netcdf(fname, epoch_name='TIME', epoch_unit='s', + meta_kwargs={'labels': labels}, + pandas_format=pandas_format, + decode_times=False, + strict_dim_check=strict_dim_check) + + # Calculate the time for this data file. The pysat `load_netcdf` routine + # converts the 'TIME' parameter (seconds of day) into datetime using + # the UNIX epoch as the date offset + ftime = dt.datetime.strptime( + "{:4d}-{:03d}".format( + sdata['YEAR'].values.astype(int), + sdata['DOY'].values.astype(int)), '%Y-%j') + ( + pds.to_datetime(sdata['time'].values).to_pydatetime() + - dt.datetime(1970, 1, 1)) + + # Assign a datetime variable, making indexing possible + sdata['time'] = ftime + sdata = sdata.assign_coords( + {'time': sdata['time']}).expand_dims(dim='time') + + # Save the data in the file list + single_data.append(sdata) + + # Update the meta data + # TODO(https://github.com/pysat/pysat/issues/1078): Update the metadata by + # removing 'TIME', once possible + for var in mdata.keys(): + # Update the fill value, using information from the global header + mdata[var] = {mdata.labels.fill_val: mdata.header.NO_DATA_IN_BIN_VALUE} + + # After loading all the data, determine which dimensions need to be + # expanded. Pad the data so that all dimensions are the same shape. + single_data = expand_xarray_dims(single_data, mdata, dims_equal=False) + + # Combine all the data, indexing along time + data = xr.combine_by_coords(single_data) + + return data, mdata + + +def load_sdr_aurora(fnames, tag='', inst_id='', pandas_format=False, + strict_dim_check=True, combine_times=False): + """Load JHU APL SDR data and meta data. + + Parameters + ---------- + fnames : array-like + Iterable of filename strings, full path, to data files to be loaded. + tag : str + Tag name used to identify particular data set to be loaded (default='') + inst_id : str + Instrument ID name used to identify different instrument carriers + (default='') + pandas_format : bool + False for xarray format, True for pandas (default=False) + strict_dim_check : bool + Used for xarray data (`pandas_format` is False). If True, warn the user + that the desired epoch, 'TIME_DAY', is not present as a dimension in the + NetCDF file. If False, no warning is raised. (default=True)``` + combine_times : bool + For SDR data, optionally combine the different datetime coordinates + into a single time coordinate (default=False) + + Returns + ------- + data : pds.DataFrame or xr.Dataset + Data to be assigned to the pysat.Instrument.data object. + mdata : pysat.Meta + Pysat Meta data for each data variable. + + Note + ---- + Logger warning 'Epoch label: TIME is not a dimension.' is raised due to + the data format and pysat file expectations. + + Examples + -------- + :: + + inst = pysat.Instrument('timed', 'guvi', tag='edr-aur') + inst.load(2003, 1) + + """ + # Define the input variables and working variables + labels = {'units': ('UNITS', str), 'desc': ('TITLE', str)} + load_time = 'TIME_DAY' + time_vars = ['YEAR_DAY', 'DOY_DAY', 'TIME_EPOCH_DAY', 'YEAR_NIGHT', + 'DOY_NIGHT', 'TIME_NIGHT', 'TIME_EPOCH_NIGHT'] + coords = ['PIERCEPOINT_NIGHT_LATITUDE', 'PIERCEPOINT_NIGHT_LONGITUDE', + 'PIERCEPOINT_NIGHT_ALTITUDE', 'PIERCEPOINT_NIGHT_SZA', + 'PIERCEPOINT_DAY_LATITUDE', 'PIERCEPOINT_DAY_LONGITUDE', + 'PIERCEPOINT_DAY_ALTITUDE', 'PIERCEPOINT_DAY_SZA'] + time_dims = ['time'] + rename_dims = {'nAlongDay': 'nAlong', 'nAlongNight': 'nAlong'} + + if tag == 'sdr-imaging': + time_vars.extend(["YEAR_DAY_AURORAL", "DOY_DAY_AURORAL", + "TIME_DAY_AURORAL", "TIME_EPOCH_DAY_AURORAL"]) + coords.extend(['PIERCEPOINT_DAY_LATITUDE_AURORAL', + 'PIERCEPOINT_DAY_LONGITUDE_AURORAL', + 'PIERCEPOINT_DAY_ALTITUDE_AURORAL', + 'PIERCEPOINT_DAY_SZA_AURORAL']) + time_dims.append('time_auroral') + rename_dims['nCrossDay'] = 'nCross' + rename_dims['nCrossNight'] = 'nCross' + rename_dims['nAlongDayAur'] = 'time_auroral' + elif tag == 'sdr-spectrograph': + coords.extend(['PIERCEPOINT_NIGHT_ZENITH_ANGLE', + 'PIERCEPOINT_NIGHT_SAZIMUTH', + 'PIERCEPOINT_DAY_ZENITH_ANGLE', + 'PIERCEPOINT_DAY_SAZIMUTH']) + + if inst_id == 'low_res': + time_vars.extend(["YEAR_GAIM_DAY", "DOY_GAIM_DAY", "TIME_GAIM_DAY", + "TIME_GAIM_NIGHT", "YEAR_GAIM_NIGHT", + "DOY_GAIM_NIGHT"]) + time_dims.extend(['time_gaim_day', 'time_gaim_night']) + rename_dims['nAlongGAIMDay'] = 'time_gaim_day' + rename_dims['nAlongGAIMNight'] = 'time_gaim_night' + + # CDAWeb stores these files in the NetCDF format instead of the CDF format + inners = None + for fname in fnames: + # There are multiple files per day, with time as a variable rather + # than a dimension or coordinate. Additionally, no coordinates + # are assigned. + sdata, mdata = load_netcdf(fname, epoch_name=load_time, epoch_unit='s', + meta_kwargs={'labels': labels}, + pandas_format=pandas_format, + decode_times=False, + strict_dim_check=strict_dim_check) + + # Calculate the time for this data file. The pysat `load_netcdf` routine + # converts the 'TIME' parameter (seconds of day) into datetime using + # the UNIX epoch as the date offset + ftime = build_dtimes(sdata, '_DAY', dt.datetime(1970, 1, 1)) + + # Ensure identical day and night dimensions + if sdata.dims['nAlongDay'] != sdata.dims['nAlongNight']: + raise ValueError('Along-track day and night dimensions differ') + + if 'nCrossDay' in rename_dims.keys(): + if sdata.dims['nCrossDay'] != sdata.dims['nCrossNight']: + raise ValueError('Cross-track day and night dimensions differ') + + # Combine identical dimensions and rename 'nAlong' to 'time' + sdata = sdata.rename_dims(rename_dims) + + if tag == 'sdr-imaging': + sdata = sdata.assign(time_auroral=build_dtimes(sdata, + '_DAY_AURORAL')) + elif tag == 'sdr-spectrograph' and inst_id == 'low_res': + sdata = sdata.assign(time_gaim_day=build_dtimes( + sdata, '_GAIM_DAY'), time_gaim_night=build_dtimes( + sdata, '_GAIM_NIGHT')) + + # Test that day and night times are consistent to the nearest second + for i, ntime in enumerate(build_dtimes(sdata, '_NIGHT')): + if abs(ntime - ftime[i]).total_seconds() > 1.0: + raise ValueError('Day and night times differ') + + # Remove redundant time variables and rname the 'nAlong' dimension + sdata = sdata.drop_vars(time_vars).swap_dims({'nAlong': 'time'}) + + # Assign time as a coordinate for combining files indexing + sdata['time'] = ftime + + # Separate into inner datasets + inner_keys = {dim: [key for key in sdata.keys() + if dim in sdata[key].dims] for dim in time_dims} + inner_dat = {dim: sdata.get(inner_keys[dim]) for dim in time_dims} + + # Add 'single_var's into 'time' dataset to keep track + sv_keys = [val.name for val in sdata.values() + if 'single_var' in val.dims] + singlevar_set = sdata.get(sv_keys) + inner_dat['time'] = xr.merge([inner_dat['time'], singlevar_set]) + + # Concatenate along desired dimension with previous files' data + if inners is None: + # No previous data, assign the data separated by dimension + inners = dict(inner_dat) + else: + # Concatenate with existing data + inners = {dim: xr.concat([inners[dim], inner_dat[dim]], dim=dim) + for dim in time_dims} + + # Update the meta data + # TODO(https://github.com/pysat/pysat/issues/1078): Update the metadata by + # removing dimensions and time, once possible + for var in mdata.keys(): + # Update the fill value, using information from the global header + mdata[var] = {mdata.labels.fill_val: mdata.header.NO_DATA_IN_BIN_VALUE} + + # Combine all time dimensions + if combine_times: + data_list = expand_xarray_dims([inners[dim] if dim == 'time' else + inners[dim].rename_dims({dim: 'time'}) + for dim in time_dims], mdata, + dims_equal=False) + else: + data_list = [inners[dim] for dim in time_dims] + + # Combine all the data, indexing along time + data = xr.merge(data_list) + + # Set additional coordinates + data = data.set_coords(coords).assign_coords({'time': data['time']}) + if tag == 'sdr-imaging': + data = data.assign_coords( + {'nchan': ["121.6nm", "130.4nm", "135.6nm", "LBHshort", "LBHlong"], + "nchanAur": ["121.6nm", "130.4nm", "135.6nm", "LBHshort", + "LBHlong"], + "nCross": sdata.nCross.data, + "nCrossDayAur": sdata.nCrossDayAur.data}) + elif tag == 'sdr-spectrograph': + data = data.assign_coords({"nchan": ["121.6nm", "130.4nm", "135.6nm", + "LBHshort", "LBHlong", "?"]}) + + # Ensure the data is ordered correctly + data = data.sortby('time') + + return data, mdata diff --git a/pysatNASA/instruments/methods/omni.py b/pysatNASA/instruments/methods/omni.py index 8640340a..2844b0cb 100644 --- a/pysatNASA/instruments/methods/omni.py +++ b/pysatNASA/instruments/methods/omni.py @@ -5,9 +5,8 @@ import numpy as np import pandas as pds from scipy import stats -import warnings -from pysat import logger +import pysat def time_shift_to_magnetic_poles(inst): @@ -46,8 +45,8 @@ def time_shift_to_magnetic_poles(inst): time_x = inst['BSN_x'] * 6371.2 / -inst['Vx'] idx, = np.where(np.isnan(time_x)) if len(idx) > 0: - logger.info(time_x[idx]) - logger.info(time_x) + pysat.logger.info(time_x[idx]) + pysat.logger.info(time_x) time_x_offset = [pds.DateOffset(seconds=time) for time in time_x.astype(int)] new_index = [] @@ -115,8 +114,10 @@ def calculate_imf_steadiness(inst, steady_window=15, min_window_frac=0.75, max_wnum = np.floor(steady_window / sample_rate) if max_wnum != steady_window / sample_rate: steady_window = max_wnum * sample_rate - logger.warning("sample rate is not a factor of the statistical window") - logger.warning("new statistical window is {:.1f}".format(steady_window)) + pysat.logger.warning(" ".join(("sample rate is not a factor of the", + "statistical window"))) + pysat.logger.warning(" ".join(("new statistical window is", + "{:.1f}".format(steady_window)))) min_wnum = int(np.ceil(max_wnum * min_window_frac)) @@ -137,9 +138,9 @@ def calculate_imf_steadiness(inst, steady_window=15, min_window_frac=0.75, kwargs=circ_kwargs, raw=True) except TypeError: - warnings.warn(' '.join(['To automatically remove NaNs from the', - 'calculation, please upgrade to scipy 1.4 or', - 'newer'])) + pysat.logger.warn(' '.join(['To automatically remove NaNs from the', + 'calculation, please upgrade to scipy 1.4', + 'or newer.'])) circ_kwargs.pop('nan_policy') ca_std = \ inst['clock_angle'].rolling(min_periods=min_wnum, diff --git a/pysatNASA/instruments/methods/ses14.py b/pysatNASA/instruments/methods/ses14.py new file mode 100644 index 00000000..5307d592 --- /dev/null +++ b/pysatNASA/instruments/methods/ses14.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +"""Provides non-instrument specific routines for SES14 instruments.""" + +ackn_str = ' '.join(('This is a data product from the NASA Global-scale', + 'Observations of the Limb and Disk (GOLD) mission, an', + 'Heliophysics Explorer mission of opportunity launched', + 'in January 2018.\n Responsibility of the mission', + 'science falls to the Principal Investigator, Dr.', + 'Richard Eastes at University of Colorado/LASP.\n', + 'Validation of the L1B data products falls to the', + 'instrument lead investigators/scientists.\n* EUV', + 'Dr. Bill McClintock\nValidation of the L2 data', + 'products falls to Computational Physics, Inc.\n* Dr.', + 'Jerry Lumpe\n (https://gold.cs.ucf.edu/).\nOverall', + 'validation of the products is overseen by the GOLD', + 'Project Scientist Dr. Alan Burns.\nUsers of these', + 'data should contact and acknowledge the Principal', + 'Investigator Dr. Richard Eastes and the party', + 'directly responsible for the data product and the', + 'NASA Explorers Project Office.')) +refs = {'gold': ' '.join(('Eastes, R.W., McClintock, W.E., Burns, A.G. et', + 'al., The Global-Scale Observations of the Limb', + 'and Disk (GOLD) Mission. Space Sci Rev 212,', + '383–408 (2017). doi:10.1007/s11214-017-0392-2'))} diff --git a/pysatNASA/instruments/methods/timed.py b/pysatNASA/instruments/methods/timed.py new file mode 100644 index 00000000..e6d4e2fa --- /dev/null +++ b/pysatNASA/instruments/methods/timed.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +"""Provides non-instrument specific routines for the TIMED data.""" + +rules_url = {'guvi': 'http://guvitimed.jhuapl.edu/home_guvi-datausage', + 'saber': 'https://saber.gats-inc.com/data_services.php', + 'see': 'https://www.timed.jhuapl.edu/WWW/scripts/mdc_rules.pl'} + +ackn_str = "".join(["This Thermosphere Ionosphere Mesosphere Energetics ", + "Dynamics (TIMED) satellite data is provided through ", + "CDAWeb. Please see the Rules of the Road at {:s}"]) + +refs = {'guvi': ''.join(['Larry J. Paxton, Andrew B. Christensen, David C. ', + 'Humm, Bernard S. Ogorzalek, C. Thompson Pardoe, ', + 'Daniel Morrison, Michele B. Weiss, W. Crain, ', + 'Patricia H. Lew, Dan J. Mabry, John O. Goldsten, ', + 'Stephen A. Gary, David F. Persons, Mark J. Harold, ', + 'E. Brian Alvarez, Carl J. Ercol, Douglas J. ', + 'Strickland, and Ching-I. Meng "Global ultraviolet ', + 'imager (GUVI): measuring composition and energy ', + 'inputs for the NASA Thermosphere Ionosphere ', + 'Mesosphere Energetics and Dynamics (TIMED) mission",', + 'Proc. SPIE 3756, Optical Spectroscopic Techniques ', + 'and Instrumentation for Atmospheric and Space ', + 'Research III, (20 October 1999); ', + 'doi:10.1117/12.366380']), + 'saber': '', + 'see': ' '.join(('Woods, T. N., Eparvier, F. G., Bailey,', + 'S. M., Chamberlin, P. C., Lean, J.,', + 'Rottman, G. J., Solomon, S. C., Tobiska,', + 'W. K., and Woodraska, D. L. (2005),', + 'Solar EUV Experiment (SEE): Mission', + 'overview and first results, J. Geophys.', + 'Res., 110, A01312, doi:10.1029/2004JA010765.'))} diff --git a/pysatNASA/instruments/omni_hro.py b/pysatNASA/instruments/omni_hro.py index d709c1b5..d7a205cf 100644 --- a/pysatNASA/instruments/omni_hro.py +++ b/pysatNASA/instruments/omni_hro.py @@ -44,9 +44,8 @@ import pandas as pds import warnings +import pysat from pysat.instruments.methods import general as mm_gen -from pysat import logger -from pysat.utils import time as pysat_time from pysatNASA.instruments.methods import cdaweb as cdw from pysatNASA.instruments.methods import omni as mm_omni @@ -86,7 +85,7 @@ def init(self): 'magnetic field data, J. Geophys. Res.,', 'Vol. 110, No. A2, A02209,', '10.1029/2004JA010649.')) - logger.info(ackn_str) + pysat.logger.info(ackn_str) return @@ -140,59 +139,12 @@ def clean(self): file_cadence=pds.DateOffset(months=1)) # Set the list_remote_files routine -remote_dir = '/pub/data/omni/omni_cdaweb/hro_{tag:s}/{{year:4d}}/' -download_tags = {inst_id: {tag: {'remote_dir': remote_dir.format(tag=tag), - 'fname': supported_tags[inst_id][tag]} - for tag in tags.keys()} - for inst_id in inst_ids.keys()} -list_remote_files = functools.partial(cdw.list_remote_files, - supported_tags=download_tags) - - -# Set the download routine -def download(date_array, tag, inst_id, data_path, update_files=False): - """Download OMNI HRO data from CDAWeb. - - Parameters - ---------- - date_array : array-like - Sequence of dates for which files will be downloaded. - tag : str - Denotes type of file to load. - inst_id : str - Specifies the satellite ID for a constellation. - data_path : str - Path to data directory. - update_files : bool - Re-download data for files that already exist if True (default=False) - - Raises - ------ - IOError - If a problem is encountered connecting to the gateway or retrieving - data from the repository. - - Warnings - -------- - Only able to download current forecast data, not archived forecasts. - - Note - ---- - Called by pysat. Not intended for direct use by user. - - """ - - # Set the download tags - - # Adjust the date_array for monthly downloads - if date_array.freq != 'MS': - date_array = pysat_time.create_date_range( - dt.datetime(date_array[0].year, date_array[0].month, 1), - date_array[-1], freq='MS') +download_tags = {'': {'1min': 'OMNI_HRO_1MIN', '5min': 'OMNI_HRO_5MIN'}} +download = functools.partial(cdw.cdas_download, + supported_tags=download_tags) - cdw.download(date_array, tag=tag, inst_id=inst_id, - supported_tags=download_tags, data_path=data_path) - return +list_remote_files = functools.partial(cdw.cdas_list_remote_files, + supported_tags=download_tags) # Set the load routine diff --git a/pysatNASA/instruments/ses14_gold.py b/pysatNASA/instruments/ses14_gold.py index 5a89413f..980143a2 100644 --- a/pysatNASA/instruments/ses14_gold.py +++ b/pysatNASA/instruments/ses14_gold.py @@ -11,12 +11,20 @@ 'gold' tag 'nmax' + 'tlimb' + 'tdisk' + 'o2den' Warnings -------- - The cleaning parameters for the instrument are still under development. -- strict_time_flag must be set to False +- Loading multiple days of data requires a bugfix in pysat 3.1.0 or higher. +Note +---- +In roughly 0.3% of daily files, Channel A and Channel B scans begin at the same +time. One microsecond is added to Channel B to ensure uniqueness in the xarray +index. The nominal scan rate for each channel is every 30 minutes. Examples -------- @@ -24,8 +32,7 @@ import datetime as dt import pysat - nmax = pysat.Instrument(platform='ses14', name='gold', tag='nmax' - strict_time_flag=False) + nmax = pysat.Instrument(platform='ses14', name='gold', tag='nmax') nmax.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) nmax.load(2020, 1) @@ -36,60 +43,38 @@ import numpy as np from pysat.instruments.methods import general as ps_gen -from pysat import logger from pysat.utils.io import load_netcdf from pysatNASA.instruments.methods import cdaweb as cdw from pysatNASA.instruments.methods import general as mm_nasa -from pysatNASA.instruments.methods import gold as mm_gold +from pysatNASA.instruments.methods import ses14 as mm_gold # ---------------------------------------------------------------------------- # Instrument attributes platform = 'ses14' name = 'gold' -tags = {'nmax': 'Level 2 Nmax data for the GOLD instrument'} -inst_ids = {'': ['nmax']} +tags = {'nmax': 'Level 2 max dens data for the GOLD instrument', + 'tlimb': 'Level 2 limb temp data for the GOLD instrument', + 'tdisk': 'Level 2 disk temp data for the GOLD instrument', + 'o2den': 'Level 2 O2 dens data for the GOLD instrument'} +inst_ids = {'': [tag for tag in tags.keys()]} pandas_format = False # ---------------------------------------------------------------------------- # Instrument test attributes -_test_dates = {'': {'nmax': dt.datetime(2020, 1, 1)}} +_test_dates = {'': {tag: dt.datetime(2020, 1, 1) for tag in tags.keys()}} # ---------------------------------------------------------------------------- # Instrument methods - -def init(self): - """Initialize the Instrument object with instrument specific values. - - Runs once upon instantiation. - - Parameters - ----------- - self : pysat.Instrument - Instrument class object - - """ - - logger.info(mm_gold.ack_str) - logger.warning(' '.join(('Time stamps may be non-unique because Channel A', - 'and B are different instruments. An upgrade to', - 'the pysat.Constellation object is required to', - 'solve this issue. See pysat issue #614 for more', - 'info.'))) - self.acknowledgements = mm_gold.ack_str - self.references = mm_gold.ref_str - - return - +init = functools.partial(mm_nasa.init, module=mm_gold, name=name) # No cleaning, use standard warning function instead clean = mm_nasa.clean_warn - # ---------------------------------------------------------------------------- # Instrument functions # @@ -103,17 +88,90 @@ def init(self): list_files = functools.partial(ps_gen.list_files, supported_tags=supported_tags) +# Set download tags. Note that tlimb uses the general implementation, while +# other tags use the cdasws implementation. +download_tags = {'': {'tlimb': {'remote_dir': ''.join(('/pub/data/gold/', + 'level2/tlimb', + '/{year:4d}/')), + 'fname': supported_tags['']['tlimb']}, + 'nmax': 'GOLD_L2_NMAX', + 'o2den': 'GOLD_L2_O2DEN', + 'tdisk': 'GOLD_L2_TDISK'}} + + # Set the download routine -download_tags = {inst_id: - {tag: {'remote_dir': ''.join(('/pub/data/gold/level2/', tag, - '/{year:4d}/')), - 'fname': supported_tags[''][tag]} - for tag in tags.keys()} for inst_id in inst_ids.keys()} -download = functools.partial(cdw.download, supported_tags=download_tags) +def download(date_array, tag='', inst_id='', data_path=None): + """Download NASA GOLD data. + + This routine is intended to be used by pysat instrument modules supporting + a particular NASA CDAWeb dataset. + + Parameters + ---------- + date_array : array-like + Array of datetimes to download data for. Provided by pysat. + tag : str + Data product tag (default='') + inst_id : str + Instrument ID (default='') + data_path : str or NoneType + Path to data directory. If None is specified, the value previously + set in Instrument.files.data_path is used. (default=None) + + """ + + if tag == 'tlimb': + cdw.download(date_array, tag=tag, inst_id=inst_id, + supported_tags=download_tags, data_path=data_path) + else: + cdw.cdas_download(date_array, tag=tag, inst_id=inst_id, + supported_tags=download_tags, data_path=data_path) + # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, - supported_tags=download_tags) +def list_remote_files(tag='', inst_id='', start=None, stop=None, + series_out=True): + """Return a list of every file for chosen remote data. + + This routine is intended to be used by pysat instrument modules supporting + a particular NASA CDAWeb dataset. + + Parameters + ---------- + tag : str + Data product tag (default='') + inst_id : str + Instrument ID (default='') + start : dt.datetime or NoneType + Starting time for file list. A None value will start with the first + file found. + (default=None) + stop : dt.datetime or NoneType + Ending time for the file list. A None value will stop with the last + file found. + (default=None) + series_out : bool + boolean to determine output type. True for pandas series of file names, + and False for a list of the full web address. + (default=True) + + Returns + ------- + file_list : list + A list containing the verified available files + + """ + + if tag == 'tlimb': + file_list = cdw.list_remote_files(tag=tag, inst_id=inst_id, + start=start, stop=stop, + supported_tags=download_tags) + else: + file_list = cdw.cdas_list_remote_files(tag=tag, inst_id=inst_id, + start=start, stop=stop, + supported_tags=download_tags, + series_out=series_out) + return file_list def load(fnames, tag='', inst_id=''): @@ -179,15 +237,32 @@ def load(fnames, tag='', inst_id=''): 'Valid_Max': 'Valid_Max', '_FillValue': 'fill', 'FillVal': 'fill', 'TIME_BASE': 'time_base'} + if tag in ['nmax', 'tdisk', 'tlimb']: + epoch_name = 'nscans' + + elif tag == 'o2den': + epoch_name = 'nevents' + data, meta = load_netcdf(fnames, pandas_format=pandas_format, - epoch_name='nscans', labels=labels, + epoch_name=epoch_name, + meta_kwargs={'labels': labels}, meta_translation=meta_translation, - drop_meta_labels='FILLVAL') + combine_by_coords=False, + drop_meta_labels='FILLVAL', + decode_times=False) - if tag == 'nmax': + if tag in ['nmax', 'tdisk', 'tlimb']: # Add time coordinate from scan_start_time - data['time'] = [dt.datetime.strptime(str(val), "b'%Y-%m-%dT%H:%M:%SZ'") - for val in data['scan_start_time'].values] + time = [dt.datetime.strptime(str(val), "b'%Y-%m-%dT%H:%M:%SZ'") + for val in data['scan_start_time'].values] + + # Add a delta of 1 microsecond for channel B. + delta_time = [1 if ch == b'CHB' else 0 for ch in data['channel'].values] + data['time'] = [time[i] + dt.timedelta(microseconds=delta_time[i]) + for i in range(0, len(time))] + + # Sort times to ensure monotonic increase. + data = data.sortby('time') # Update coordinates with dimensional data data = data.assign_coords({'nlats': data['nlats'], @@ -200,4 +275,30 @@ def load(fnames, tag='', inst_id=''): meta['nlons'] = {meta.labels.notes: 'Index for longitude values'} meta['nmask'] = {meta.labels.notes: 'Index for mask values'} + elif tag == 'o2den': + + # Removing extra variables + if len(data['zret'].dims) > 1: + data['zret'] = data['zret'].isel(time=0) + data['zdat'] = data['zdat'].isel(time=0) + + # Add time coordinate from utc_time + data['time'] = [dt.datetime.strptime(str(val), + "b'%Y-%m-%dT%H:%M:%S.%fZ'") + for val in data['time_utc'].values] + + # Add retrieval altitude values and data tangent altitude values + data = data.swap_dims({"nzret": "zret", "nzdat": "zdat"}) + + # Update coordinates with dimensional data + data = data.assign_coords({'zret': data['zret'], + 'zdat': data['zdat'], + 'n_wavelength': data['n_wavelength'], + 'channel': data['channel']}) + meta['time'] = {meta.labels.notes: 'Converted from time_utc'} + meta['zret'] = {meta.labels.notes: ''.join(('Index for retrieval', + ' altitude values'))} + meta['zdat'] = {meta.labels.notes: ''.join(('Index for data tangent', + ' altitude values'))} + return data, meta diff --git a/pysatNASA/instruments/timed_guvi.py b/pysatNASA/instruments/timed_guvi.py new file mode 100644 index 00000000..2a0f7da8 --- /dev/null +++ b/pysatNASA/instruments/timed_guvi.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +"""Module for the TIMED GUVI instrument. + +Supports the Global UltraViolet Imager (GUVI) instrument on the Thermosphere +Ionosphere Mesosphere Energetics Dynamics (TIMED) satellite data from the +NASA Coordinated Data Analysis Web (CDAWeb). + +From JHU APL: + +The Global Ultraviolet Imager (GUVI) is one of four instruments that constitute +the TIMED spacecraft, the first mission of the NASA Solar Connections program. +The TIMED spacecraft is being built by Johns Hopkins University Applied Physics +Laboratory and GUVI is a joint collaboration between JHU/APL and the Aerospace +Corporation. TIMED will be used to study the energetics and dynamics of the +Mesosphere and lower Thermosphere between an altitude of approximately 60 to 180 +kilometers. + +References +---------- +Larry J. Paxton, Andrew B. Christensen, David C. Humm, Bernard S. Ogorzalek, C. +Thompson Pardoe, Daniel Morrison, Michele B. Weiss, W. Crain, Patricia H. Lew, +Dan J. Mabry, John O. Goldsten, Stephen A. Gary, David F. Persons, Mark J. +Harold, E. Brian Alvarez, Carl J. Ercol, Douglas J. Strickland, and Ching-I. +Meng "Global ultraviolet imager (GUVI): measuring composition and energy inputs +for the NASA Thermosphere Ionosphere Mesosphere Energetics and Dynamics (TIMED) +mission", Proc. SPIE 3756, Optical Spectroscopic Techniques and Instrumentation +for Atmospheric and Space Research III, (20 October 1999); +https://doi.org/10.1117/12.366380 + +Properties +---------- +platform + 'timed' +name + 'guvi' +tag + 'edr-aur' + 'sdr-imaging' + 'sdr-spectrograph' +inst_id + '' + 'high_res' + 'low_res' + +Warnings +-------- +- Currently no cleaning routine. + +Example +------- +:: + + import pysat + guvi = pysat.Instrument(platform='timed', name='guvi', + inst_id='sdr-imaging', tag='low_res') + guvi.download(dt.datetime(2005, 6, 28), dt.datetime(2005, 6, 29)) + guvi.load(date=dt.datetime(2005, 6, 28)) + +""" + +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 general as mm_nasa +from pysatNASA.instruments.methods import jhuapl +from pysatNASA.instruments.methods import timed as mm_timed + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'timed' +name = 'guvi' +tags = {'edr-aur': 'Level 2 Auroral disk imaging mode', + 'sdr-imaging': 'Level 1C imaging data', + 'sdr-spectrograph': 'Level 1C spectrograph data'} +inst_ids = {'': ['edr-aur'], + 'high_res': ['sdr-imaging', 'sdr-spectrograph'], + 'low_res': ['sdr-imaging', 'sdr-spectrograph']} + +pandas_format = False +multi_file_day = True + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {iid: {tag: dt.datetime(2005, 6, 28) for tag in inst_ids[iid]} + for iid in inst_ids.keys()} +_test_load_opt = {iid: {tag: {'combine_times': True} + for tag in inst_ids[iid]} for iid in ['high_res', + 'low_res']} + +# ---------------------------------------------------------------------------- +# Instrument methods + +# Use standard init routine +init = functools.partial(mm_nasa.init, module=mm_timed, 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 = ''.join(('TIMED_GUVI_{lvl:s}{mode:s}_{{year:04d}}{{day:03d}}', + '{{hour:02d}}{{minute:02d}}{{second:02d}}-?????????????_REV', + '??????_Av{{version:02d}}-??r{{revision:03d}}.nc')) +file_lvl = {'low_res': 'L1C-2-disk', 'high_res': 'L1C-disk', '': 'L2B'} +mode = {'sdr-imaging': '-IMG', 'sdr-spectrograph': '-SPECT', + 'edr-aur': '-edr-aur-IMG'} +supported_tags = {inst_id: {tag: fname.format(lvl=file_lvl[inst_id], + mode=mode[tag]) + for tag in tags.keys()} + for inst_id in inst_ids.keys()} +list_files = functools.partial(mm_gen.list_files, supported_tags=supported_tags) + +# Set the download routine +url = ''.join(('/pub/data/timed/guvi/levels_v13/{lvl:s}/{mode:s}/', + '{{year:4d}}/{{day:03d}}/')) +url_lvl = {'sdr-imaging': 'level1c', 'sdr-spectrograph': 'level1c', + 'edr-aur': 'level2b'} +url_mode = {tag: 'imaging/edr-aur' if tag == 'edr-aur' else tag.split('-')[1] + for tag in tags.keys()} +download_tags = {iid: {tag: {'remote_dir': url.format(lvl=url_lvl[tag], + mode=url_mode[tag]), + 'fname': fname.format(lvl=file_lvl[iid], + mode=mode[tag])} + for tag in tags.keys()} for iid in inst_ids.keys()} +download = functools.partial(cdw.download, supported_tags=download_tags) + +# Set the list_remote_files routine +list_remote_files = functools.partial(cdw.list_remote_files, + supported_tags=download_tags) + + +# Set the load routine +def load(fnames, tag='', inst_id='', combine_times=False): + """Load TIMED GUVI data into `xarray.DataSet` and `pysat.Meta` objects. + + This routine is called as needed by pysat. It is not intended + for direct user interaction. + + Parameters + ---------- + fnames : array-like + iterable of filename strings, full path, to data files to be loaded. + This input is nominally provided by pysat itself. + tag : str + tag name used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. + inst_id : str + Satellite ID used to identify particular data set to be loaded. + This input is nominally provided by pysat itself. + combine_times : bool + For SDR data, optionally combine the different datetime coordinates + into a single time coordinate (default=False) + + Returns + ------- + data : xr.DataSet + A xarray DataSet with data prepared for the pysat.Instrument + meta : pysat.Meta + Metadata formatted for a pysat.Instrument object. + + Raises + ------ + ValueError + If temporal dimensions are not consistent + + Note + ---- + Any additional keyword arguments passed to pysat.Instrument + upon instantiation are passed along to this routine. + + Examples + -------- + :: + + inst = pysat.Instrument('timed', 'guvi', + inst_id='high_res', tag='sdr-imaging') + inst.load(2005, 179) + + """ + if tag == 'edr-aur': + data, meta = jhuapl.load_edr_aurora(fnames, tag, inst_id, + pandas_format=pandas_format, + strict_dim_check=False) + else: + data, meta = jhuapl.load_sdr_aurora(fnames, tag, inst_id, + pandas_format=pandas_format, + strict_dim_check=False, + combine_times=combine_times) + + return data, meta diff --git a/pysatNASA/instruments/timed_saber.py b/pysatNASA/instruments/timed_saber.py index 38f82b91..e1e5086a 100644 --- a/pysatNASA/instruments/timed_saber.py +++ b/pysatNASA/instruments/timed_saber.py @@ -50,10 +50,10 @@ # CDAWeb methods prewritten for pysat from pysat.instruments.methods import general as mm_gen -from pysat import logger from pysatNASA.instruments.methods import cdaweb as cdw from pysatNASA.instruments.methods import general as mm_nasa +from pysatNASA.instruments.methods import timed as mm_timed # ---------------------------------------------------------------------------- # Instrument attributes @@ -68,7 +68,7 @@ # Set to False to specify using xarray (not using pandas) # Set to True if data will be returned via a pandas DataFrame -pandas_format = True +pandas_format = False # ---------------------------------------------------------------------------- # Instrument test attributes @@ -78,33 +78,18 @@ # ---------------------------------------------------------------------------- # Instrument methods - -def init(self): - """Initialize the Instrument object with instrument specific values. - - Runs once upon instantiation. - - """ - - rules_url = 'https://saber.gats-inc.com/data_services.php' - ackn_str = ' '.join(('Please see the Rules of the Road at', rules_url)) - - logger.info(ackn_str) - self.acknowledgements = ackn_str - self.references = '' - - return - +init = functools.partial(mm_nasa.init, module=mm_timed, name=name) # No cleaning, use standard warning function instead clean = mm_nasa.clean_warn - # ---------------------------------------------------------------------------- # Instrument functions # # Use the default CDAWeb and pysat methods +# TODO(#104): Switch to netCDF4 files once unzip (#103) is supported. + # Set the list_files routine fname = ''.join(('timed_l2a_saber_{year:04d}{month:02d}{day:02d}', '{hour:02d}{minute:02d}_v{version:02d}-{revision:02d}-', @@ -113,16 +98,17 @@ def init(self): list_files = functools.partial(mm_gen.list_files, supported_tags=supported_tags) -# Set the load routine -load = cdw.load +# Set the load routine. Note that the time variable associated with +# tpaltitude is renamed to avoid conflict with renaming Epoch. +load = functools.partial(cdw.load, pandas_format=pandas_format, + drop_dims='record0', + var_translation={'time': 'tp_time'}, + use_cdflib=True) # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/timed/saber/level2a_cdf', - '/{year:4d}/{month:02d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'TIMED_L2A_SABER'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/instruments/timed_see.py b/pysatNASA/instruments/timed_see.py index 903058ab..02cc5d3c 100644 --- a/pysatNASA/instruments/timed_see.py +++ b/pysatNASA/instruments/timed_see.py @@ -17,19 +17,12 @@ None inst_id None supported -flatten_twod - If True, then two dimensional data is flattened across - columns. Name mangling is used to group data, first column - is 'name', last column is 'name_end'. In between numbers are - appended 'name_1', 'name_2', etc. All data for a given 2D array - may be accessed via, data.loc[:, 'item':'item_end'] - If False, then 2D data is stored as a series of DataFrames, - indexed by Epoch. data.loc[0, 'item'] - (default=True) Note ---- - no tag required +- cdflib load routine raises ISTP Compliance Warnings for several variables. + This is due to how the Epoch is listed in the original files. Warnings -------- @@ -42,10 +35,10 @@ import pandas as pds from pysat.instruments.methods import general as mm_gen -from pysat import logger from pysatNASA.instruments.methods import cdaweb as cdw from pysatNASA.instruments.methods import general as mm_nasa +from pysatNASA.instruments.methods import timed as mm_timed # ---------------------------------------------------------------------------- # Instrument attributes @@ -54,6 +47,7 @@ name = 'see' tags = {'': ''} inst_ids = {'': [tag for tag in tags.keys()]} +pandas_format = False # ---------------------------------------------------------------------------- # Instrument test attributes @@ -63,39 +57,18 @@ # ---------------------------------------------------------------------------- # Instrument methods - -def init(self): - """Initialize the Instrument object with instrument specific values. - - Runs once upon instantiation. - - """ - - rules_url = 'https://www.timed.jhuapl.edu/WWW/scripts/mdc_rules.pl' - ackn_str = ' '.join(('Please see the Rules of the Road at', rules_url)) - logger.info(ackn_str) - self.acknowledgements = ackn_str - self.references = ' '.join(('Woods, T. N., Eparvier, F. G., Bailey,', - 'S. M., Chamberlin, P. C., Lean, J.,', - 'Rottman, G. J., Solomon, S. C., Tobiska,', - 'W. K., and Woodraska, D. L. (2005),', - 'Solar EUV Experiment (SEE): Mission', - 'overview and first results, J. Geophys.', - 'Res., 110, A01312,', - 'doi:10.1029/2004JA010765.')) - - return - +init = functools.partial(mm_nasa.init, module=mm_timed, name=name) # No cleaning, use standard warning function instead clean = mm_nasa.clean_warn - # ---------------------------------------------------------------------------- # Instrument functions # # Use the default CDAWeb and pysat methods +# TODO(#104): Switch to netCDF4 files once unzip (#103) is supported. + # Set the list_files routine fname = 'timed_l3a_see_{year:04d}{month:02d}{day:02d}_v{version:02d}.cdf' supported_tags = {'': {'': fname}} @@ -104,15 +77,13 @@ def init(self): file_cadence=pds.DateOffset(months=1)) # Set the load routine -load = functools.partial(cdw.load, file_cadence=pds.DateOffset(months=1)) +load = functools.partial(cdw.load, file_cadence=pds.DateOffset(months=1), + pandas_format=pandas_format, use_cdflib=True) # Set the download routine -basic_tag = {'remote_dir': ''.join(('/pub/data/timed/see/data/level3a_cdf', - '/{year:4d}/{month:02d}/')), - 'fname': fname} -download_tags = {'': {'': basic_tag}} -download = functools.partial(cdw.download, supported_tags=download_tags) +download_tags = {'': {'': 'TIMED_L3A_SEE'}} +download = functools.partial(cdw.cdas_download, supported_tags=download_tags) # Set the list_remote_files routine -list_remote_files = functools.partial(cdw.list_remote_files, +list_remote_files = functools.partial(cdw.cdas_list_remote_files, supported_tags=download_tags) diff --git a/pysatNASA/tests/test_instruments.py b/pysatNASA/tests/test_instruments.py index 07e850f4..8a589938 100644 --- a/pysatNASA/tests/test_instruments.py +++ b/pysatNASA/tests/test_instruments.py @@ -8,6 +8,7 @@ import warnings +import pysat import pytest # Make sure to import your instrument library here @@ -15,6 +16,16 @@ # Import the test classes from pysat from pysat.tests.classes import cls_instrument_library as clslib +from pysat.utils import testing + +try: + import pysatCDF # noqa: F401 + # If this successfully imports, tests need to be run with both pysatCDF + # and cdflib + cdflib_only = False +except ImportError: + # pysatCDF is not present, standard tests default to cdflib. + cdflib_only = True # Tell the standard tests which instruments to run each test on. @@ -27,7 +38,9 @@ for inst in instruments['download']: fname = inst['inst_module'].supported_tags[inst['inst_id']][inst['tag']] if '.cdf' in fname: - instruments['cdf'].append(inst) + temp_inst, _ = clslib.initialize_test_inst_and_date(inst) + if temp_inst.pandas_format: + instruments['cdf'].append(inst) class TestInstruments(clslib.InstLibTests): @@ -42,6 +55,9 @@ class TestInstruments(clslib.InstLibTests): @pytest.mark.second @pytest.mark.parametrize("inst_dict", instruments['cdf']) + @pytest.mark.skipif(cdflib_only, + reason=" ".join(("Additional load tests not required", + "when pysatCDF not installed"))) def test_load_cdflib(self, inst_dict): """Test that instruments load at each cleaning level. @@ -71,7 +87,7 @@ def test_load_cdflib(self, inst_dict): assert UserWarning in categories else: # If error message does not match, raise error anyway - raise(verr) + raise ValueError(verr) # Make sure fake data is cleared assert target not in test_inst.data @@ -79,3 +95,77 @@ def test_load_cdflib(self, inst_dict): pytest.skip("Download data not available.") return + + # TODO(https://github.com/pysat/pysat/issues/1020): This test should be + # removed when header level data is tested in version 3.2.0+ of pysat + @pytest.mark.second + @pytest.mark.parametrize("inst_dict", instruments['cdf']) + def test_meta_header(self, inst_dict): + """Test that instruments have header level metadata attached. + + Parameters + ---------- + inst_dict : dict + Dictionary containing info to instnatiate a specific instrument. + """ + test_inst, date = clslib.initialize_test_inst_and_date(inst_dict) + try: + test_inst.load(date=date, use_header=True, use_cdflib=True) + except ValueError as verr: + # Check if instrument is failing due to strict time flag + if str(verr).find('Loaded data') > 0: + test_inst.strict_time_flag = False + with warnings.catch_warnings(record=True) as war: + test_inst.load(date=date, use_header=True, use_cdflib=True) + assert len(war) >= 1 + categories = [war[j].category for j in range(0, len(war))] + assert UserWarning in categories + else: + # If error message does not match, raise error anyway + raise (verr) + assert test_inst.meta.to_dict() != {} + + +class TestDeprecation(object): + """Unit test for deprecation warnings.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + + warnings.simplefilter("always", DeprecationWarning) + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + return + + @pytest.mark.parametrize("inst_module,tag", [('jpl_gps', 'roti')]) + def test_deprecated_instruments(self, inst_module, tag): + """Check that instantiating old instruments raises a DeprecationWarning. + + Parameters + ---------- + inst_module : str + name of deprecated module. + tag : str + tag of depracted instrument. + + """ + + with warnings.catch_warnings(record=True) as war: + pysat.Instrument(inst_module=getattr(pysatNASA.instruments, + inst_module), + tag=tag, use_header=True) + + warn_msgs = [" ".join(["The instrument module", + "`{:}`".format(inst_module), + "has been deprecated and will be removed", + "in 0.1.0+."])] + + # Ensure the minimum number of warnings were raised. + assert len(war) >= len(warn_msgs) + + # Test the warning messages, ensuring each attribute is present. + testing.eval_warnings(war, warn_msgs) + return diff --git a/pysatNASA/tests/test_methods_cdaweb.py b/pysatNASA/tests/test_methods_cdaweb.py index deb25417..dd7870e6 100644 --- a/pysatNASA/tests/test_methods_cdaweb.py +++ b/pysatNASA/tests/test_methods_cdaweb.py @@ -1,6 +1,7 @@ """Unit tests for the cdaweb instrument methods.""" import datetime as dt +import pandas as pds import requests import pytest @@ -16,8 +17,9 @@ class TestCDAWeb(object): def setup_method(self): """Set up the unit test environment for each method.""" - self.download_tags = pysatNASA.instruments.cnofs_plp.download_tags + self.download_tags = pysatNASA.instruments.timed_guvi.download_tags self.kwargs = {'tag': None, 'inst_id': None} + self.saved_path = pysat.params['data_dirs'] return def teardown_method(self): @@ -31,7 +33,7 @@ def test_remote_file_list_connection_error_append(self): with pytest.raises(Exception) as excinfo: # Giving a bad remote_site address yields similar ConnectionError - cdw.list_remote_files(tag='', inst_id='', + cdw.list_remote_files(tag='sdr-imaging', inst_id='high_res', supported_tags=self.download_tags, remote_url='https://bad/path') @@ -60,6 +62,7 @@ def test_bad_kwarg_download(self, bad_key, bad_val, err_msg): with pytest.raises(ValueError) as excinfo: cdw.download(supported_tags=self.download_tags, date_array=date_array, + data_path=self.saved_path, tag=self.kwargs['tag'], inst_id=self.kwargs['inst_id']) assert str(excinfo.value).find(err_msg) >= 0 @@ -80,11 +83,33 @@ def test_bad_kwarg_list_remote_files(self, bad_key, bad_val, err_msg): assert str(excinfo.value).find(err_msg) >= 0 return - def test_remote_file_list_all(self): - """Test that remote_file_list works if start/stop dates unspecified.""" + @pytest.mark.parametrize("start, stop", + [(None, None), + (dt.datetime(2009, 1, 1), None), + (dt.datetime(2009, 1, 1), + dt.datetime(2009, 1, 1)), + (pds.Timestamp(2009, 1, 1), + pds.Timestamp(2009, 1, 2))]) + def test_remote_file_list_all(self, start, stop): + """Test that remote_file_list works for all start and stop cases.""" self.module = pysatNASA.instruments.cnofs_plp self.test_inst = pysat.Instrument(inst_module=self.module) - files = self.test_inst.remote_file_list() + files = self.test_inst.remote_file_list(start, stop) assert len(files) > 0 return + + @pytest.mark.parametrize("series_out", [(True), (False)]) + def test_cdas_remote_files(self, series_out): + """Test that cdas_list_remote_files can return pandas series.""" + start = dt.datetime(2009, 1, 1) + stop = dt.datetime(2009, 1, 2) + self.module = pysatNASA.instruments.cnofs_plp + self.test_inst = pysat.Instrument(inst_module=self.module) + files = self.test_inst.remote_file_list(start, stop, + series_out=series_out) + if series_out is True: + assert isinstance(files, pds.Series) + else: + assert isinstance(files, list) + return diff --git a/pysatNASA/tests/test_methods_platform.py b/pysatNASA/tests/test_methods_platform.py new file mode 100644 index 00000000..a1cd6611 --- /dev/null +++ b/pysatNASA/tests/test_methods_platform.py @@ -0,0 +1,129 @@ +"""Unit tests for the common NASA platform method attributes.""" + + +from pysatNASA.instruments import methods + + +class TestTIMEDMethods(object): + """Unit tests for `pysat.instruments.methods.timed`.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + self.names = ['see', 'saber', 'guvi'] + self.module = methods.timed + self.platform_str = '(TIMED)' + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + del self.names, self.module, self.platform_str + return + + def test_ack(self): + """Test that the acknowledgements reference the correct platform.""" + + assert self.module.ackn_str.find(self.platform_str) >= 0 + return + + def test_rules(self): + """Test that the rules of the road exist for each instrument.""" + + if hasattr(self.module, "rules_url"): + for name in self.names: + assert name in self.module.rules_url.keys( + ), "No rules URL for {:}".format(name) + return + + def test_ref(self): + """Test that all instruments have references.""" + + for name in self.names: + assert name in self.module.refs.keys( + ), "No reference for {:}".format(name) + return + + +class TestDMSPMethods(TestTIMEDMethods): + """Unit tests for `pysat.instruments.methods.dmsp`.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + self.names = ['ssusi'] + self.module = methods.dmsp + self.platform_str = '(DMSP)' + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + del self.names, self.module, self.platform_str + return + + +class TestCNOFSMethods(TestTIMEDMethods): + """Unit tests for `pysat.instruments.methods.cnofs`.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + self.names = ['ivm', 'plp', 'vefi'] + self.module = methods.cnofs + self.platform_str = '(C/NOFS)' + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + del self.names, self.module, self.platform_str + return + + +class TestDE2Methods(TestTIMEDMethods): + """Unit tests for `pysat.instruments.methods.de2`.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + self.names = ['lang', 'nacs', 'rpa', 'wats'] + self.module = methods.de2 + self.platform_str = 'Dynamics Explorer 2' + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + del self.names, self.module, self.platform_str + return + + +class TestSES14Methods(TestTIMEDMethods): + """Unit tests for `pysat.instruments.methods.ses14`.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + self.names = ['gold'] + self.module = methods.ses14 + self.platform_str = 'Global-scale Observations of the Limb and Disk' + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + del self.names, self.module, self.platform_str + return + + +class TestGPSMethods(TestTIMEDMethods): + """Unit tests for `pysat.instruments.methods.gps`.""" + + def setup_method(self): + """Set up the unit test environment for each method.""" + self.names = ['roti15min_jpl'] + self.module = methods.gps + self.platform_str = 'GPS Total Electron Content' + return + + def teardown_method(self): + """Clean up the unit test environment after each method.""" + + del self.names, self.module, self.platform_str + return diff --git a/pysatNASA/version.txt b/pysatNASA/version.txt deleted file mode 100644 index 81340c7e..00000000 --- a/pysatNASA/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.0.4 diff --git a/requirements.txt b/requirements.txt index 5bcb0ece..3684998a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,10 @@ -netCDF4 -requests beautifulsoup4 -lxml +cdasws cdflib>=0.4.4 +lxml +netCDF4 numpy pandas -pysat>=3.0.4 -xarray<2022.11 +pysat>=3.1.0 +requests +xarray diff --git a/setup.cfg b/setup.cfg index 49912451..08661e10 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,55 +1,8 @@ +# name and version must be maintained here as well for python 3.6 compatibility + [metadata] name = pysatNASA -version = file: pysatNASA/version.txt -url = https://github.com/pysat/pysatNASA -author = Jeff Klenzing -author_email = jeffrey.klenzing@nasa.gov -description = 'pysat support for NASA Instruments' -keywords = - pysat - ionosphere -classifiers = - Development Status :: 3 - Alpha - Topic :: Scientific/Engineering :: Physics - Topic :: Scientific/Engineering :: Atmospheric Science - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Natural Language :: English - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Operating System :: MacOS :: MacOS X - Operating System :: POSIX :: Linux -license_file = LICENSE -long_description = file: README.md -long_description_content_type = text/markdown - -[options] -python_requires = >= 3.5 -setup_requires = - setuptools >= 38.6 - pip >= 10 -include_package_data = True -zip_safe = False -packages = find: -install_requires = - netCDF4 - requests - beautifulsoup4 - lxml - cdflib - numpy - pandas - xarray - pysat - -[options.extras_require] -all = - pysatCDF - -[coverage:report] -omit = - */instruments/templates/ +version = 0.0.5 [flake8] max-line-length = 80 @@ -57,12 +10,3 @@ ignore = D200 D202 W503 - -[tool:pytest] -markers = - all_inst: tests all instruments - download: tests for downloadable instruments - no_download: tests for instruments without download support - load_options: tests for instruments with additional options - first: first tests to run - second: second tests to run diff --git a/setup.py b/setup.py deleted file mode 100644 index 4c0bbd8e..00000000 --- a/setup.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2020, Authors -# Full license can be found in License.md and AUTHORS.md -# ----------------------------------------------------------------------------- -"""Setup routines for pysatNASA. - -Note ----- -Package metadata stored in setup.cfg - -""" - -from setuptools import setup - -# Run setup -setup() From 2c1e6aab1078518c5878b7aa55d948cd56e7096b Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 3 Aug 2023 14:29:13 -0400 Subject: [PATCH 03/33] BUG: combine single value list --- pysatNASA/instruments/methods/cdaweb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/cdaweb.py b/pysatNASA/instruments/methods/cdaweb.py index 235090eb..5a2154bc 100644 --- a/pysatNASA/instruments/methods/cdaweb.py +++ b/pysatNASA/instruments/methods/cdaweb.py @@ -386,9 +386,12 @@ def load_xarray(fnames, tag='', inst_id='', ldata.append(temp_data) # Combine individual files together, concat along epoch - if len(ldata) > 0: + if len(ldata) > 1: data = xr.combine_nested(ldata, epoch_name, combine_attrs='override') + else: + data = ldata[0] + all_vars = io.xarray_all_vars(data) From ffc4242d38bb50427c9915f1912e23bd4431c812 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 3 Aug 2023 14:38:21 -0400 Subject: [PATCH 04/33] ENH: use standard load --- pysatNASA/instruments/mvn_kp.py | 89 +++------------------------------ 1 file changed, 8 insertions(+), 81 deletions(-) diff --git a/pysatNASA/instruments/mvn_kp.py b/pysatNASA/instruments/mvn_kp.py index c8a63e9a..bd7bdc6e 100644 --- a/pysatNASA/instruments/mvn_kp.py +++ b/pysatNASA/instruments/mvn_kp.py @@ -2,12 +2,12 @@ """Module for the MAVEN kp instrument. Created by: Teresa Esman, NPP at GSFC Last editted: Jun 2, 2023 - May 12, 2023 + May 12, 2023 Supports the 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. +Downlaods from CDAWeb. Properties ---------- @@ -31,8 +31,8 @@ import pysat from pysat.utils import registry registry.register_by_module(pysatNASA.instruments) - - + + kp = pysat.Instrument(platform='MAVEN', name='kp') kp.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) kp.load(2020, 1, use_header = True) @@ -72,22 +72,6 @@ init = functools.partial(mm_nasa.init, module=mm_mvn, name=name) -def preprocess(self, keep_original_names=False): - """Adjust epoch timestamps to datetimes and remove variable preambles. - - Parameters - ---------- - keep_original_names : bool - if True then the names as given in the netCDF MAVEN file - will be used as is. If False, a preamble is removed. (default=False) - - """ - - if not keep_original_names: - mm_gen.remove_leading_text(self, target='MAVEN_') - return - - def clean(self): """Clean MAVEN kp data to the specified level. @@ -95,7 +79,7 @@ def clean(self): ---- Supports 'clean', 'dusty', 'dirty', 'none'. Method is not called by pysat if clean_level is None or 'none'. - + """ return @@ -340,63 +324,6 @@ def init(self): return -def load(fnames, tag='', inst_id='', keep_original_names=False): - """Load MAVEN kp data into `xarray.Dataset` object and `pysat.Meta` objects. - - This routine is called as needed by pysat. It is not intended - for direct user interaction. - - Parameters - ---------- - fnames : array-like - Iterable of filename strings, full path, to data files to be loaded. - This input is nominally provided by pysat itself. - tag : str - Tag name used to identify particular data set to be loaded. - This input is nominally provided by pysat itself. (default='') - inst_id : str - Instrument ID used to identify particular data set to be loaded. - This input is nominally provided by pysat itself. (default='') - keep_original_names : bool - If True then the names as given in the netCDF MAVEN file - will be used as is. If False, a preamble is removed. (default=False) - - Returns - ------- - data : xr.Dataset - An xarray Dataset with data prepared for the pysat.Instrument - meta : pysat.Meta - Metadata formatted for a pysat.Instrument object. - - Note - ---- - Any additional keyword arguments passed to pysat.Instrument - upon instantiation are passed along to this routine. - - The 'Altitude' dimension is renamed as 'Alt' to avoid confusion with the - 'Altitude' variable when performing xarray operations - - Examples - -------- - :: - - inst = pysat.Instrument('mvn', 'kp') - inst.load(2020, 1) - - """ - - - data = cdflib.cdf_to_xarray(fnames[0]) - - meta = [] - - xdata = mm_mvn.scrub_mvn_kp(data) - #this switches type to xarray - - # Add meta here - header_data = mm_mvn.generate_header_kp(data) - meta = mm_mvn.generate_metadata_kp(header_data,data) - - data = xdata - - return data,meta +# Set the load routine +load = functools.partial(cdw.load, epoch_name='epoch', + pandas_format=pandas_format, use_cdflib=True) From 0ef71dc67a4e5c0928009b2af8896f36febbf5dc Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:49:45 -0400 Subject: [PATCH 05/33] Update mvn_kp.py --- pysatNASA/instruments/mvn_kp.py | 217 +------------------------------- 1 file changed, 4 insertions(+), 213 deletions(-) diff --git a/pysatNASA/instruments/mvn_kp.py b/pysatNASA/instruments/mvn_kp.py index bd7bdc6e..d8e6d1a3 100644 --- a/pysatNASA/instruments/mvn_kp.py +++ b/pysatNASA/instruments/mvn_kp.py @@ -12,9 +12,9 @@ Properties ---------- platform - 'mvn' + 'maven' name - 'kp' + 'insitu' tag None supported @@ -27,7 +27,6 @@ Examples -------- :: - import pysat from pysat.utils import registry registry.register_by_module(pysatNASA.instruments) @@ -51,8 +50,8 @@ # ---------------------------------------------------------------------------- # Instrument attributes -platform = 'mvn' -name = 'kp' +platform = 'maven' +name = 'insitu' tags = {'': ''} inst_ids = {'': ['']} @@ -67,11 +66,9 @@ # ---------------------------------------------------------------------------- # Instrument methods - # Use standard init routine init = functools.partial(mm_nasa.init, module=mm_mvn, name=name) - def clean(self): """Clean MAVEN kp data to the specified level. @@ -79,8 +76,6 @@ def clean(self): ---- Supports 'clean', 'dusty', 'dirty', 'none'. Method is not called by pysat if clean_level is None or 'none'. - - """ return @@ -96,7 +91,6 @@ def clean(self): supported_tags = {'': {'': fname}} list_files = functools.partial(mm_gen.list_files, supported_tags=supported_tags) - # Set the download routine basic_tag = {'remote_dir': '/pub/data/maven/insitu/kp-4sec/cdfs/{year:04d}/{month:02d}', 'fname': fname} @@ -106,209 +100,6 @@ def clean(self): # Set the list_remote_files routine list_remote_files = functools.partial(cdw.list_remote_files, supported_tags=download_tags) - - -def filter_metadata(meta_dict): - """Filter kp metadata to remove warnings during loading. - - Parameters - ---------- - meta_dict : dict - Dictionary of metadata from file - - Returns - ------- - meta_dict : dict - Filtered kp metadata - - """ - vars = ['LPW_Electron_density', - 'LPW_Electron_density_min', - 'LPW_Electron_density_max', - 'LPW_Electron_temperature', - 'LPW_Electron_temperature_min', - 'LPW_Electron_temperature_max', - 'LPW_Spacecraft_potential', - 'LPW_Spacecraft_potential_min', - 'LPW_Spacecraft_potential_max', - 'LPW_E_field_wave_power_2_100', - 'LPW_E_field_wave_power_2_100_data_quality', - 'LPW_E_field_wave_power_100_800', - 'LPW_E_field_wave_power_100_800_data_quality', - 'LPW_E_field_wave_power_800_1000', - 'LPW_E_field_wave_power_800_1000_data_quality', - 'LPW_EUV_irradiance_pt1_7', - 'LPW_EUV_irradiance_pt1_7_data_quality', - 'LPW_EUV_irradiance_17_22', - 'LPW_EUV_irradiance_17_22_data_quality', - 'LPW_EUV_irradiance_lyman_alpha', - 'LPW_EUV_irradiance_lyman_alpha_data_quality', - 'SWEA_Electron_density', - 'SWEA_Electron_density_quality', - 'SWEA_Electron_temperature', - 'SWEA_Electron_temperature_quality', - 'SWEA_Electron_parallel_flux_5_100', - 'SWEA_Electron_parallel_flux_5_100_data_quality', - 'SWEA_Electron_parallel_flux_100_500', - 'SWEA_Electron_parallel_flux_100_500_data_quality', - 'SWEA_Electron_parallel_flux_500_1000', - 'SWEA_Electron_parallel_flux_500_1000_data_quality', - 'SWEA_Electron_anti_parallel_flux_5_100', - 'SWEA_Electron_anti_parallel_flux_5_100_data_quality', - 'SWEA_Electron_anti_parallel_flux_100_500', - 'SWEA_Electron_anti_parallel_flux_100_500_data_quality', - 'SWEA_Electron_anti_parallel_flux_500_1000', - 'SWEA_Electron_anti_parallel_flux_500_1000_data_quality', - 'SWEA_Electron_spectrum_shape', - 'SWEA_Electron_spectrum_shape_data_quality', - 'SWIA_Hplus_density', - 'SWIA_Hplus_density_data_quality', - 'SWIA_Hplus_flow_velocity_MSO', - 'SWIA_Hplus_flow_velocity_MSO_data_quality', - 'SWIA_Hplus_temperature', - 'SWIA_Hplus_temperature_data_quality', - 'SWIA_dynamic_pressure', - 'SWIA_dynamic_pressure_data_quality', - 'STATIC_Quality', - 'STATIC_Hplus_density', - 'STATIC_Hplus_density_data_quality', - 'STATIC_Oplus_density', - 'STATIC_Oplus_density_data_quality', - 'STATIC_O2plus_density', - 'STATIC_O2plus_density_data_quality', - 'STATIC_Hplus_temperature', - 'STATIC_Hplus_temperature_data_quality', - 'STATIC_Oplus_temperature', - 'STATIC_Oplus_temperature_data_quality', - 'STATIC_O2plus_temperature', - 'STATIC_O2plus_temperature_data_quality', - 'STATIC_O2plus_flow_velocity_MAVEN_APP', - 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality', - 'STATIC_O2plus_flow_velocity_MSO', - 'STATIC_O2plus_flow_velocity_MSO_data_quality', - 'STATIC_Hplus_omni_directional_flux', - 'STATIC_Hplus_characteristic_energy', - 'STATIC_Hplus_characteristic_energy_DQ', - 'STATIC_HEplus_omni_directional_flux', - 'STATIC_HEplus_characteristic_energy', - 'STATIC_HEplus_characteristic_energy_DQ', - 'STATIC_Oplus_omni_directional_flux', - 'STATIC_Oplus_characteristic_energy', - 'STATIC_Oplus_characteristic_energy_DQ', - 'STATIC_O2plus_omni_directional_flux', - 'STATIC_O2plus_characteristic_energy', - 'STATIC_O2plus_characteristic_energy_DQ', - 'STATIC_Hplus_characteristic_direction_MSO', - 'STATIC_Hplus_characteristic_angular_width', - 'STATIC_Hplus_characteristic_angular_width_DQ', - 'STATIC_dominant_pickup_ion_characteristic_direction_MSO', - 'STATIC_dominant_pickup_ion_characteristic_angular_width', - 'STATIC_dominant_pickup_ion_characteristic_angular_width_DQ', - 'SEP_Ion_Energy_Flux_30_1000_FOV_1F', - 'SEP_Ion_Energy_Flux_30_1000_FOV_1F_data_quality', - 'SEP_Ion_Energy_Flux_30_1000_FOV_1R', - 'SEP_Ion_Energy_Flux_30_1000_FOV_1R_data_quality', - 'SEP_Ion_Energy_Flux_30_1000_FOV_2F', - 'SEP_Ion_Energy_Flux_30_1000_FOV_2F_data_quality', - 'SEP_Ion_Energy_Flux_30_1000_FOV_2R', - 'SEP_Ion_Energy_Flux_30_1000_FOV_2R_data_quality', - 'SEP_Electron_Energy_Flux_30_300_FOV_1F', - 'SEP_Electron_Energy_Flux_30_300_FOV_1F_data_quality', - 'SEP_Electron_Energy_Flux_30_300_FOV_1R', - 'SEP_Electron_Energy_Flux_30_300_FOV_1R_data_quality', - 'SEP_Electron_Energy_Flux_30_300_FOV_2F', - 'SEP_Electron_Energy_Flux_30_300_FOV_2F_data_quality', - 'SEP_Electron_Energy_Flux_30_300_FOV_2R', - 'SEP_Electron_Energy_Flux_30_300_FOV_2R_data_quality', - 'SEP_Look_direction_1F_MSO', - 'SEP_Look_direction_1R_MSO', - 'SEP_Look_direction_2F_MSO', - 'SEP_Look_direction_2R_MSO', - 'MAG_field_MSO', - 'MAG_field_MSO_data_quality', - 'MAG_field_GEO', - 'MAG_field_GEO_data_quality', - 'MAG_field_RMS_deviation', - 'MAG_field_RMS_deviation_data_quality', - 'NGIMS_He_density', - 'NGIMS_He_density_precision', - 'NGIMS_He_density_data_quality', - 'NGIMS_O_density', - 'NGIMS_O_density_precision', - 'NGIMS_O_density_data_quality', - 'NGIMS_CO_density', - 'NGIMS_CO_density_precision', - 'NGIMS_CO_density_data_quality', - 'NGIMS_N2_density', - 'NGIMS_N2_density_precision', - 'NGIMS_N2_density_data_quality', - 'NGIMS_NO_density', - 'NGIMS_NO_density_precision', - 'NGIMS_NO_density_data_quality', - 'NGIMS_Ar_density', - 'NGIMS_Ar_density_precision', - 'NGIMS_Ar_density_data_quality', - 'NGIMS_CO2_density', - 'NGIMS_CO2_density_precision', - 'NGIMS_CO2_density_data_quality', - 'NGIMS_Ion_density_32plus', - 'NGIMS_Ion_density_precision_32plus', - 'NGIMS_Ion_density_data_quality_32plus', - 'NGIMS_Ion_density_44plus', - 'NGIMS_Ion_density_precision_44plus', - 'NGIMS_Ion_density_data_quality_44plus', - 'NGIMS_Ion_density_30plus', - 'NGIMS_Ion_density_precision_30plus', - 'NGIMS_Ion_density_data_quality_30plus', - 'NGIMS_Ion_density_16plus', - 'NGIMS_Ion_density_precision_16plus', - 'NGIMS_Ion_density_data_quality_16plus', - 'NGIMS_Ion_density_28plus', - 'NGIMS_Ion_density_precision_28plus', - 'NGIMS_Ion_density_data_quality_28plus', - 'NGIMS_Ion_density_12plus', - 'NGIMS_Ion_density_precision_12plus', - 'NGIMS_Ion_density_data_quality_12plus', - 'NGIMS_Ion_density_17plus', - 'NGIMS_Ion_density_precision_17plus', - 'NGIMS_Ion_density_data_quality_17plus', - 'NGIMS_Ion_density_14plus', - 'NGIMS_Ion_density_precision_14plus', - 'NGIMS_Ion_density_data_quality_14plus', - 'SPICE_spacecraft_GEO', - 'SPICE_spacecraft_MSO', - 'SPICE_spacecraft_longitude_GEO', - 'SPICE_spacecraft_latitude_GEO', - 'SPICE_spacecraft_sza', - 'SPICE_spacecraft_local_time', - 'SPICE_spacecraft_altitude', - 'SPICE_spacecraft_attitude_GEO', - 'SPICE_spacecraft_attitude_MSO', - 'SPICE_app_attitude_GEO', - 'SPICE_app_attitude_MSO', - 'SPICE_Orbit_Number', - 'Inbound_Outbound_Flag', - 'SPICE_Mars_season', - 'SPICE_Mars_Sun_distance', - 'SPICE_Subsolar_Point_longitude_GEO', - 'SPICE_Subsolar_Point_latitude_GEO', - 'SPICE_Sub_Mars_Point_longitude', - 'SPICE_Sub_Mars_Point_latitude', - 'Rotation_matrix_IAU_MARS_MAVEN_MSO', - 'Rotation_matrix_SPACECRAFT_MAVEN_MSO'] - - for var in vars: - if var in meta_dict: - meta_dict[var]['FillVal'] = np.nan - - # Deal with string arrays - for var in meta_dict.keys(): - if 'Var_Notes' in meta_dict[var]: - meta_dict[var]['Var_Notes'] = ' '.join(pysat.utils.listify( - meta_dict[var]['Var_Notes'])) - - return meta_dict - def init(self): """Initialize the Instrument object with instrument specific values. Runs once upon instantiation. From df71e6715a8b87880e173f12ed60fa0c74f2371c Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:58:24 -0400 Subject: [PATCH 06/33] TME: Formatting, file rename switching kp to insitu --- pysatNASA/instruments/{mvn_kp.py => mvn_insitu.py} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename pysatNASA/instruments/{mvn_kp.py => mvn_insitu.py} (91%) diff --git a/pysatNASA/instruments/mvn_kp.py b/pysatNASA/instruments/mvn_insitu.py similarity index 91% rename from pysatNASA/instruments/mvn_kp.py rename to pysatNASA/instruments/mvn_insitu.py index d8e6d1a3..02e4ccd8 100644 --- a/pysatNASA/instruments/mvn_kp.py +++ b/pysatNASA/instruments/mvn_insitu.py @@ -1,10 +1,12 @@ # -*- coding: utf-8 -*- """Module for the MAVEN kp instrument. + Created by: Teresa Esman, NPP at GSFC Last editted: Jun 2, 2023 May 12, 2023 -Supports the Key parameter (kp) data from multiple instruments onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. +Supports the 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. @@ -39,8 +41,6 @@ import datetime as dt import functools -import numpy as np -import cdflib import pysat from pysat.instruments.methods import general as mm_gen from pysatNASA.instruments.methods import cdaweb as cdw @@ -69,6 +69,7 @@ # Use standard init routine init = functools.partial(mm_nasa.init, module=mm_mvn, name=name) + def clean(self): """Clean MAVEN kp data to the specified level. @@ -92,7 +93,8 @@ def clean(self): list_files = functools.partial(mm_gen.list_files, supported_tags=supported_tags) # Set the download routine -basic_tag = {'remote_dir': '/pub/data/maven/insitu/kp-4sec/cdfs/{year:04d}/{month:02d}', +basic_tag = {'remote_dir': ''.join(('/pub/data/maven/insitu/kp-4sec/', + 'cdfs/{year:04d}/{month:02d}')), 'fname': fname} download_tags = {'': {'': basic_tag}} download = functools.partial(cdw.download, supported_tags=download_tags) From cbf0479da88882238afdc16e14f0cc46b37c36f7 Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:35:26 -0400 Subject: [PATCH 07/33] TME: Additional formatting --- pysatNASA/instruments/__init__.py | 2 +- pysatNASA/instruments/methods/__init__.py | 1 + pysatNASA/instruments/methods/mvn.py | 2120 +-------------------- pysatNASA/instruments/mvn_insitu.py | 19 +- pysatNASA/instruments/mvn_mag.py | 138 +- test_requirements.txt | 2 +- 6 files changed, 57 insertions(+), 2225 deletions(-) diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index 60967d8a..7729829c 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', 'mvn_kp', 'mvn_mag', 'omni_hro', + 'igs_gps', 'iss_fpmu', 'jpl_gps', 'mvn_mag', 'mvn_insitu', 'omni_hro', 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] for inst in __all__: diff --git a/pysatNASA/instruments/methods/__init__.py b/pysatNASA/instruments/methods/__init__.py index 8542fcbc..da8f7d9a 100644 --- a/pysatNASA/instruments/methods/__init__.py +++ b/pysatNASA/instruments/methods/__init__.py @@ -12,3 +12,4 @@ from pysatNASA.instruments.methods import omni # noqa F401 from pysatNASA.instruments.methods import ses14 # noqa F401 from pysatNASA.instruments.methods import timed # noqa F401 +from pysatNASA.instruments.methods import mvn # noga F401 diff --git a/pysatNASA/instruments/methods/mvn.py b/pysatNASA/instruments/methods/mvn.py index 02d28213..3d27d489 100644 --- a/pysatNASA/instruments/methods/mvn.py +++ b/pysatNASA/instruments/methods/mvn.py @@ -1,2101 +1,31 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- -""" +"""Provides non-instrument specific routines for MAVEN data. + Created on Thu Jul 13 11:21:01 2023 @author: tesman """ -import datetime as dt -import pysat -import xarray as xr -import pandas as pd - -ackn_str = ' '.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')) -references = ' '.join(('Connerney, J., and P. Lawton, MAVEN MAG PDS Archive SIS - This document ', - 'describes the format and content of the MAVEN Magnetometer (MAG) Planetary', - 'Data System (PDS) data archive. It includes descriptions of the Standard', - 'Data Products and associated metadata, and the volume archive format,', - 'content, and generation pipeline.',' ', - 'Connerney, J.E.P.; Espley, J.; Lawton, P.; Murphy, S.; Odom, J.; Oliversen, R.;', - 'and Sheppard, D., The MAVEN Magnetic Field Investigation, Space Sci Rev,', - 'Vol 195, Iss 1-4, pp.257-291, 2015. doi:10.1007/s11214-015-0169-4', - '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')) - -def scrub_mvn_mag(data): - """Make data labels and epoch compatible with SPASE and pysat. - Parameters - ---------- - data : pandas.Dataframe() - Metadata object containing the default metadata loaded from the sav files. - Returns - ------- - data : pandas.Dataframe() - Replacement data object with compatible variable names and epoch. - """ - - UTC = data['epoch'].values / 1e9 #UTC time from 01-Jan-2000 12:00:00.000, nanoseconds - unix_time = UTC + 946728000 - array_size = len(unix_time) - pdata = pd.DataFrame(index = unix_time) - for key in data.keys(): #For one dimensional arrays - try: - if len(data[key]) == array_size and key not in {'OB_B','POSN','OB_BDPL'}: - pdata[key] = data[key] - except TypeError: - pass - - for key in data.keys(): #For three-dimensional arrays - for coord in {'x','y','z'}: - try: - if len(data[key]) == array_size and key in {'OB_B','POSN','OB_BDPL'}: - if coord == 'x': ind = 0 - if coord == 'y': ind = 1 - if coord == 'z': ind = 2 - pdata[key+'_'+coord] = data[key].values[:,ind] - except TypeError: - pass - - xdata = xr.Dataset(pdata) #Switch to xarray type - data = xdata.rename(dim_0 = 'time') - return data - - -def generate_header(data): - """Generate the meta header info for mvn mag. - - Parameters - ---------- - inst_id : str - The VID of the associated dataset. - epoch : dt.datetime - The epoch of the datafile. Corresponds to the first data point. - Returns - ------- - header : dict - A dictionary compatible with the pysat.meta_header format. Top-level - metadata for the file. - - - Global attributes are used to provide information about the data set as an entity. Together with variables and variable attributes, the global attributes make the data correctly and independently usable by someone not connected with the instrument team, and hence, a good archive product. The global attributes are also used by the CDAWeb Display and Retrieval system. - -The required Global Attributes are listed here with example values. Note that CDF attributes are case-sensitive and must exactly follow what is shown here. Additional Global attributes can be defined but they must start with a letter and can otherwise contain letters, numbers and the unscore character (no other special characters allowed). See Global Attribute Definitions for the full set of defined Global Attributes. - - ATTRIBUTE EXAMPLE VALUE --------------------------------------------------------------------- - - "Project" { "ISTP>International " - - "Solar-Terrestrial Physics" }. - - This attribute identifies the name of the project and indicates ownership. - For ISTP missions and investigations, the value used is "ISTP>International - Solar-Terrestrial Physics". For the Cluster mission, the value is "STSP Cluster>Solar - Terrestrial Science Programmes, Cluster". - - - - "Source_name" { "GEOTAIL>Geomagnetic Tail" }. - - This attribute identifies the mission or investigation that contains the sensors. - For ISTP, this is the mission name for spacecraft missions or the investigation name for - ground-based or theory investigations. Both a long name and a short name are provided. - This attribute should be single valued. - - - "Discipline" { "Space Physics>Magnetospheric Science" }. - "Data_type" { "K0>Key Parameter" }. - "Descriptor" { "EPI>Energetic Particles" - - " and Ion Composition" }. - This attribute identifies the name of the instrument or sensor - that collected the data - - "Data_version" { "1" }. - "Logical_file_id" { "GE_K0_EPI_19920908_V01" }. - "PI_name" { "D. Williams" }. - "PI_affiliation" { "JHU/APL" }. - "TEXT" { "reference to journal article, URL address" }. - - This attribute is an NSSDC standard global attribute which is a - text description of the experiment whose data is included in the CDF. - A reference to a journal article(s) or to a World Wide Web page describing - the experiment is essential, and constitutes the minimum requirement. - A written description of the data set is also desirable. This attribute - can have as many entries as necessary to contain the desired information. - - "Instrument_type" { "Magnetic Fields (space)" }. - "Mission_group" { "Geotail" }. - "Logical_source" { "GE_K0_EPI" }. - "Logical_source_description" { "Geotail Magnetic Field Key Parameters" }. - --------------------------------------------------------------------- - - Medium Energy Proton and Electron Detector (MEPED) - """ - header = {'Project': data.Project, - 'Source_name': data.Source_name, - 'Discipline':data.Discipline, - 'Data_type': data.Data_type, - 'Descriptor': data.Descriptor, - 'Data_version': '', - 'Logical_file_id': data.Logical_file_id, - 'PI_name': data.PI_name, - 'PI_affiliation': data.PI_affiliation, - 'TEXT': data.TEXT, - 'Rules_of_use': data.Rules_of_use, - 'Instrument_type': data.Instrument_type, - 'Mission_group': data.Mission_group, - 'Logical_source': data.Logical_source, - 'Logical_source_description': data.Logical_source_description, - 'DOI':'10.17189/1414178', - 'File_naming_convention': data.File_naming_convention, - 'Time_resolution': data.Time_resolution, - 'Generated_by': data.Generated_by, - 'Generation_date': '', - 'Generation_datetime': dt.datetime.today().isoformat(), - 'Acknowledgement': ackn_str, - 'TITLE': data.TITLE, - 'spase_DatasetResourceID': {'spase://NASA/NumericalData', - '/MAVEN/MAG/SunState/Level2', - '/PT1S' }, - 'LINK_TEXT': data.LINK_TEXT, - 'LINK_TITLE': data.LINK_TITLE, - 'HTTP_LINK': data.HTTP_LINK} - - return header - - -def generate_metadata(header_data,data): - """Generate metadata object for mvn mag data compatible with SPASE and pysat. - Parameters - ---------- - header_data : dict - A dictionary compatible with the pysat.meta_header format. Required to - properly initialize metadata. - Returns - ------- - metadata : pandas.Dataframe() - Contains data compatible with SPASE standards to initialize pysat.Meta. - - Variables: - epoch, DDAY, OB_B, OB_B_range, POSN, OB_BDPL, OB_BDPL_range,compno_3, OB_B_labl, POSN_labl, OB_BDPL_labl - """ - meta = pysat.Meta(header_data=header_data) - - meta['time'] = {meta.labels.name: 'Unix time', - meta.labels.units: 'seconds', - meta.labels.min_val: float(data.epoch.VALIDMIN)/1e9 +946728000, - meta.labels.max_val: float(data.epoch.VALIDMAX)/1e9 +946728000, - meta.labels.desc: data.epoch.CATDESC, - meta.labels.fill_val: float(data.epoch.FILLVAL)} - - meta['DDAY'] ={meta.labels.name: data.DDAY.FIELDNAM, - meta.labels.units: data.DDAY.UNITS, - meta.labels.min_val: float(data.DDAY.VALIDMIN), - meta.labels.max_val: float(data.DDAY.VALIDMAX), - meta.labels.desc: data.DDAY.CATDESC, - meta.labels.fill_val: float(data.DDAY.FILLVAL)} - - meta['OB_B_x']={meta.labels.name: 'Outboard Magnetic Field x', - meta.labels.units: data.OB_B.UNITS, - meta.labels.desc: data.OB_B.CATDESC, - meta.labels.min_val: float(data.OB_B.VALIDMIN), - meta.labels.max_val: float(data.OB_B.VALIDMAX), - meta.labels.fill_val: float(data.OB_B.FILLVAL)} - meta['OB_B_y']={meta.labels.name: 'Outboard Magnetic Field y', - meta.labels.units: data.OB_B.UNITS, - meta.labels.desc: data.OB_B.CATDESC, - meta.labels.min_val: float(data.OB_B.VALIDMIN), - meta.labels.max_val: float(data.OB_B.VALIDMAX), - meta.labels.fill_val: float(data.OB_B.FILLVAL)} - meta['OB_B_z']={meta.labels.name: 'Outboard Magnetic Field z', - meta.labels.units: data.OB_B.UNITS, - meta.labels.desc: data.OB_B.CATDESC, - meta.labels.min_val: float(data.OB_B.VALIDMIN), - meta.labels.max_val: float(data.OB_B.VALIDMAX), - meta.labels.fill_val: float(data.OB_B.FILLVAL)} - - meta['OB_B_range']={meta.labels.name: data.OB_B_range.long_name, - meta.labels.units: data.OB_B_range.UNITS, - meta.labels.desc: data.OB_B_range.CATDESC, - meta.labels.min_val: float(data.OB_B_range.VALIDMIN), - meta.labels.max_val: float(data.OB_B_range.VALIDMAX), - meta.labels.fill_val: float(data.OB_B_range.FILLVAL)} - - meta['POSN_x']={meta.labels.name: 'Spacecraft Position x', - meta.labels.units: data.POSN.UNITS, - meta.labels.desc: 'Spacecraft position x', - meta.labels.min_val: float(data.POSN.VALIDMIN), - meta.labels.max_val: float(data.POSN.VALIDMAX), - meta.labels.fill_val:float(data.POSN.FILLVAL)} - meta['POSN_y']={meta.labels.name: 'Spacecraft Position y', - meta.labels.units: data.POSN.UNITS, - meta.labels.desc: 'Spacecraft position y', - meta.labels.min_val: float(data.POSN.VALIDMIN), - meta.labels.max_val: float(data.POSN.VALIDMAX), - meta.labels.fill_val:float(data.POSN.FILLVAL)} - meta['POSN_z']={meta.labels.name: 'Spacecraft Position z', - meta.labels.units: data.POSN.UNITS, - meta.labels.desc: 'Spacecraft position z', - meta.labels.min_val: float(data.POSN.VALIDMIN), - meta.labels.max_val: float(data.POSN.VALIDMAX), - meta.labels.fill_val:float(data.POSN.FILLVAL)} - - meta['OB_BDPL_x']={meta.labels.name: data.OB_BDPL_labl.values[0], - meta.labels.units: data.OB_BDPL.UNITS, - meta.labels.desc: data.OB_BDPL.CATDESC + ' x', - meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), - meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), - meta.labels.fill_val: float(data.OB_BDPL.FILLVAL)} - meta['OB_BDPL_y']={meta.labels.name: data.OB_BDPL_labl.values[1], - meta.labels.units: data.OB_BDPL.UNITS, - meta.labels.desc: data.OB_BDPL.CATDESC + ' y', - meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), - meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), - meta.labels.fill_val: float(data.OB_BDPL.FILLVAL)} - meta['OB_BDPL_z']={meta.labels.name: data.OB_BDPL_labl.values[2], - meta.labels.units: data.OB_BDPL.UNITS, - meta.labels.desc: data.OB_BDPL.CATDESC + ' z', - meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), - meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), - meta.labels.fill_val: float(data.OB_BDPL.FILLVAL)} - - meta['OB_BDPL_range']={meta.labels.name: data.OB_BDPL_range.FIELDNAM, - meta.labels.desc: data.OB_BDPL_range.CATDESC, - meta.labels.min_val: float(data.OB_BDPL.VALIDMIN), - meta.labels.max_val: float(data.OB_BDPL.VALIDMAX), - meta.labels.fill_val: float(data.OB_BDPL.FILLVAL), - meta.labels.units: data.OB_BDPL.UNITS} - - return meta - -"""Provides metadata specific routines for MGS KP data.""" -def scrub_mvn_kp(data): - """Make data labels and epoch compatible with SPASE and pysat. - Parameters - ---------- - data : pandas.Dataframe() - Metadata object containing the default metadata loaded from the sav files. - Returns - ------- - data : pandas.Datafram() - Replacement data object with compatible variable names and epoch. - """ - - # Now we make our Epoch variable - unix_time = data['epoch'].values/1e3 - 62167204800 #originally time from 0-0-0 0:00:00.000 ms - - #KP data from the MAVEN SDC is in the format yyyy-mm-ddThh:mm:ss - array_size = len(unix_time) - pdata = pd.DataFrame(index = unix_time) - p2data = pd.DataFrame(index = unix_time) - p3data = pd.DataFrame(index = unix_time) - for key in data.keys(): - try: - if len(data[key]) == array_size and key not in {'SWIA_Hplus_flow_velocity_MSO','SWIA_Hplus_flow_velocity_MSO_data_quality', - 'SWIA_Hplus_flow_velocity_MSO_dq_labl', 'STATIC_O2plus_flow_velocity_MAVEN_APP', - 'STATIC_O2plus_flow_velocity_MAVEN_APP_labl', 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality', - 'SPICE_spacecraft_GEO', - 'STATIC_O2plus_flow_velocity_MSO','MAG_field_GEO','MAG_field_MSO_data_quality', - 'STATIC_O2plus_flow_velocity_MSO_data_quality', - 'SPICE_app_attitude_MSO','SEP_Look_direction_1R_MSO', - 'STATIC_Hplus_characteristic_direction_MSO', - 'STATIC_dominant_pickup_ion_characteristic_direction_MSO', - 'MAG_field_MSO_dq_labl','MAG_field_MSO','MAG_field_GEO_labl', 'SEP_Look_direction_1F_MSO', - 'MAG_field_GEO_dq_labl','SEP_Look_direction_2F_MSO','MAG_field_GEO_data_quality', - 'SPICE_spacecraft_GEO_labl','SEP_Look_direction_2R_MSO', - 'SPICE_spacecraft_MSO_labl','SPICE_spacecraft_MSO','SPICE_spacecraft_attitude_MSO', - 'SPICE_spacecraft_attitude_GEO_labl','SPICE_spacecraft_attitude_GEO', - 'SPICE_spacecraft_attitude_MSO_labl','SPICE_app_attitude_GEO', - 'Rotation_matrix_SPACECRAFT_MAVEN_MSO','Rotation_matrix_IAU_MARS_MAVEN_MSO'}: - if pdata.shape[1] < 100: - pdata[key] = data[key] - else: - p2data[key] = data[key] - except TypeError: - pass - - for key in data.keys(): - for coord in {'x','y','z'}: - try: - if len(data[key]) == array_size and key in {'SWIA_Hplus_flow_velocity_MSO','SWIA_Hplus_flow_velocity_MSO_data_quality', - 'STATIC_O2plus_flow_velocity_MAVEN_APP','STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality', - 'SPICE_spacecraft_GEO','STATIC_O2plus_flow_velocity_MSO', - 'STATIC_O2plus_flow_velocity_MSO_dq_labl','MAG_field_GEO', - 'STATIC_Hplus_MSO_characteristic_direction_labl','MAG_field_GEO_data_quality', - 'MAG_field_MSO_data_quality','MAG_field_MSO', - 'STATIC_O2plus_flow_velocity_MSO_data_quality','SPICE_app_attitude_MSO', - 'SEP_Look_direction_1R_MSO', - 'STATIC_Hplus_characteristic_direction_MSO', - 'STATIC_dominant_pickup_ion_characteristic_direction_MSO', - 'SEP_Look_direction_1F_MSO','SEP_Look_direction_2F_MSO','SEP_Look_direction_2R_MSO', - 'SPICE_spacecraft_MSO','SPICE_spacecraft_attitude_MSO', - 'SPICE_spacecraft_attitude_GEO_labl','SPICE_spacecraft_attitude_GEO', - 'SPICE_spacecraft_attitude_MSO_labl','SPICE_app_attitude_GEO'}: - if coord == 'x': ind = 0 - if coord == 'y': ind = 1 - if coord == 'z': ind = 2 - p3data[key+'_'+coord] = data[key].values[:,ind] - except TypeError: - pass - xdata = xr.Dataset(pdata) - p2data = xr.Dataset(p2data) - p3data = xr.Dataset(p3data) - xdata = xdata.merge(p2data) - xdata = xdata.merge(p3data) - data = xdata.rename(dim_0 = 'time') - return data - -def generate_header_kp(data): - """Generate the meta header info for mvn kp data. - Parameters - ---------- - inst_id : str - The VID of the associated dataset. - epoch : dt.datetime - The epoch of the datafile. Corresponds to the first data point. - Returns - ------- - header : dict - A dictionary compatible with the pysat.meta_header format. Top-level - metadata for the file. - - Global attributes are used to provide information about the data set as an entity. - Together with variables and variable attributes, the global attributes make the data correctly and - independently usable by someone not connected with the instrument team, and hence, a good archive product. - The global attributes are also used by the CDAWeb Display and Retrieval system. - """ - header = {'Project': data.Project, - 'Source_name': data.Source_name, - 'Discipline':data.Discipline, - 'Data_type': data.Data_type, - 'Descriptor': data.Descriptor, - 'Data_version': '', - 'Logical_file_id': data.Logical_file_id, - 'PI_name': data.PI_name, - 'PI_affiliation': data.PI_affiliation, - 'TEXT': data.TEXT, - 'Rules_of_use': data.Rules_of_use, - 'Instrument_type': data.Instrument_type, - 'Mission_group': data.Mission_group, - 'Logical_source': data.Logical_source, - 'Logical_source_description': data.Logical_source_description, - 'DOI':'10.17189/1414178', - 'File_naming_convention': data.File_naming_convention, - 'Time_resolution': data.Time_resolution, - 'Generated_by': data.Generated_by, - 'Generation_date': '', - 'Generation_datetime': dt.datetime.today().isoformat(), - 'Acknowledgement': ackn_str, - 'TITLE': data.TITLE, - 'spase_DatasetResourceID': {'spase://NASA/NumericalData', - '/MAVEN/InSitu/KeyParameter/PT4S'}, - 'LINK_TEXT': data.LINK_TEXT, - 'LINK_TITLE': data.LINK_TITLE, - 'HTTP_LINK': data.HTTP_LINK} - - return header - - -def generate_metadata_kp(header_data,data): - """Generate metadata object for mvn kp data compatible with SPASE and pysat. - Parameters - ---------- - header_data : dict - A dictionary compatible with the pysat.meta_header format. Required to - properly initialize metadata. - Returns - ------- - metadata : pandas.Dataframe() - Contains data compatible with SPASE standards to initialize pysat.Meta. - - Variables: - - """ - meta = pysat.Meta(header_data=header_data) - meta['LPW_Electron_density'] = {meta.labels.name: 'LPW_Electron_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Derived from the LP sweep and when available from the plasma line', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron density (LPW) '} - - meta['LPW_Electron_density_min'] = {meta.labels.name: 'LPW_Electron_density_min', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron density min (LPW)'} - - meta['LPW_Electron_density_max'] = {meta.labels.name: 'LPW_Electron_density_max', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron density max (LPW)'} - - meta['LPW_Electron_temperature'] = {meta.labels.name: 'LPW_Electron_temperature', - meta.labels.units: 'K', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Derived from the LP sweep', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron temperature (LPW)'} - - meta['LPW_Electron_temperature_min'] = {meta.labels.name: 'LPW_Electron_temperature_min', - meta.labels.units: 'K', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron temperature min (LPW)'} - - meta['LPW_Electron_temperature_max'] = {meta.labels.name: 'LPW_Electron_temperature_max', - meta.labels.units: 'K', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron temperature max (LPW)'} - - meta['LPW_Spacecraft_potential'] = {meta.labels.name: 'LPW_Spacecraft_potential', - meta.labels.units: 'V', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Measured from the probe potentials', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Spacecraft potential (LPW)'} - - meta['LPW_Spacecraft_potential_min'] = {meta.labels.name: 'LPW_Spacecraft_potential_min', - meta.labels.units: 'V', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Spacecraft potential min (LPW)'} - - meta['LPW_Spacecraft_potential_max'] = {meta.labels.name: 'LPW_Spacecraft_potential_max', - meta.labels.units: 'V', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Spacecraft potential max (LPW)'} - - meta['LPW_E_field_wave_power_2_100'] = {meta.labels.name: 'LPW_E_field_wave_power_2_100', - meta.labels.units: '(V/m)^2/Hz', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Integrated wave power from the onboard calculated FFT, frequencies important for wave heating', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'E-field wave power 2-100 Hz (LPW)'} - - meta['LPW_E_field_wave_power_2_100_data_quality'] = {meta.labels.name: 'LPW_E_field_wave_power_2_100_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Range: 0-100, where 100 is the highest confidence level, use data with quality flag of 50 or above', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> E-field wave power 2-100 Hz data quality (LPW)'} - - meta['LPW_E_field_wave_power_100_800'] = {meta.labels.name: 'LPW_E_field_wave_power_100_800', - meta.labels.units: '(V/m)^2/Hz', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Integrated wave power from the onboard calculated FFT', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'E-field wave power 100-800 Hz (LPW)'} - - meta['LPW_E_field_wave_power_100_800_data_quality'] = {meta.labels.name: 'LPW_E_field_wave_power_100_800_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Range: 0-100, where 100 is the highest confidence level, use data with quality flag of 50 or above', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> E-field wave power 100-800 Hz data quality (LPW)'} - - meta['LPW_E_field_wave_power_800_1000'] = {meta.labels.name: 'LPW_E_field_wave_power_800_1000', - meta.labels.units: '(V/m)^2/Hz', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Integrated wave power from the onboard calculated FFT', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'E-field wave power 800-1000 Hz (LPW)'} - - meta['LPW_E_field_wave_power_800_1000_data_quality'] = {meta.labels.name: 'LPW_E_field_wave_power_800_1000_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Range: 0-100, where 100 is the highest confidence level, use data with quality flag of 50 or above', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> E-field wave power 800-1000 Hz data quality (LPW)'} - - meta['LPW_EUV_irradiance_pt1_7'] = {meta.labels.name: 'LPW_EUV_irradiance_pt1_7', - meta.labels.units: 'W/m^2', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'EUV irradiance wave power 0.1-7.0 nm bandpass (LPW-EUV)'} - - meta['LPW_EUV_irradiance_pt1_7_data_quality'] = {meta.labels.name: 'LPW_EUV_irradiance_pt1_7_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '0 = good solar, 1 = occultation, 2 = no pointing info, 3 = Sun NOT fully in FOV, 4 = Sun NOT in FOV, 5 = windowed, 6 = eclipse, 7 = spare', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> EUV irradiance wave power 0.1-7.0 nm data quality (LPW-EUV)'} - - meta['LPW_EUV_irradiance_17_22'] = {meta.labels.name: 'LPW_EUV_irradiance_17_22', - meta.labels.units: 'W/m^2', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'EUV irradiance wave power 17-22 nm bandpass (LPW-EUV)'} - - meta['LPW_EUV_irradiance_17_22_data_quality'] = {meta.labels.name: 'LPW_EUV_irradiance_17_22_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '0 = good solar, 1 = occultation, 2 = no pointing info, 3 = Sun NOT fully in FOV, 4 = Sun NOT in FOV, 5 = windowed, 6 = eclipse, 7 = spare', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> EUV irradiance wave power 17-22 nm data quality (LPW-EUV)'} - - meta['LPW_EUV_irradiance_lyman_alpha'] = {meta.labels.name: 'LPW_EUV_irradiance_lyman_alpha', - meta.labels.units: 'W/m^2', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'EUV irradiance wave power Lyman-alpha bandpass (LPW-EUV)'} - - meta['LPW_EUV_irradiance_lyman_alpha_data_quality'] = {meta.labels.name: 'LPW_EUV_irradiance_lyman_alpha_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '0 = good solar, 1 = occultation, 2 = no pointing info, 3 = Sun NOT fully in FOV, 4 = Sun NOT in FOV, 5 = windowed, 6 = eclipse, 7 = spare', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> EUV irradiance wave power Lyman-alpha data quality (LPW-EUV)'} - - meta['SWEA_Electron_density'] = {meta.labels.name: 'SWEA_Electron_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Density of solar wind or magnetosheath electrons based on moments of the electron distribution after correcting for the spacecraft potential', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Solar wind electron density (SWEA)'} - - meta['SWEA_Electron_density_quality'] = {meta.labels.name: 'SWEA_Electron_density_quality', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Statistical uncertainty, (1 sigma), not including systematic error', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Solar wind electron density data quality (SWEA)'} - - meta['SWEA_Electron_temperature'] = {meta.labels.name: 'SWEA_Electron_temperature', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Temperature of solar wind or magnetosheath electrons based on moments of the electron distribution after correcting for the spacecraft potential', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Solar wind electron temperature (SWEA)'} - - meta['SWEA_Electron_temperature_quality'] = {meta.labels.name: 'SWEA_Electron_temperature_quality', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Statistical uncertainty, (1 sigma), not including systematic error', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Solar wind electron temperature data quality (SWEA)'} - - meta['SWEA_Electron_parallel_flux_5_100'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_5_100', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Electron energy flux parallel to the magnetic field vector (0-90 degrees pitch angle)', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux parallel 5-100 eV (SWEA)'} - - meta['SWEA_Electron_parallel_flux_5_100_data_quality'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_5_100_data_quality', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux parallel 5-100 eV data quality (SWEA)'} - - meta['SWEA_Electron_parallel_flux_100_500'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_100_500', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Electron energy flux parallel to the magnetic field vector (0-90 degrees pitch angle)', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux parallel 100-500 eV (SWEA)'} - - meta['SWEA_Electron_parallel_flux_100_500_data_quality'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_100_500_data_quality', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux parallel 100-500 eV data quality (SWEA)'} - - meta['SWEA_Electron_parallel_flux_500_1000'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_500_1000', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Electron energy flux parallel to the magnetic field vector (0-90 degrees pitch angle)', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux parallel 500-1000 eV (SWEA)'} - - meta['SWEA_Electron_parallel_flux_500_1000_data_quality'] = {meta.labels.name: 'SWEA_Electron_parallel_flux_500_1000_data_quality', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux parallel 500-1000 eV data quality (SWEA)'} - - meta['SWEA_Electron_anti_parallel_flux_5_100'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_5_100', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Electron energy flux anti-parallel to the magnetic field vector (90-180 degrees pitch angle)', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux anti-parallel 5-100 eV (SWEA)'} - - meta['SWEA_Electron_anti_parallel_flux_5_100_data_quality'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_5_100_data_quality', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux anti-parallel 5-100 eV data quality (SWEA)'} - - meta['SWEA_Electron_anti_parallel_flux_100_500'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_100_500', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Electron energy flux anti-parallel to the magnetic field vector (90-180 degrees pitch angle)', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux anti-parallel 100-500 eV (SWEA)'} - - meta['SWEA_Electron_anti_parallel_flux_100_500_data_quality'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_100_500_data_quality', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux anti-parallel 100-500 eV data quality (SWEA)'} - - meta['SWEA_Electron_anti_parallel_flux_500_1000'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_500_1000', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Electron energy flux anti-parallel to the magnetic field vector (90-180 degrees pitch angle)', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux anti-parallel 500-1000 eV (SWEA)'} - - meta['SWEA_Electron_anti_parallel_flux_500_1000_data_quality'] = {meta.labels.name: 'SWEA_Electron_anti_parallel_flux_500_1000_data_quality', - meta.labels.units: 'eV/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux anti-parallel 500-1000 eV data quality (SWEA)'} - - meta['SWEA_Electron_spectrum_shape'] = {meta.labels.name: 'SWEA_Electron_spectrum_shape', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Energy spectrum shape parameter used to distingush between ionospheric photoelectrons and solar wind electrons', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron spectrum shape parameter (SWEA)'} - - meta['SWEA_Electron_spectrum_shape_data_quality'] = {meta.labels.name: 'SWEA_Electron_spectrum_shape_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron spectrum shape parameter data quality (SWEA)'} - - meta['SWIA_Hplus_density'] = {meta.labels.name: 'SWIA_Hplus_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Total ion density from onboard moment calculation, assuming 100% protons (SWIA)'} - - meta['SWIA_Hplus_density_data_quality'] = {meta.labels.name: 'SWIA_Hplus_density_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Total ion density data quality (SWIA)'} - - - - - - - meta['SWIA_Hplus_flow_velocity_MSO_x'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_x', - meta.labels.units: 'km_s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Bulk ion flow velocity X component from onboard moment calculation, assuming 100% protons (SWIA)'} - - meta['SWIA_Hplus_flow_velocity_MSO_y'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_y', - meta.labels.units: 'km_s', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Bulk ion flow velocity Y component from onboard moment calculation, assuming 100% protons (SWIA)'} - - meta['SWIA_Hplus_flow_velocity_MSO_z'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_z', - meta.labels.units: 'km_s', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Bulk ion flow velocity Z component from onboard moment calculation, assuming 100% protons (SWIA)'} - - meta['SWIA_Hplus_flow_velocity_MSO_data_quality_x'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_data_quality_x', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', - meta.labels.desc: '---> Bulk ion flow velocity X data quality (SWIA)'} - - meta['SWIA_Hplus_flow_velocity_MSO_data_quality_y'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_data_quality_y', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', - meta.labels.desc: '---> Bulk ion flow velocity Y data quality (SWIA)'} - - meta['SWIA_Hplus_flow_velocity_MSO_data_quality_z'] = {meta.labels.name: 'SWIA_Hplus_flow_velocity_MSO_data_quality_z', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', - meta.labels.desc: '---> Bulk ion flow velocity Z data quality (SWIA)'} - - meta['SWIA_Hplus_temperature'] = {meta.labels.name: 'SWIA_Hplus_temperature', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Scalar ion temperature from onboard moment calculation, assuming 100% protons (SWIA)'} - - meta['SWIA_Hplus_temperature_data_quality'] = {meta.labels.name: 'SWIA_Hplus_temperature_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Scalar ion temperature data quality (SWIA)'} - - meta['SWIA_dynamic_pressure'] = {meta.labels.name: 'SWIA_dynamic_pressure', - meta.labels.units: 'nPa', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion dynamic pressure computed on ground from density and velocity moments, assuming 100% protons (SWIA)'} - - meta['SWIA_dynamic_pressure_data_quality'] = {meta.labels.name: 'SWIA_dynamic_pressure_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Quality flag (0 = bad, 1 = good) indicating whether the distribution is well-measured and decommutation parameters are definite', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion dynamic pressure data quality (SWIA)'} - - meta['STATIC_Quality'] = {meta.labels.name: 'STATIC_Quality', - meta.labels.units: ' ', - meta.labels.min_val: 0.0, - meta.labels.max_val: 999999999.0, - meta.labels.notes: 'Integer flag bits, Valid=0, Flag=1, See KP SIS for bit descriptions (formatted as a float in order to include NaN values for data gaps) ', - meta.labels.fill_val: -2147483648.0, - meta.labels.desc: 'STATIC Data quality'} - - meta['STATIC_Hplus_density'] = {meta.labels.name: 'STATIC_Hplus_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'H+ number density below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ density (STATIC)'} - - meta['STATIC_Hplus_density_data_quality'] = {meta.labels.name: 'STATIC_Hplus_density_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> H+ density data quality (STATIC)'} - - meta['STATIC_Oplus_density'] = {meta.labels.name: 'STATIC_Oplus_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O+ number density below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O+ density (STATIC)'} - - meta['STATIC_Oplus_density_data_quality'] = {meta.labels.name: 'STATIC_Oplus_density_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O+ density data quality (STATIC)'} - - meta['STATIC_O2plus_density'] = {meta.labels.name: 'STATIC_O2plus_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O2+ number density below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ density (STATIC)'} - - meta['STATIC_O2plus_density_data_quality'] = {meta.labels.name: 'STATIC_O2plus_density_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ density data quality (STATIC)'} - - meta['STATIC_Hplus_temperature'] = {meta.labels.name: 'STATIC_Hplus_temperature', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'H+ RAM temperature below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ temperature (STATIC)'} - - meta['STATIC_Hplus_temperature_data_quality'] = {meta.labels.name: 'STATIC_Hplus_temperature_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> H+ temperature data quality (STATIC)'} - - meta['STATIC_Oplus_temperature'] = {meta.labels.name: 'STATIC_Oplus_temperature', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O+ RAM temperature below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O+ temperature (STATIC)'} - - meta['STATIC_Oplus_temperature_data_quality'] = {meta.labels.name: 'STATIC_Oplus_temperature_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O+ temperature data quality (STATIC)'} - - meta['STATIC_O2plus_temperature'] = {meta.labels.name: 'STATIC_O2plus_temperature', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O2+ RAM temperature below TBD altitude determined from APID c6 (32 energy x 64 mass) while in Ram or Conic modes', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ temperature (STATIC)'} - - meta['STATIC_O2plus_temperature_data_quality'] = {meta.labels.name: 'STATIC_O2plus_temperature_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ temperature data quality (STATIC)'} - - - - meta['STATIC_O2plus_flow_velocity_MAVEN_APP_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_x', - meta.labels.units: 'km/s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ MAVEN_APP X component of velocity below TBD altitude determined from APID c6 while in Ram or Conic mode (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MAVEN_APP_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_y', - meta.labels.units: 'km/s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ MAVEN_APP Y component of velocity below TBD altitude determined from APID c6 while in Ram or Conic mode (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MAVEN_APP_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_z', - meta.labels.units: 'km/s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ MAVEN_APP Z component of velocity below TBD altitude determined from APID c6 while in Ram or Conic mode (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_x', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.desc: '---> O2+ MAVEN_APP X component of velocity data quality (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_y', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ MAVEN_APP Y component of velocity data quality (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MAVEN_APP_data_quality_z', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.desc: '---> O2+ MAVEN_APP Z component of velocity data quality (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MSO_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_x', - meta.labels.units: 'km/s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ MSO X component of velocity below TBD altitude while in Ram or Conic mode (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MSO_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_y', - meta.labels.units: 'km/s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ MSO Y component of velocity below TBD altitude while in Ram or Conic mode (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MSO_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_z', - meta.labels.units: 'km/s', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ MSO Y component of velocity below TBD altitude while in Ram or Conic mode (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MSO_data_quality_x'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_data_quality_x', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ MSO X component of velocity data quality (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MSO_data_quality_y'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_data_quality_y', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ MSO Y component of velocity data quality (STATIC)'} - - meta['STATIC_O2plus_flow_velocity_MSO_data_quality_z'] = {meta.labels.name: 'STATIC_O2plus_flow_velocity_MSO_data_quality_z', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ MSO Z component of velocity data quality (STATIC)'} - - - - meta['STATIC_Hplus_omni_directional_flux'] = {meta.labels.name: 'STATIC_Hplus_omni_directional_flux', - meta.labels.units: '(cm^2 s)^-1', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'H+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ omni-directional flux (STATIC)'} - - meta['STATIC_Hplus_characteristic_energy'] = {meta.labels.name: 'STATIC_Hplus_characteristic_energy', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'H+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ characteristic energy (STATIC)'} - - meta['STATIC_Hplus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_Hplus_characteristic_energy_DQ', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> H+ characteristic energy data quality (STATIC)'} - - meta['STATIC_HEplus_omni_directional_flux'] = {meta.labels.name: 'STATIC_HEplus_omni_directional_flux', - meta.labels.units: '(cm^2 s)^-1', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'HE+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'He+ omni-directional flux (STATIC)'} - - meta['STATIC_HEplus_characteristic_energy'] = {meta.labels.name: 'STATIC_HEplus_characteristic_energy', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'HE+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'He+ characteristic energy (STATIC)'} - - meta['STATIC_HEplus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_HEplus_characteristic_energy_DQ', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> He+ characteristic energy data quality (STATIC)'} - - meta['STATIC_Oplus_omni_directional_flux'] = {meta.labels.name: 'STATIC_Oplus_omni_directional_flux', - meta.labels.units: '(cm^2 s)^-1', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O+ omni-directional flux (STATIC)'} - - meta['STATIC_Oplus_characteristic_energy'] = {meta.labels.name: 'STATIC_Oplus_characteristic_energy', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O+ characteristic energy (STATIC)'} - - meta['STATIC_Oplus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_Oplus_characteristic_energy_DQ', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O+ characteristic energy data quality (STATIC)'} - - meta['STATIC_O2plus_omni_directional_flux'] = {meta.labels.name: 'STATIC_O2plus_omni_directional_flux', - meta.labels.units: '(cm^2 s)^-1', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O2+ omni-directional flux above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ omni-directional flux (STATIC)'} - - meta['STATIC_O2plus_characteristic_energy'] = {meta.labels.name: 'STATIC_O2plus_characteristic_energy', - meta.labels.units: 'eV', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'O2+ omni-directional characteristic energy above TBD altitude determined from APID c6 while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O2+ characteristic energy (STATIC)'} - - meta['STATIC_O2plus_characteristic_energy_DQ'] = {meta.labels.name: 'STATIC_O2plus_characteristic_energy_DQ', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O2+ characteristic energy data quality (STATIC)'} - - - meta['STATIC_Hplus_characteristic_direction_MSO_x'] = {meta.labels.name: 'STATIC_Hplus_characteristic_direction_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ MSO X-direction of flux above TBD altitude determined from TBD APID while in Pickup and Scan mode (STATIC)'} - - meta['STATIC_Hplus_characteristic_direction_MSO_y'] = {meta.labels.name: 'STATIC_Hplus_characteristic_direction_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ MSO Y-direction of flux above TBD altitude determined from TBD APID while in Pickup and Scan mode (STATIC)'} - - meta['STATIC_Hplus_characteristic_direction_MSO_z'] = {meta.labels.name: 'STATIC_Hplus_characteristic_direction_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ MSO Z-direction of flux above TBD altitude determined from TBD APID while in Pickup and Scan mode (STATIC)'} - - - - - - - - meta['STATIC_Hplus_characteristic_angular_width'] = {meta.labels.name: 'STATIC_Hplus_characteristic_angular_width', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'H+ flux angular width above TBD altitude determined from TBD APID while in Pickup and Scan mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'H+ characteristic width (STATIC)'} - - meta['STATIC_Hplus_characteristic_angular_width_DQ'] = {meta.labels.name: 'STATIC_Hplus_characteristic_angular_width_DQ', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> H+ characteristic width data quality (STATIC)'} - - - meta['STATIC_dominant_pickup_ion_characteristic_direction_MSO_z'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_direction_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Dominant pickup ion MSO Z direction of flux above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode'} - - meta['STATIC_dominant_pickup_ion_characteristic_direction_MSO_x'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_direction_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Dominant pickup ion MSO X direction of flux above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode'} - - meta['STATIC_dominant_pickup_ion_characteristic_direction_MSO_y'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_direction_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Dominant pickup ion MSO Y direction of flux above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode'} - - - - - - meta['STATIC_dominant_pickup_ion_characteristic_angular_width'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_angular_width', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Dominant pickup ion flux angular width above TBD altitude determined from APID D0 and CE while in Pickup, Eclipse and Protect mode', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Dominant pickup ion characteristic angular width (STATIC)'} - - meta['STATIC_dominant_pickup_ion_characteristic_angular_width_DQ'] = {meta.labels.name: 'STATIC_dominant_pickup_ion_characteristic_angular_width_DQ', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number of counts in the measurement', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Dominant pickup ion characteristic angular width DQ (STATIC)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_1F'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1F', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 1-F (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_1F_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1F_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 1-F data quality (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_1R'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1R', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 1-R (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_1R_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_1R_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 1-R data quality (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_2F'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2F', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 2-F (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_2F_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2F_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 2-F data quality (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_2R'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2R', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of ions, integrated over the energy range 0.03-1.0 MeV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion energy flux (30-1000 keV), FOV 2-R (SEP)'} - - meta['SEP_Ion_Energy_Flux_30_1000_FOV_2R_data_quality'] = {meta.labels.name: 'SEP_Ion_Energy_Flux_30_1000_FOV_2R_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total ion flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion energy flux (30-1000 keV), FOV 2-R data quality (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_1F'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1F', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 1-F (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_1F_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1F_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 1-F data quality (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_1R'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1R', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 1-R (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_1R_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_1R_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 1-R data quality (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_2F'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2F', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 2-F (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_2F_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2F_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 2-F data quality (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_2R'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2R', - meta.labels.units: 'n/(cm^2 s sr)', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Number flux of electrons, integrated over the energy range 30-300 keV', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Electron energy flux (30-300 keV), FOV 2-R (SEP)'} - - meta['SEP_Electron_Energy_Flux_30_300_FOV_2R_data_quality'] = {meta.labels.name: 'SEP_Electron_Energy_Flux_30_300_FOV_2R_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Standard uncertainty in total electron flux, based on Poisson statistics', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Electron energy flux (30-300 keV), FOV 2-R data quality (SEP)'} - - - - - - - - - - meta['SEP_Look_direction_1F_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_1F_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'SEP look direction 1-F MSO X'} - - meta['SEP_Look_direction_1F_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_1F_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'SEP look direction 1-F MSO Y'} - - meta['SEP_Look_direction_1F_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_1F_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 1-F MSO Z'} - - meta['SEP_Look_direction_1R_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_1R_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 1-R MSO X'} - - meta['SEP_Look_direction_1R_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_1R_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 1-R MSO Y'} - - meta['SEP_Look_direction_1R_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_1R_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 1-R MSO Z'} - - meta['SEP_Look_direction_2F_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_2F_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 2-F MSO X'} - - meta['SEP_Look_direction_2F_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_2F_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 2-F MSO Y'} - - meta['SEP_Look_direction_2F_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_2F_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 2-F MSO Z'} - - meta['SEP_Look_direction_2R_MSO_x'] = {meta.labels.name: 'SEP_Look_direction_2R_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 2-R MSO X'} - - meta['SEP_Look_direction_2R_MSO_y'] = {meta.labels.name: 'SEP_Look_direction_2R_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 2-R MSO Y'} - - meta['SEP_Look_direction_2R_MSO_z'] = {meta.labels.name: 'SEP_Look_direction_2R_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'SEP look direction 2-R MSO Z'} - - meta['MAG_field_MSO_x'] = {meta.labels.name: 'MAG_field_MSO_x', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Magnetic field vector component in the X direction in MSO coordinates (MAG)'} - - meta['MAG_field_MSO_y'] = {meta.labels.name: 'MAG_field_MSO_y', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Magnetic field vector component in the Y direction in MSO coordinates (MAG)'} - - meta['MAG_field_MSO_z'] = {meta.labels.name: 'MAG_field_MSO_z', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Magnetic field vector component in the Z direction in MSO coordinates (MAG)'} - - - meta['MAG_field_MSO_data_quality_x'] = {meta.labels.name: 'MAG_field_MSO_data_quality_x', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Unused column', - meta.labels.desc: '---> Magnetic field X vector component in MSO coordinates data quality (MAG)'} - - meta['MAG_field_MSO_data_quality_y'] = {meta.labels.name: 'MAG_field_MSO_data_quality_y', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Unused column', - meta.labels.desc: '---> Magnetic field Y vector component in MSO coordinates data quality (MAG)'} - - meta['MAG_field_MSO_data_quality_z'] = {meta.labels.name: 'MAG_field_MSO_data_quality_z', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Unused column', - meta.labels.desc: '---> Magnetic field Z vector component in MSO coordinates data quality (MAG)'} - - meta['MAG_field_GEO_x'] = {meta.labels.name: 'MAG_field_GEO_x', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Magnetic field vector component in the X direction in GEO coordinates (MAG)'} - - meta['MAG_field_GEO_y'] = {meta.labels.name: 'MAG_field_GEO_y', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.desc: 'Magnetic field vector component in the Y direction in GEO coordinates (MAG)'} - - meta['MAG_field_GEO_z'] = {meta.labels.name: 'MAG_field_GEO_z', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Magnetic field vector component in the Z direction in GEO coordinates (MAG)'} - - meta['MAG_field_GEO_data_quality_x'] = {meta.labels.name: 'MAG_field_GEO_data_quality_x', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Unused column', - meta.labels.desc: '---> Magnetic field X vector component in GEO coordinates data quality (MAG)'} - - meta['MAG_field_GEO_data_quality_y'] = {meta.labels.name: 'MAG_field_GEO_data_quality_y', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Unused column', - meta.labels.desc: '---> Magnetic field Y vector component in GEO coordinates data quality (MAG)'} - - meta['MAG_field_GEO_data_quality_z'] = {meta.labels.name: 'MAG_field_GEO_data_quality_z', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Unused column', - meta.labels.desc: '---> Magnetic field Z vector component in GEO coordinates data quality (MAG)'} - - - - meta['MAG_field_RMS_deviation'] = {meta.labels.name: 'MAG_field_RMS_deviation', - meta.labels.units: 'nT', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Deviations from the mean magnetic field magnitude (MAG)'} - - meta['MAG_field_RMS_deviation_data_quality'] = {meta.labels.name: 'MAG_field_RMS_deviation_data_quality', - meta.labels.units: ' ', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Unused column', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Deviations from the mean magnetic field magnitude data quality (MAG)'} - - meta['NGIMS_He_density'] = {meta.labels.name: 'NGIMS_He_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'He density (NGIMS)'} - - meta['NGIMS_He_density_precision'] = {meta.labels.name: 'NGIMS_He_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> He density precision (NGIMS)'} - - meta['NGIMS_He_density_data_quality'] = {meta.labels.name: 'NGIMS_He_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] He density data quality (NGIMS)'} - - meta['NGIMS_O_density'] = {meta.labels.name: 'NGIMS_O_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'O density (NGIMS)'} - - meta['NGIMS_O_density_precision'] = {meta.labels.name: 'NGIMS_O_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> O density precision (NGIMS)'} - - meta['NGIMS_O_density_data_quality'] = {meta.labels.name: 'NGIMS_O_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] O density data quality (NGIMS)'} - - meta['NGIMS_CO_density'] = {meta.labels.name: 'NGIMS_CO_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'CO density (NGIMS)'} - - meta['NGIMS_CO_density_precision'] = {meta.labels.name: 'NGIMS_CO_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> CO density precision (NGIMS)'} - - meta['NGIMS_CO_density_data_quality'] = {meta.labels.name: 'NGIMS_CO_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] CO density data quality (NGIMS)'} - - meta['NGIMS_N2_density'] = {meta.labels.name: 'NGIMS_N2_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'N2 density (NGIMS)'} - - meta['NGIMS_N2_density_precision'] = {meta.labels.name: 'NGIMS_N2_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> N2 density precision (NGIMS)'} - - meta['NGIMS_N2_density_data_quality'] = {meta.labels.name: 'NGIMS_N2_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] N2 density data quality (NGIMS)'} - - meta['NGIMS_NO_density'] = {meta.labels.name: 'NGIMS_NO_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'NO density (NGIMS)'} - - meta['NGIMS_NO_density_precision'] = {meta.labels.name: 'NGIMS_NO_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> NO density precision (NGIMS)'} - - meta['NGIMS_NO_density_data_quality'] = {meta.labels.name: 'NGIMS_NO_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] NO density data quality (NGIMS)'} - - meta['NGIMS_Ar_density'] = {meta.labels.name: 'NGIMS_Ar_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ar density (NGIMS)'} - - meta['NGIMS_Ar_density_precision'] = {meta.labels.name: 'NGIMS_Ar_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ar density precision (NGIMS)'} - - meta['NGIMS_Ar_density_data_quality'] = {meta.labels.name: 'NGIMS_Ar_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] Ar density data quality (NGIMS)'} - - meta['NGIMS_CO2_density'] = {meta.labels.name: 'NGIMS_CO2_density', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'CO2 density (NGIMS)'} - - meta['NGIMS_CO2_density_precision'] = {meta.labels.name: 'NGIMS_CO2_density_precision', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> CO2 density precision (NGIMS)'} - - meta['NGIMS_CO2_density_data_quality'] = {meta.labels.name: 'NGIMS_CO2_density_data_quality', - meta.labels.units: '-', - meta.labels.notes: 'NIV - Neutral Inbound Verified, NIU - Neutral Inbound Unverified, NOV - Neutral Outbound Verified, NOU - Neutral Outbound Unverified', - meta.labels.desc: '---> [DOES NOT PLOT] CO2 density data quality (NGIMS)'} - - meta['NGIMS_Ion_density_32plus'] = {meta.labels.name: 'NGIMS_Ion_density_32plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 32+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_32plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_32plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 32+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_32plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_32plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 32+ (NGIMS)'} - - meta['NGIMS_Ion_density_44plus'] = {meta.labels.name: 'NGIMS_Ion_density_44plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 44+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_44plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_44plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 44+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_44plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_44plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 44+ (NGIMS)'} - - meta['NGIMS_Ion_density_30plus'] = {meta.labels.name: 'NGIMS_Ion_density_30plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 30+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_30plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_30plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 30+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_30plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_30plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 30+ (NGIMS)'} - - meta['NGIMS_Ion_density_16plus'] = {meta.labels.name: 'NGIMS_Ion_density_16plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 16+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_16plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_16plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 16+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_16plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_16plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 16+ (NGIMS)'} - - meta['NGIMS_Ion_density_28plus'] = {meta.labels.name: 'NGIMS_Ion_density_28plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 28+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_28plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_28plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 28+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_28plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_28plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 28+ (NGIMS)'} - - meta['NGIMS_Ion_density_12plus'] = {meta.labels.name: 'NGIMS_Ion_density_12plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 12+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_12plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_12plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 12+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_12plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_12plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 12+ (NGIMS)'} - - meta['NGIMS_Ion_density_17plus'] = {meta.labels.name: 'NGIMS_Ion_density_17plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 17+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_17plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_17plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 17+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_17plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_17plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 17+ (NGIMS)'} - - meta['NGIMS_Ion_density_14plus'] = {meta.labels.name: 'NGIMS_Ion_density_14plus', - meta.labels.units: 'cm^-3', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Abundance or upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Ion density - amu 14+ (NGIMS)'} - - meta['NGIMS_Ion_density_precision_14plus'] = {meta.labels.name: 'NGIMS_Ion_density_precision_14plus', - meta.labels.units: '%', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: '% Error (1 sigma), if -1, the value is an upper limit', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: '---> Ion density precision - amu 14+ (NGIMS)'} - - meta['NGIMS_Ion_density_data_quality_14plus'] = {meta.labels.name: 'NGIMS_Ion_density_data_quality_14plus', - meta.labels.units: '-', - meta.labels.notes: 'SCP - SpaceCraft Potential available and used as computed by STATIC, SC0 - SpaceCraft potential not available', - meta.labels.desc: '---> [DOES NOT PLOT] Ion density data quality - amu 14+ (NGIMS)'} - - - - - - - meta['SPICE_spacecraft_GEO_x'] = {meta.labels.name: 'SPICE_spacecraft_GEO_x', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'X-component of spacecraft position in Mars planetocentric (geographic) GEO coordinates'} - - meta['SPICE_spacecraft_GEO_y'] = {meta.labels.name: 'SPICE_spacecraft_GEO_y', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Y-component of spacecraft position in Mars planetocentric (geographic) GEO coordinates'} - - meta['SPICE_spacecraft_GEO_z'] = {meta.labels.name: 'SPICE_spacecraft_GEO_z', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Z-component of spacecraft position in Mars planetocentric (geographic) GEO coordinates'} - - meta['SPICE_spacecraft_MSO_x'] = {meta.labels.name: 'SPICE_spacecraft_MSO_x', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'X-component of spacecraft position in MSO coordinates'} - - meta['SPICE_spacecraft_MSO_y'] = {meta.labels.name: 'SPICE_spacecraft_MSO_y', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Y-component of spacecraft position in MSO coordinates'} - - meta['SPICE_spacecraft_MSO_z'] = {meta.labels.name: 'SPICE_spacecraft_MSO_z', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Z-component of spacecraft position in MSO coordinates'} - - - - meta['SPICE_spacecraft_longitude_GEO'] = {meta.labels.name: 'SPICE_spacecraft_longitude_GEO', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Longitudinal component of MAVEN\'s location with respect to Mars', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Spacecraft longitude GEO (SPICE)'} - - meta['SPICE_spacecraft_latitude_GEO'] = {meta.labels.name: 'SPICE_spacecraft_latitude_GEO', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Latitudinal (areodetic) component of MAVEN\'s location with respect to IAU Mars ellipsoid, equatorial radius of 3396.2 km, polar radius of', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Spacecraft latitude GEO (SPICE)'} - - meta['SPICE_spacecraft_sza'] = {meta.labels.name: 'SPICE_spacecraft_sza', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Angle measured from MAVEN to the geometric center of the Sun\'s disc, as described using a horizontal coordinate system', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Spacecraft solar zenith angle (SPICE)'} - - meta['SPICE_spacecraft_local_time'] = {meta.labels.name: 'SPICE_spacecraft_local_time', - meta.labels.units: 'hours', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Angle measured from MAVEN to the geometric center of the Sun\'s disc, as described using a horizontal coordinate system', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Spacecraft local time (SPICE)'} - - meta['SPICE_spacecraft_altitude'] = {meta.labels.name: 'SPICE_spacecraft_altitude', - meta.labels.units: 'km', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Altitude (areodetic) with respect to IAU Mars ellipsoid, equatorial radius of 3396.2 km, ', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Spacecraft altitude w.r.t. aeroid (SPICE)'} - - - meta['SPICE_spacecraft_attitude_GEO_x'] = {meta.labels.name: 'SPICE_spacecraft_attitude_GEO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'X-component of spacecraft attitude in GEO coordinates'} - - meta['SPICE_spacecraft_attitude_GEO_y'] = {meta.labels.name: 'SPICE_spacecraft_attitude_GEO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Y-component of spacecraft attitude in GEO coordinates'} - - meta['SPICE_spacecraft_attitude_GEO_z'] = {meta.labels.name: 'SPICE_spacecraft_attitude_GEO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Z-component of spacecraft attitude in GEO coordinates'} - - meta['SPICE_spacecraft_attitude_MSO_x'] = {meta.labels.name: 'SPICE_spacecraft_attitude_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'X-component of spacecraft attitude in MSO coordinates'} - - meta['SPICE_spacecraft_attitude_MSO_y'] = {meta.labels.name: 'SPICE_spacecraft_attitude_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Y-component of spacecraft attitude in MSO coordinates'} - - meta['SPICE_spacecraft_attitude_MSO_z'] = {meta.labels.name: 'SPICE_spacecraft_attitude_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Z-component of spacecraft attitude in MSO coordinates'} - - meta['SPICE_app_attitude_GEO_x'] = {meta.labels.name: 'SPICE_app_attitude_GEO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'X-component of pointing direction of Articulated Payload Platform (z-axis of MAVEN_APP_BP frame) in GEO coordinates', - meta.labels.desc: 'X-component of articulated payload platform (app) attitude in GEO coordinates'} - - meta['SPICE_app_attitude_GEO_y'] = {meta.labels.name: 'SPICE_app_attitude_GEO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Y-component of pointing direction of Articulated Payload Platform (z-axis of MAVEN_APP_BP frame) in GEO coordinates', - meta.labels.desc: 'Y-component of articulated payload platform (app) attitude in GEO coordinates'} - - meta['SPICE_app_attitude_GEO_z'] = {meta.labels.name: 'SPICE_app_attitude_GEO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.notes: 'Z-component of pointing direction of Articulated Payload Platform (z-axis of MAVEN_APP_BP frame) in GEO coordinates', - meta.labels.desc: 'Z-component of articulated payload platform (app) attitude in GEO coordinates'} - - - meta['SPICE_app_attitude_MSO_x'] = {meta.labels.name: 'SPICE_app_attitude_MSO_x', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'X-component of articulated payload platform (app) attitude in MSO coordinates'} - - meta['SPICE_app_attitude_MSO_y'] = {meta.labels.name: 'SPICE_app_attitude_MSO_y', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Y-component of articulated payload platform (app) attitude in MSO coordinates'} - - meta['SPICE_app_attitude_MSO_z'] = {meta.labels.name: 'SPICE_app_attitude_MSO_z', - meta.labels.units: 'unit vector', - meta.labels.min_val: -999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'same as IAU_MARS in SPICE', - meta.labels.desc: 'Z-component of articulated payload platform (app) attitude in MSO coordinates'} - - meta['SPICE_Orbit_Number'] = {meta.labels.name: 'SPICE_Orbit_Number', - meta.labels.units: ' ', - meta.labels.min_val: 1.0, - meta.labels.max_val: 10000000.0, - meta.labels.notes: 'Orbit number increments each time MAVEN reaches geometric periapsis', - meta.labels.fill_val: -2147483648.0, - meta.labels.desc: 'Orbit number (SPICE)'} - - meta['Inbound_Outbound_Flag'] = {meta.labels.name: 'Inbound_Outbound_Flag', - meta.labels.units: ' ', - meta.labels.notes: 'Inbound (\'I\') is from geometric apoapsis to next geometric periapsis in time, outbound (\'O\') is the reverse', - meta.labels.desc: '---> [DOES NOT PLOT] Inbound/Outbound Flag (SPICE)'} - - meta['SPICE_Mars_season'] = {meta.labels.name: 'SPICE_Mars_season', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Martian solar longitude. Ls = 0 (northern spring equinox), Ls = 90 (northern summer solstice), etc.', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Mars Season (Ls) (SPICE)'} - - meta['SPICE_Mars_Sun_distance'] = {meta.labels.name: 'SPICE_Mars_Sun_distance', - meta.labels.units: 'AU', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Mars-Sun distance (SPICE)'} - - meta['SPICE_Subsolar_Point_longitude_GEO'] = {meta.labels.name: 'SPICE_Subsolar_Point_longitude_GEO', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'GEO longitude of the sub-solar point', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Subsolar Point longitude GEO (SPICE)'} - - meta['SPICE_Subsolar_Point_latitude_GEO'] = {meta.labels.name: 'SPICE_Subsolar_Point_latitude_GEO', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'GEO latitude of the sub-solar point', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Subsolar Point latitude GEO (SPICE)'} - - meta['SPICE_Sub_Mars_Point_longitude'] = {meta.labels.name: 'SPICE_Sub_Mars_Point_longitude', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Solar longitude of the center of the Sun as seen from Mars', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Sub-Mars Point on the Sun, Longitude (SPICE)'} - - meta['SPICE_Sub_Mars_Point_latitude'] = {meta.labels.name: 'SPICE_Sub_Mars_Point_latitude', - meta.labels.units: 'deg', - meta.labels.min_val: -999999995904.0, - meta.labels.max_val: 999999995904.0, - meta.labels.notes: 'Solar latitude of the center of the Sun as seen from Mars', - meta.labels.fill_val: -9.999999848243207e+30, - meta.labels.desc: 'Sub-Mars Point on the Sun, Latitude (SPICE)'} - - meta['Rotation_matrix_IAU_MARS_MAVEN_MSO'] = {meta.labels.name: 'Rotation_matrix_IAU_MARS_MAVEN_MSO', - meta.labels.units: ' ', - meta.labels.min_val: -1000000000000.0, - meta.labels.max_val: 1000000000000.0, - meta.labels.notes: 'From IAU_MARS frame to MAVEN_MSO frame', - meta.labels.fill_val: -1e+31, - meta.labels.desc: 'Rotation matrix (IAU_MARS -> MAVEN_MSO) (SPICE)'} - - meta['Rotation_matrix_SPACECRAFT_MAVEN_MSO'] = {meta.labels.name: 'Rotation_matrix_SPACECRAFT_MAVEN_MSO', - meta.labels.units: ' ', - meta.labels.min_val: -1000000000000.0, - meta.labels.max_val: 1000000000000.0, - meta.labels.notes: 'From MAVEN_SPACECRAFT frame to MAVEN_MSO frame', - meta.labels.fill_val: -1e+31, - meta.labels.desc: '---> Rotation matrix (MAVEN_SPACECRAFT -> MAVEN_MSO) (SPICE)'} - - - return meta +ackn_str = ''.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')) +references = ''.join(('Connerney, J., and P. Lawton, MAVEN MAG', + ' PDS Archive SIS - This document ', + 'describes the format and content of the MAVEN', + ' Magnetometer (MAG) Planetary Data System ', + '(PDS) data archive. ', + 'It includes descriptions of the Standard', + 'Data Products and associated metadata, ', + 'and the volume archive format,', + 'content, and generation pipeline. ', + 'Connerney, J.E.P.; Espley, J.; Lawton, P.;', + ' Murphy, S.; Odom, J.; Oliversen, R.;', + 'and Sheppard, D., The MAVEN Magnetic Field', + ' Investigation, Space Sci Rev,', + 'Vol 195, Iss 1-4, pp.257-291, 2015. ', + 'doi:10.1007/s11214-015-0169-4', + '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')) diff --git a/pysatNASA/instruments/mvn_insitu.py b/pysatNASA/instruments/mvn_insitu.py index 02e4ccd8..d37299e0 100644 --- a/pysatNASA/instruments/mvn_insitu.py +++ b/pysatNASA/instruments/mvn_insitu.py @@ -1,11 +1,9 @@ # -*- coding: utf-8 -*- -"""Module for the MAVEN kp instrument. +"""Module for the MAVEN insitu instrument. Created by: Teresa Esman, NPP at GSFC -Last editted: Jun 2, 2023 - May 12, 2023 -Supports the Key parameter (kp) data from multiple instruments +Supports the Key parameter (kp) data from multiple instruments onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. Accesses local data in CDF format. @@ -34,9 +32,9 @@ registry.register_by_module(pysatNASA.instruments) - kp = pysat.Instrument(platform='MAVEN', name='kp') - kp.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) - kp.load(2020, 1, use_header = True) + 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) """ import datetime as dt @@ -71,7 +69,7 @@ def clean(self): - """Clean MAVEN kp data to the specified level. + """Clean MAVEN insitu kp data to the specified level. Note ---- @@ -102,9 +100,13 @@ def clean(self): # Set the list_remote_files routine list_remote_files = functools.partial(cdw.list_remote_files, supported_tags=download_tags) + + def init(self): """Initialize the Instrument object with instrument specific values. + Runs once upon instantiation. + Parameters ----------- self : pysat.Instrument @@ -117,6 +119,7 @@ def init(self): return + # Set the load routine load = functools.partial(cdw.load, epoch_name='epoch', pandas_format=pandas_format, use_cdflib=True) diff --git a/pysatNASA/instruments/mvn_mag.py b/pysatNASA/instruments/mvn_mag.py index 14635c4f..0a7f8937 100644 --- a/pysatNASA/instruments/mvn_mag.py +++ b/pysatNASA/instruments/mvn_mag.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- """Module for the MAVEN mag instrument. + Created by: Teresa Esman, NPP at GSFC -Last editted: Jul 13, 2023 - May 24, 2023 - May 12, 2023 -Supports the Magnetometer (MAG) onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. +Supports the Magnetometer (MAG) onboard the Mars Atmosphere +and Volatile Evolution (MAVEN) satellite. Accesses local data in CDF format. -Downloads from CDAWeb. +Downloads from CDAWeb. Properties ---------- platform - 'mvn' + 'maven' name 'mag' tag @@ -23,7 +22,6 @@ - Only supports level-2 sunstate 1 second data. - Examples -------- :: @@ -31,17 +29,17 @@ import pysat from pysat.utils import registry registry.register_by_module(pysatNASA.instruments) - - + + mag = pysat.Instrument(platform='MAVEN', name='mag') mag.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) mag.load(2020, 1, use_header = True) + """ import datetime as dt import functools -import numpy as np -import cdflib + import pysat from pysat.instruments.methods import general as mm_gen from pysatNASA.instruments.methods import cdaweb as cdw @@ -51,43 +49,24 @@ # ---------------------------------------------------------------------------- # Instrument attributes -platform = 'mvn' +platform = 'maven' name = 'mag' tags = {'': 'l2'} inst_ids = {'': ['']} pandas_format = False - # ---------------------------------------------------------------------------- # Instrument test attributes _test_dates = {'': {'': dt.datetime(2020, 1, 1)}} _test_load_opt = {'': {'': {'keep_original_names': True}}} - # ---------------------------------------------------------------------------- # Instrument methods - # Use standard init routine init = functools.partial(mm_nasa.init, module=mm_mvn, name=name) -def preprocess(self, keep_original_names=False): - """Adjust epoch timestamps to datetimes and remove variable preambles. - - Parameters - ---------- - keep_original_names : bool - if True then the names as given in the netCDF MAVEN file - will be used as is. If False, a preamble is removed. (default=False) - - """ - - if not keep_original_names: - mm_gen.remove_leading_text(self, target='MAVEN_') - return - - def clean(self): """Clean MAVEN mag data to the specified level. @@ -95,7 +74,7 @@ def clean(self): ---- Supports 'clean', 'dusty', 'dirty', 'none'. Method is not called by pysat if clean_level is None or 'none'. - + """ @@ -115,7 +94,8 @@ def clean(self): supported_tags=supported_tags) # Set the download routine -basic_tag = {'remote_dir': '/pub/data/maven/mag/l2/sunstate-1sec/cdfs/{year:04d}/{month:02d}', +basic_tag = {'remote_dir': ''.join(('/pub/data/maven/mag/l2/sunstate-1sec', + '/cdfs/{year:04d}/{month:02d}')), 'fname': fname} download_tags = {'': {'': basic_tag}} download = functools.partial(cdw.download, supported_tags=download_tags) @@ -125,39 +105,11 @@ def clean(self): supported_tags=download_tags) -def filter_metadata(meta_dict): - """Filter mag metadata to remove warnings during loading. - - Parameters - ---------- - meta_dict : dict - Dictionary of metadata from file - - Returns - ------- - meta_dict : dict - Filtered mag metadata - - """ - vars = ['time', 'DDAY', 'OB_B_x', 'OB_B_y','OB_B_z', 'OB_B_range', - 'POSN_x','POSN_y','POSN_z', 'OB_BDPL_x','OB_BDPL_y','OB_BDPL_z', - 'OB_BDPL_range'] - - for var in vars: - if var in meta_dict: - meta_dict[var]['FillVal'] = np.nan - - # Deal with string arrays - for var in meta_dict.keys(): - if 'Var_Notes' in meta_dict[var]: - meta_dict[var]['Var_Notes'] = ' '.join(pysat.utils.listify( - meta_dict[var]['Var_Notes'])) - - return meta_dict - def init(self): """Initialize the Instrument object with instrument specific values. + Runs once upon instantiation. + Parameters ----------- self : pysat.Instrument @@ -170,61 +122,7 @@ def init(self): return -def load(fnames, tag='', inst_id='', keep_original_names=False): - """Load MAVEN mag data into `xarray.Dataset` object and `pysat.Meta` objects. - - This routine is called as needed by pysat. It is not intended - for direct user interaction. - Parameters - ---------- - fnames : array-like - Iterable of filename strings, full path, to data files to be loaded. - This input is nominally provided by pysat itself. - tag : str - Tag name used to identify particular data set to be loaded. - This input is nominally provided by pysat itself. (default='') - inst_id : str - Instrument ID used to identify particular data set to be loaded. - This input is nominally provided by pysat itself. (default='') - keep_original_names : bool - If True then the names as given in the netCDF MAVEN file - will be used as is. If False, a preamble is removed. (default=False) - - Returns - ------- - data : xr.Dataset - An xarray Dataset with data prepared for the pysat.Instrument - meta : pysat.Meta - Metadata formatted for a pysat.Instrument object. - - Note - ---- - Any additional keyword arguments passed to pysat.Instrument - upon instantiation are passed along to this routine. - - - Examples - -------- - :: - - inst = pysat.Instrument('mvn', 'mag') - inst.load(2020, 1) - - """ - - - data = cdflib.cdf_to_xarray(fnames[0]) - - meta = [] - - xdata = mm_mvn.scrub_mvn_mag(data) - # mm_mvn.scrub_mvn_mag switches the type to xarray - - # Add meta here - header_data = mm_mvn.generate_header(data) - meta = mm_mvn.generate_metadata(header_data,data) - - data = xdata - - return data,meta +# Set the load routine +load = functools.partial(cdw.load, epoch_name='epoch', + pandas_format=pandas_format, use_cdflib=True) diff --git a/test_requirements.txt b/test_requirements.txt index 6c5e6eff..b0971689 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -10,4 +10,4 @@ pytest pytest-cov pytest-ordering sphinx -sphinx_rtd_theme +sphinx_rtd_theme>=1.2.2 From 5ced356418d0d7c802f73c7532eed6d70289898e Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:46:54 -0400 Subject: [PATCH 08/33] STY: edit init --- pysatNASA/instruments/__init__.py | 3 ++- pysatNASA/instruments/methods/__init__.py | 1 - pysatNASA/instruments/methods/cdaweb.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index 7729829c..3b35ec45 100644 --- a/pysatNASA/instruments/__init__.py +++ b/pysatNASA/instruments/__init__.py @@ -11,7 +11,8 @@ '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', 'mvn_mag', 'mvn_insitu', 'omni_hro', + 'igs_gps', 'iss_fpmu', 'jpl_gps', 'mvn_mag', + 'mvn_insitu', 'omni_hro', 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] for inst in __all__: diff --git a/pysatNASA/instruments/methods/__init__.py b/pysatNASA/instruments/methods/__init__.py index da8f7d9a..8542fcbc 100644 --- a/pysatNASA/instruments/methods/__init__.py +++ b/pysatNASA/instruments/methods/__init__.py @@ -12,4 +12,3 @@ from pysatNASA.instruments.methods import omni # noqa F401 from pysatNASA.instruments.methods import ses14 # noqa F401 from pysatNASA.instruments.methods import timed # noqa F401 -from pysatNASA.instruments.methods import mvn # noga F401 diff --git a/pysatNASA/instruments/methods/cdaweb.py b/pysatNASA/instruments/methods/cdaweb.py index 5a2154bc..3e3340fb 100644 --- a/pysatNASA/instruments/methods/cdaweb.py +++ b/pysatNASA/instruments/methods/cdaweb.py @@ -392,7 +392,6 @@ def load_xarray(fnames, tag='', inst_id='', else: data = ldata[0] - all_vars = io.xarray_all_vars(data) meta = pysat.Meta(labels=labels) From 638c7d68075602dcd79f06f1a6ebe2b55dbe0bf6 Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:54:17 -0400 Subject: [PATCH 09/33] ENH: add sep instrument --- pysatNASA/instruments/__init__.py | 4 +- .../{mvn_insitu.py => maven_insitu.py} | 10 +- .../instruments/{mvn_mag.py => maven_mag.py} | 5 +- pysatNASA/instruments/maven_sep.py | 139 ++++++++++++++++++ .../instruments/methods/{mvn.py => maven.py} | 0 5 files changed, 145 insertions(+), 13 deletions(-) rename pysatNASA/instruments/{mvn_insitu.py => maven_insitu.py} (92%) rename pysatNASA/instruments/{mvn_mag.py => maven_mag.py} (96%) create mode 100644 pysatNASA/instruments/maven_sep.py rename pysatNASA/instruments/methods/{mvn.py => maven.py} (100%) diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index 3b35ec45..87c5306b 100644 --- a/pysatNASA/instruments/__init__.py +++ b/pysatNASA/instruments/__init__.py @@ -11,8 +11,8 @@ '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', 'mvn_mag', - 'mvn_insitu', 'omni_hro', + 'igs_gps', 'iss_fpmu', 'jpl_gps', 'maven_mag', + 'maven_insitu', 'omni_hro', 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] for inst in __all__: diff --git a/pysatNASA/instruments/mvn_insitu.py b/pysatNASA/instruments/maven_insitu.py similarity index 92% rename from pysatNASA/instruments/mvn_insitu.py rename to pysatNASA/instruments/maven_insitu.py index d37299e0..f5642baf 100644 --- a/pysatNASA/instruments/mvn_insitu.py +++ b/pysatNASA/instruments/maven_insitu.py @@ -18,11 +18,6 @@ tag None supported -Warnings --------- - -- Only supports level-2 sunstate 1 second data. - Examples -------- @@ -43,7 +38,7 @@ from pysat.instruments.methods import general as mm_gen from pysatNASA.instruments.methods import cdaweb as cdw from pysatNASA.instruments.methods import general as mm_nasa -from pysatNASA.instruments.methods import mvn as mm_mvn +from pysatNASA.instruments.methods import maven as mm_mvn # ---------------------------------------------------------------------------- # Instrument attributes @@ -59,7 +54,6 @@ # Instrument test attributes _test_dates = {'': {'': dt.datetime(2020, 1, 1)}} -_test_load_opt = {'': {'': {'keep_original_names': True}}} # ---------------------------------------------------------------------------- # Instrument methods @@ -73,7 +67,7 @@ def clean(self): Note ---- - Supports 'clean', 'dusty', 'dirty', 'none'. Method is + Supports 'none'. Method is not called by pysat if clean_level is None or 'none'. """ return diff --git a/pysatNASA/instruments/mvn_mag.py b/pysatNASA/instruments/maven_mag.py similarity index 96% rename from pysatNASA/instruments/mvn_mag.py rename to pysatNASA/instruments/maven_mag.py index 0a7f8937..2cf79d91 100644 --- a/pysatNASA/instruments/mvn_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -44,7 +44,7 @@ from pysat.instruments.methods import general as mm_gen from pysatNASA.instruments.methods import cdaweb as cdw from pysatNASA.instruments.methods import general as mm_nasa -from pysatNASA.instruments.methods import mvn as mm_mvn +from pysatNASA.instruments.methods import maven as mm_mvn # ---------------------------------------------------------------------------- # Instrument attributes @@ -59,7 +59,7 @@ # Instrument test attributes _test_dates = {'': {'': dt.datetime(2020, 1, 1)}} -_test_load_opt = {'': {'': {'keep_original_names': True}}} + # ---------------------------------------------------------------------------- # Instrument methods @@ -92,7 +92,6 @@ def clean(self): supported_tags = {'': {'': fname}} list_files = functools.partial(mm_gen.list_files, supported_tags=supported_tags) - # Set the download routine basic_tag = {'remote_dir': ''.join(('/pub/data/maven/mag/l2/sunstate-1sec', '/cdfs/{year:04d}/{month:02d}')), diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py new file mode 100644 index 00000000..88d78529 --- /dev/null +++ b/pysatNASA/instruments/maven_sep.py @@ -0,0 +1,139 @@ +# -*- 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. + +Accesses local data in CDF format. +Downlaods from CDAWeb. + +Properties +---------- +platform + 'maven' +name + 'sep' +tag + 's1','s2' + + +Examples +-------- +:: + import pysat + from pysat.utils import registry + registry.register_by_module(pysatNASA.instruments) + + + 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) +""" + +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 +from pysatNASA.instruments.methods import general as mm_nasa +from pysatNASA.instruments.methods import maven as mm_mvn + +# ---------------------------------------------------------------------------- +# Instrument attributes + +platform = 'maven' +name = 'sep' +tags = {'': ''} +inst_ids = {'': ['', 's1', 's2']} + +pandas_format = False + +# ---------------------------------------------------------------------------- +# Instrument test attributes + +_test_dates = {'': {'': dt.datetime(2020, 1, 1)}} + +# ---------------------------------------------------------------------------- +# Instrument methods + +# Use standard init routine +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 + + +# ---------------------------------------------------------------------------- +# Instrument functions +# +# Use the MAVEN and pysat methods + +# Set the list_files routine +fname = ''.join(('mvn_sep_l2_s1-cal-svy-full_{year:04d}{month:02d}{day:02d}_', + 'v{version:02d}_r{revision:02d}.cdf')) + +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}} + +list_files = functools.partial(mm_gen.list_files, + supported_tags=supported_tags) + +# Set the download routine +basic_tag = {'remote_dir': ''.join(('/pub/data/maven/sep/l2/s1-cal-svy-full', + '/{year:04d}/{month:02d}')), + 'fname': fname} + +basic_tag2 = {'remote_dir': ''.join(('/pub/data/maven/sep/l2/s2-cal-svy-full', + '/{year:04d}/{month:02d}')), + 'fname': fname2} + +download_tags = {'': {'': basic_tag, + 's1': basic_tag, + 's2': basic_tag2}} + +# Set the download routine +download = functools.partial(cdw.download, supported_tags=download_tags) + +# Set the list_remote_files routine +list_remote_files = functools.partial(cdw.list_remote_files, + 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) diff --git a/pysatNASA/instruments/methods/mvn.py b/pysatNASA/instruments/methods/maven.py similarity index 100% rename from pysatNASA/instruments/methods/mvn.py rename to pysatNASA/instruments/methods/maven.py From 587c023648ef2b0dd8fad1378b842ea6213ebace Mon Sep 17 00:00:00 2001 From: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:49:34 -0400 Subject: [PATCH 10/33] Apply suggestions from code review --- pysatNASA/instruments/__init__.py | 4 ++-- pysatNASA/tests/test_instruments.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index 87c5306b..016efdfc 100644 --- a/pysatNASA/instruments/__init__.py +++ b/pysatNASA/instruments/__init__.py @@ -11,8 +11,8 @@ '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_mag', - 'maven_insitu', 'omni_hro', + 'igs_gps', 'iss_fpmu', 'jpl_gps', 'maven_insitu', + 'maven_mag', 'maven_sep', 'omni_hro', 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] for inst in __all__: diff --git a/pysatNASA/tests/test_instruments.py b/pysatNASA/tests/test_instruments.py index a3fc7868..dea3dacb 100644 --- a/pysatNASA/tests/test_instruments.py +++ b/pysatNASA/tests/test_instruments.py @@ -8,7 +8,6 @@ import warnings -import pysat import pytest # Import the test classes from pysat From 37716dfa3e00f529956a9873157edc3983cb5390 Mon Sep 17 00:00:00 2001 From: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:51:32 -0400 Subject: [PATCH 11/33] Update pysatNASA/instruments/__init__.py --- pysatNASA/instruments/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysatNASA/instruments/__init__.py b/pysatNASA/instruments/__init__.py index 016efdfc..6f49e3ca 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', 'maven_mag', 'maven_sep', 'omni_hro', 'ses14_gold', 'timed_guvi', 'timed_saber', 'timed_see'] From d6ce40d95d13b596ab67afa75001de3a283e21cd Mon Sep 17 00:00:00 2001 From: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> Date: Wed, 6 Sep 2023 09:45:35 -0400 Subject: [PATCH 12/33] Fixing merge issues --- pysatNASA/instruments/de2_nacs.py | 1 - pysatNASA/instruments/de2_rpa.py | 1 - pysatNASA/instruments/de2_wats.py | 1 - 3 files changed, 3 deletions(-) diff --git a/pysatNASA/instruments/de2_nacs.py b/pysatNASA/instruments/de2_nacs.py index 2c2b33c1..ba949e95 100644 --- a/pysatNASA/instruments/de2_nacs.py +++ b/pysatNASA/instruments/de2_nacs.py @@ -62,7 +62,6 @@ None Supported - Warnings -------- - Currently no cleaning routine. diff --git a/pysatNASA/instruments/de2_rpa.py b/pysatNASA/instruments/de2_rpa.py index f1c7a2f7..aa97b66d 100644 --- a/pysatNASA/instruments/de2_rpa.py +++ b/pysatNASA/instruments/de2_rpa.py @@ -44,7 +44,6 @@ None Supported - Warnings -------- - Currently no cleaning routine. diff --git a/pysatNASA/instruments/de2_wats.py b/pysatNASA/instruments/de2_wats.py index 2266d4d6..5a784d24 100644 --- a/pysatNASA/instruments/de2_wats.py +++ b/pysatNASA/instruments/de2_wats.py @@ -59,7 +59,6 @@ None Supported - Warnings -------- - Currently no cleaning routine. From 30f375eb4728581f80e58e149fba31579bb978ae Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 10:20:13 -0400 Subject: [PATCH 13/33] Update supported_instruments.rst --- docs/supported_instruments.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/supported_instruments.rst b/docs/supported_instruments.rst index 0980414e..aee5aa03 100644 --- a/docs/supported_instruments.rst +++ b/docs/supported_instruments.rst @@ -178,6 +178,30 @@ JPL GPS .. automodule:: pysatNASA.instruments.jpl_gps :members: +.. _maven_insitu: + +MAVEN INSITU +-------- + +.. automodule:: pysatNASA.instruments.maven_insitu + :members: + +.. _maven_mag: + +MAVEN MAG +-------- + +.. automodule:: pysatNASA.instruments.maven_mag + :members: + +.. _maven_sep: + +MAVEN SEP +-------- + +.. automodules:: pysatNASA.instruments.maven_sep + :members: + .. _omni_hro: OMNI HRO From ed505df77fe4f6eb1a70e486e78eacb634ea69d4 Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 10:29:36 -0400 Subject: [PATCH 14/33] Update .zenodo.json --- .zenodo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 21d65586..6d54b11f 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -21,7 +21,7 @@ "orcid": "0000-0002-8191-4765" }, { - "affilitation":"University of Colorado at Boulder", + "affiliation":"University of Colorado at Boulder", "name": "Navarro, Luis", "orcid": "0000-0002-6362-6575" }, @@ -34,9 +34,9 @@ "orcid": "0000-0001-8340-5625" }, { - "affilitation":"University of Colorado at Boulder", - "name": "Navarro, Luis", - "orcid": "0000-0002-6362-6575" + "affiliation": "NASA Postdoctoral Program, Goddard Space Flight Center", + "name": "Esman, Teresa", + "orcid": "0000-0003-0382-6281" } ] } From fb5c4f9e839d1e52f1e7f90cef8990768176bc6a Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 10:58:53 -0400 Subject: [PATCH 15/33] Update maven_mag.py --- pysatNASA/instruments/maven_mag.py | 43 +++--------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/pysatNASA/instruments/maven_mag.py b/pysatNASA/instruments/maven_mag.py index 2cf79d91..d59f8c7e 100644 --- a/pysatNASA/instruments/maven_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- """Module for the MAVEN mag instrument. -Created by: Teresa Esman, NPP at GSFC - Supports the Magnetometer (MAG) onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. Accesses local data in CDF format. @@ -25,13 +23,7 @@ Examples -------- :: - - import pysat - from pysat.utils import registry - registry.register_by_module(pysatNASA.instruments) - - - mag = pysat.Instrument(platform='MAVEN', name='mag') + mag = pysat.Instrument(platform='maven', name='mag') mag.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) mag.load(2020, 1, use_header = True) @@ -67,18 +59,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 # ---------------------------------------------------------------------------- @@ -103,25 +85,6 @@ def clean(self): list_remote_files = functools.partial(cdw.list_remote_files, 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) From af0c6e8ae3dd66b1c95b51d8403c474ec21f9f50 Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:08:28 -0400 Subject: [PATCH 16/33] Apply suggestions from code review Co-authored-by: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> --- pysatNASA/instruments/maven_insitu.py | 45 ++++++--------------------- pysatNASA/instruments/maven_sep.py | 39 ++++------------------- 2 files changed, 16 insertions(+), 68 deletions(-) diff --git a/pysatNASA/instruments/maven_insitu.py b/pysatNASA/instruments/maven_insitu.py index f5642baf..67caed7f 100644 --- a/pysatNASA/instruments/maven_insitu.py +++ b/pysatNASA/instruments/maven_insitu.py @@ -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 ---------- @@ -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 @@ -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 # ---------------------------------------------------------------------------- @@ -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) diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 88d78529..49b45f40 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -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. @@ -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') @@ -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 @@ -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 # ---------------------------------------------------------------------------- @@ -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 From 31399d753c99f1c63e6a1900d7e6ef6a31fb11eb Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:47:12 -0400 Subject: [PATCH 17/33] Apply suggestions from code review --- pysatNASA/instruments/maven_insitu.py | 1 - pysatNASA/instruments/maven_mag.py | 4 +++- pysatNASA/instruments/maven_sep.py | 10 +++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pysatNASA/instruments/maven_insitu.py b/pysatNASA/instruments/maven_insitu.py index 67caed7f..13b92506 100644 --- a/pysatNASA/instruments/maven_insitu.py +++ b/pysatNASA/instruments/maven_insitu.py @@ -34,7 +34,6 @@ 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 from pysatNASA.instruments.methods import general as mm_nasa diff --git a/pysatNASA/instruments/maven_mag.py b/pysatNASA/instruments/maven_mag.py index d59f8c7e..a18b034c 100644 --- a/pysatNASA/instruments/maven_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -23,6 +23,9 @@ Examples -------- :: + import pysat + + mag = pysat.Instrument(platform='maven', name='mag') mag.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) mag.load(2020, 1, use_header = True) @@ -32,7 +35,6 @@ 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 from pysatNASA.instruments.methods import general as mm_nasa diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 49b45f40..3bd60b27 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -"""Module for the MAVEN insitu instrument. +"""Module for the MAVEN sep instrument. Supports the Solar Energetic Particle (SEP) data from onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. Accesses local data in CDF format. -Downlaods from CDAWeb. +Downloads from CDAWeb. Properties ---------- @@ -17,7 +17,6 @@ 's1','s2' inst_id None supported - Examples -------- @@ -28,12 +27,12 @@ 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) + """ 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 from pysatNASA.instruments.methods import general as mm_nasa @@ -104,9 +103,6 @@ list_remote_files = functools.partial(cdw.list_remote_files, supported_tags=download_tags) - - - # Set the load routine load = functools.partial(cdw.load, epoch_name='epoch', pandas_format=pandas_format, use_cdflib=True) From 3fed9d49bfb1470ecdcac14776bbe3360959c51e Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:52:44 -0400 Subject: [PATCH 18/33] Apply suggestions from code review White space, references --- pysatNASA/instruments/maven_mag.py | 4 +-- pysatNASA/instruments/maven_sep.py | 1 - pysatNASA/instruments/methods/maven.py | 50 ++++++++++++++++---------- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/pysatNASA/instruments/maven_mag.py b/pysatNASA/instruments/maven_mag.py index a18b034c..e108c460 100644 --- a/pysatNASA/instruments/maven_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -24,8 +24,8 @@ -------- :: import pysat - - + + mag = pysat.Instrument(platform='maven', name='mag') mag.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) mag.load(2020, 1, use_header = True) diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 3bd60b27..796db117 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -27,7 +27,6 @@ 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) - """ import datetime as dt diff --git a/pysatNASA/instruments/methods/maven.py b/pysatNASA/instruments/methods/maven.py index 3d27d489..e5ecb5e9 100644 --- a/pysatNASA/instruments/methods/maven.py +++ b/pysatNASA/instruments/methods/maven.py @@ -10,22 +10,34 @@ ' The Mars Atmosphere and Volatile Evolution', '(MAVEN) Mission. Space Sci Rev 195, 3–48 (2015).', ' https://doi.org/10.1007/s11214-015-0139-x')) -references = ''.join(('Connerney, J., and P. Lawton, MAVEN MAG', - ' PDS Archive SIS - This document ', - 'describes the format and content of the MAVEN', - ' Magnetometer (MAG) Planetary Data System ', - '(PDS) data archive. ', - 'It includes descriptions of the Standard', - 'Data Products and associated metadata, ', - 'and the volume archive format,', - 'content, and generation pipeline. ', - 'Connerney, J.E.P.; Espley, J.; Lawton, P.;', - ' Murphy, S.; Odom, J.; Oliversen, R.;', - 'and Sheppard, D., The MAVEN Magnetic Field', - ' Investigation, Space Sci Rev,', - 'Vol 195, Iss 1-4, pp.257-291, 2015. ', - 'doi:10.1007/s11214-015-0169-4', - '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': ''.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', + ' Magnetometer (MAG) Planetary Data System ', + '(PDS) data archive. ', + 'It includes descriptions of the Standard', + 'Data Products and associated metadata, ', + 'and the volume archive format,', + 'content, and generation pipeline. ', + 'Connerney, J.E.P.; Espley, J.; Lawton, P.;', + ' Murphy, S.; Odom, J.; Oliversen, R.;', + 'and Sheppard, D., The MAVEN Magnetic Field', + ' Investigation, Space Sci Rev,', + 'Vol 195, Iss 1-4, pp.257-291, 2015. ', + 'doi:10.1007/s11214-015-0169-4', + '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')), + 'sep': ''.join(('Larson, D.E., Lillis, R.J., Lee, C.O. et al.', + 'The MAVEN Solar Energetic Particle Investigation.', + ' Space Sci Rev 195, 153–172 (2015).', + ' https://doi.org/10.1007/s11214-015-0218-z', + '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'))} From 86e2fd8c0d028d8b4a66a3f5bd7312825f49369c Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:42:42 -0400 Subject: [PATCH 19/33] STY: reference indents fixed --- pysatNASA/instruments/methods/maven.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pysatNASA/instruments/methods/maven.py b/pysatNASA/instruments/methods/maven.py index e5ecb5e9..86ae78e0 100644 --- a/pysatNASA/instruments/methods/maven.py +++ b/pysatNASA/instruments/methods/maven.py @@ -11,10 +11,10 @@ '(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')), - 'mag': ''.join(('Connerney, J., and P. Lawton, MAVEN MAG', + ' 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', ' Magnetometer (MAG) Planetary Data System ', @@ -33,7 +33,7 @@ ' The Mars Atmosphere and Volatile Evolution', '(MAVEN) Mission. Space Sci Rev 195, 3–48 (2015).', ' https://doi.org/10.1007/s11214-015-0139-x')), - 'sep': ''.join(('Larson, D.E., Lillis, R.J., Lee, C.O. et al.', + 'sep': ''.join(('Larson, D.E., Lillis, R.J., Lee, C.O. et al.', 'The MAVEN Solar Energetic Particle Investigation.', ' Space Sci Rev 195, 153–172 (2015).', ' https://doi.org/10.1007/s11214-015-0218-z', From c09bca9c76f0262a40e933d730a195e66791ae02 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 7 Sep 2023 11:02:14 -0400 Subject: [PATCH 20/33] BUG: don't clean symmetric matrices --- pysatNASA/instruments/methods/general.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index 1d075c46..1bee292d 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -67,8 +67,10 @@ def clean(self): coords = [key for key in self.data.coords.keys()] for key in self.variables: + # Check for symmetric dims + unique_dims = len(self[key].dims) == len(np.unique(self[key].dims)) # Skip over the coordinates when cleaning - if key not in coords: + if key not in coords and unique_dims: fill = self.meta[key, self.meta.labels.fill_val] # Replace fill with nan From c1e0f885364a56705e7bf9a5fdb8e2991e155c16 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 7 Sep 2023 11:03:03 -0400 Subject: [PATCH 21/33] DOC: add rationale --- pysatNASA/instruments/methods/general.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index 1bee292d..f51c42b8 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -68,6 +68,7 @@ def clean(self): for key in self.variables: # Check for symmetric dims + # Indicates transformation matrix, xarray cannot broadcast unique_dims = len(self[key].dims) == len(np.unique(self[key].dims)) # Skip over the coordinates when cleaning if key not in coords and unique_dims: From f4630411bfb637d0c1c00729ea877634f115ea29 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 7 Sep 2023 11:03:59 -0400 Subject: [PATCH 22/33] DOC: update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1a0e0e9..7de10b56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). * MAVEN mag * MAVEN SEP * MAVEN in situ +* Bug Fixes + * Fix general clean routine to skip transformation matrices * Maintenance * Implemented unit tests for cleaning warnings * Use pip install for readthedocs From 2f3d9b156f36655d222a89fad172c8afeadbe914 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 7 Sep 2023 11:26:51 -0400 Subject: [PATCH 23/33] BUG: skip check for pandas --- pysatNASA/instruments/methods/general.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index f51c42b8..a58d4001 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -69,7 +69,12 @@ def clean(self): for key in self.variables: # Check for symmetric dims # Indicates transformation matrix, xarray cannot broadcast - unique_dims = len(self[key].dims) == len(np.unique(self[key].dims)) + if self.pands_format: + # True by default + unique_dims = True + else: + # Check for multiple dims + unique_dims = len(self[key].dims) == len(np.unique(self[key].dims)) # Skip over the coordinates when cleaning if key not in coords and unique_dims: fill = self.meta[key, self.meta.labels.fill_val] From 0d0b60fa3e2cc0285eef49f1986fa1441d1c1f4e Mon Sep 17 00:00:00 2001 From: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:01:45 -0400 Subject: [PATCH 24/33] Update pysatNASA/instruments/methods/general.py --- pysatNASA/instruments/methods/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index a58d4001..8dee2bbe 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -69,7 +69,7 @@ def clean(self): for key in self.variables: # Check for symmetric dims # Indicates transformation matrix, xarray cannot broadcast - if self.pands_format: + if self.pandas_format: # True by default unique_dims = True else: From f61b74ce2a4997d4c3db0943062440d20547f581 Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:54:41 -0400 Subject: [PATCH 25/33] Apply suggestions from code review STY Co-authored-by: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> --- docs/supported_instruments.rst | 6 +++--- pysatNASA/instruments/maven_insitu.py | 1 - pysatNASA/instruments/maven_mag.py | 3 ++- pysatNASA/instruments/maven_sep.py | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/supported_instruments.rst b/docs/supported_instruments.rst index aee5aa03..65468a3a 100644 --- a/docs/supported_instruments.rst +++ b/docs/supported_instruments.rst @@ -181,7 +181,7 @@ JPL GPS .. _maven_insitu: MAVEN INSITU --------- +------------ .. automodule:: pysatNASA.instruments.maven_insitu :members: @@ -189,7 +189,7 @@ MAVEN INSITU .. _maven_mag: MAVEN MAG --------- +--------- .. automodule:: pysatNASA.instruments.maven_mag :members: @@ -197,7 +197,7 @@ MAVEN MAG .. _maven_sep: MAVEN SEP --------- +--------- .. automodules:: pysatNASA.instruments.maven_sep :members: diff --git a/pysatNASA/instruments/maven_insitu.py b/pysatNASA/instruments/maven_insitu.py index 13b92506..85b78446 100644 --- a/pysatNASA/instruments/maven_insitu.py +++ b/pysatNASA/instruments/maven_insitu.py @@ -24,7 +24,6 @@ :: import pysat - 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) diff --git a/pysatNASA/instruments/maven_mag.py b/pysatNASA/instruments/maven_mag.py index e108c460..e1da225f 100644 --- a/pysatNASA/instruments/maven_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -14,6 +14,8 @@ 'mag' tag None supported +inst_id + None supported Warnings -------- @@ -25,7 +27,6 @@ :: import pysat - mag = pysat.Instrument(platform='maven', name='mag') mag.download(dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 31)) mag.load(2020, 1, use_header = True) diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 796db117..cd0e39ed 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -14,7 +14,7 @@ name 'sep' tag - 's1','s2' + ['', 's1', 's2'] inst_id None supported @@ -23,7 +23,6 @@ :: import pysat - 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) From 8474d74566ba3ec5bad2a8b4d77af19f3cf8da4b Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:28:35 -0400 Subject: [PATCH 26/33] Apply suggestions from code review Co-authored-by: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> --- pysatNASA/instruments/maven_insitu.py | 4 ++-- pysatNASA/instruments/maven_sep.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pysatNASA/instruments/maven_insitu.py b/pysatNASA/instruments/maven_insitu.py index 85b78446..dda55d99 100644 --- a/pysatNASA/instruments/maven_insitu.py +++ b/pysatNASA/instruments/maven_insitu.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Module for the MAVEN insitu instrument. +"""Module for the MAVEN insitu instruments. Supports the in situ Key Parameter (kp) data from multiple instruments onboard the Mars Atmosphere and Volatile Evolution (MAVEN) satellite. @@ -12,7 +12,7 @@ platform 'maven' name - 'insitu' + 'insitu_kp' tag None supported inst_id diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index cd0e39ed..cf269cdd 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -14,9 +14,9 @@ name 'sep' tag - ['', 's1', 's2'] -inst_id None supported +inst_id + ['s1', 's2'] Examples -------- 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 27/33] 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', From a5a46720bd65ccf35792a3d0223bd30f2a3adc63 Mon Sep 17 00:00:00 2001 From: Jeff Klenzing Date: Mon, 2 Oct 2023 11:37:30 -0400 Subject: [PATCH 28/33] STY: update clean routine --- pysatNASA/instruments/methods/general.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index 8dee2bbe..26dc293f 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -51,9 +51,14 @@ def init(self, module, name): return -def clean(self): +def clean(self, skip_names=None): """Clean data to the specified level. + Parameters + ---------- + skip_names : list of str + List of names to skip for cleaning. (default=None) + Note ---- Basic cleaning to replace fill values with NaN @@ -62,21 +67,20 @@ def clean(self): # Get a list of coords for the data if self.pandas_format: - coords = [self.data.index.name] + skip_key = [self.data.index.name] else: - coords = [key for key in self.data.coords.keys()] + skip_key = [key for key in self.data.coords.keys()] + + if skip_names: + # Add additional variable names to skip + for key in skip_names: + skip_key.append(key) for key in self.variables: # Check for symmetric dims # Indicates transformation matrix, xarray cannot broadcast - if self.pandas_format: - # True by default - unique_dims = True - else: - # Check for multiple dims - unique_dims = len(self[key].dims) == len(np.unique(self[key].dims)) # Skip over the coordinates when cleaning - if key not in coords and unique_dims: + if key not in skip_key: fill = self.meta[key, self.meta.labels.fill_val] # Replace fill with nan From c8a27a6226e3f39b1c17cca3e2643a27c59769c2 Mon Sep 17 00:00:00 2001 From: Jeff Klenzing Date: Mon, 2 Oct 2023 11:42:31 -0400 Subject: [PATCH 29/33] STY: apply to insitu kp --- pysatNASA/instruments/maven_insitu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pysatNASA/instruments/maven_insitu.py b/pysatNASA/instruments/maven_insitu.py index dda55d99..229bdf78 100644 --- a/pysatNASA/instruments/maven_insitu.py +++ b/pysatNASA/instruments/maven_insitu.py @@ -61,7 +61,9 @@ # Use default clean -clean = mm_nasa.clean +clean = functools.partial(mm_nasa.clean, + skip_names=['Rotation_matrix_IAU_MARS_MAVEN_MSO', + 'Rotation_matrix_SPACECRAFT_MAVEN_MSO']) # ---------------------------------------------------------------------------- From 857d8483bc6f40a1c86386c8853895f7e2700085 Mon Sep 17 00:00:00 2001 From: Jeff Klenzing Date: Mon, 2 Oct 2023 13:08:36 -0400 Subject: [PATCH 30/33] DOC: update comments --- pysatNASA/instruments/methods/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index 26dc293f..16326279 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -65,7 +65,7 @@ def clean(self, skip_names=None): """ - # Get a list of coords for the data + # Get a list of coords for the data. These should be skipped for cleaning. if self.pandas_format: skip_key = [self.data.index.name] else: From 7ba9ffbdf8202da1b70ac932cbf9980f22c42a02 Mon Sep 17 00:00:00 2001 From: Jeff Klenzing Date: Mon, 2 Oct 2023 13:11:11 -0400 Subject: [PATCH 31/33] BUG: fix test dates --- pysatNASA/instruments/maven_sep.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 3ce0ca4b..53deca1a 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -23,9 +23,10 @@ :: import pysat - insitu = pysat.Instrument(platform='maven', name='sep', inst_id = 's1') + 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) + insitu.load(2020, 1, use_header=True) + """ import datetime as dt @@ -49,7 +50,7 @@ # ---------------------------------------------------------------------------- # Instrument test attributes -_test_dates = {'': {'': dt.datetime(2020, 1, 1)}} +_test_dates = {id: {'': dt.datetime(2020, 1, 1)} for id in inst_ids.keys()} # ---------------------------------------------------------------------------- # Instrument methods From d65734b0b8d0e74cf1379d198a662837f8cf4a63 Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:25:13 -0400 Subject: [PATCH 32/33] Apply suggestions from code review Co-authored-by: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> --- pysatNASA/instruments/maven_insitu_kp.py | 2 +- pysatNASA/instruments/maven_mag.py | 2 +- pysatNASA/instruments/maven_sep.py | 4 ++-- pysatNASA/instruments/methods/maven.py | 23 ++++++++--------------- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/pysatNASA/instruments/maven_insitu_kp.py b/pysatNASA/instruments/maven_insitu_kp.py index 0a529e6b..cace6a75 100644 --- a/pysatNASA/instruments/maven_insitu_kp.py +++ b/pysatNASA/instruments/maven_insitu_kp.py @@ -43,7 +43,7 @@ platform = 'maven' name = 'insitu_kp' -tags = {'': ''} +tags = {'': 'in situ Key Parameter data'} inst_ids = {'': ['']} pandas_format = False diff --git a/pysatNASA/instruments/maven_mag.py b/pysatNASA/instruments/maven_mag.py index e1da225f..c1125bd7 100644 --- a/pysatNASA/instruments/maven_mag.py +++ b/pysatNASA/instruments/maven_mag.py @@ -46,7 +46,7 @@ platform = 'maven' name = 'mag' -tags = {'': 'l2'} +tags = {'': 'Level 2 magnetometer data'} inst_ids = {'': ['']} pandas_format = False diff --git a/pysatNASA/instruments/maven_sep.py b/pysatNASA/instruments/maven_sep.py index 3ce0ca4b..7454961c 100644 --- a/pysatNASA/instruments/maven_sep.py +++ b/pysatNASA/instruments/maven_sep.py @@ -41,7 +41,7 @@ platform = 'maven' name = 'sep' -tags = {'': ''} +tags = {'': 'Level 2 Solar Energetic Particle data'} inst_ids = {'s1': [''], 's2': ['']} pandas_format = False @@ -49,7 +49,7 @@ # ---------------------------------------------------------------------------- # Instrument test attributes -_test_dates = {'': {'': dt.datetime(2020, 1, 1)}} +_test_dates = {id: {'': dt.datetime(2020, 1, 1)} for id in inst_ids.keys()} # ---------------------------------------------------------------------------- # Instrument methods diff --git a/pysatNASA/instruments/methods/maven.py b/pysatNASA/instruments/methods/maven.py index 69cec2ae..d6a5aa6f 100644 --- a/pysatNASA/instruments/methods/maven.py +++ b/pysatNASA/instruments/methods/maven.py @@ -10,11 +10,12 @@ ' 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')), +refs = {'mission': ''.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')), + 'insitu_kp': '', 'mag': ''.join(('Connerney, J., and P. Lawton, MAVEN MAG', ' PDS Archive SIS - This document ', 'describes the format and content of the MAVEN', @@ -29,16 +30,8 @@ 'and Sheppard, D., The MAVEN Magnetic Field', ' Investigation, Space Sci Rev,', 'Vol 195, Iss 1-4, pp.257-291, 2015. ', - 'doi:10.1007/s11214-015-0169-4', - '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')), + 'doi:10.1007/s11214-015-0169-4')), 'sep': ''.join(('Larson, D.E., Lillis, R.J., Lee, C.O. et al.', 'The MAVEN Solar Energetic Particle Investigation.', ' Space Sci Rev 195, 153–172 (2015).', - ' https://doi.org/10.1007/s11214-015-0218-z', - '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'))} + ' https://doi.org/10.1007/s11214-015-0218-z'))} From bf3e2767f9434858cd7734b53e7e080445d776ed Mon Sep 17 00:00:00 2001 From: Tracy Esman <21086818+t-esman@users.noreply.github.com> Date: Wed, 4 Oct 2023 20:55:10 -0400 Subject: [PATCH 33/33] Apply suggestions from code review Co-authored-by: Jeff Klenzing <19592220+jklenzing@users.noreply.github.com> --- CHANGELOG.md | 2 +- docs/supported_instruments.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de10b56..98b59f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). * New Instruments * MAVEN mag * MAVEN SEP - * MAVEN in situ + * MAVEN in situ key parameters * Bug Fixes * Fix general clean routine to skip transformation matrices * Maintenance diff --git a/docs/supported_instruments.rst b/docs/supported_instruments.rst index 65468a3a..0ab3a7b4 100644 --- a/docs/supported_instruments.rst +++ b/docs/supported_instruments.rst @@ -178,12 +178,12 @@ JPL GPS .. automodule:: pysatNASA.instruments.jpl_gps :members: -.. _maven_insitu: +.. _maven_insitu_kp: -MAVEN INSITU ------------- +MAVEN INSITU KP +--------------- -.. automodule:: pysatNASA.instruments.maven_insitu +.. automodule:: pysatNASA.instruments.maven_insitu_kp :members: .. _maven_mag: