From b88e2c79c737defc87bbc4837b388afa87f1ffb4 Mon Sep 17 00:00:00 2001 From: Maxine Hartnett <117409426+maxinelasp@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:05:08 -0700 Subject: [PATCH] Glows L2 initial setup (#1156) * Setting up * first pass at making histl2 dataclass * L2 processing updates * Renaming variance variables to std_dev * fixing flag dimensions * WIP L2 * Removing unneeded files * Updating docs * Updating docs * mypy ignore * Fixing docs --- .../config/imap_glows_l1b_variable_attrs.yaml | 72 +++++----- imap_processing/glows/l1b/glows_l1b.py | 6 +- imap_processing/glows/l1b/glows_l1b_data.py | 96 ++++++++------ imap_processing/glows/l2/glows_l2_data.py | 123 ++++++++++++++++++ imap_processing/mag/l1b/mag_l1b.py | 1 - imap_processing/tests/glows/conftest.py | 6 + imap_processing/tests/glows/test_glows_l1b.py | 18 +-- .../tests/glows/test_glows_l1b_data.py | 18 +-- .../tests/glows/test_glows_l2_data.py | 0 9 files changed, 245 insertions(+), 95 deletions(-) create mode 100644 imap_processing/glows/l2/glows_l2_data.py create mode 100644 imap_processing/tests/glows/test_glows_l2_data.py diff --git a/imap_processing/cdf/config/imap_glows_l1b_variable_attrs.yaml b/imap_processing/cdf/config/imap_glows_l1b_variable_attrs.yaml index fd26dfbe8..9a5af066f 100644 --- a/imap_processing/cdf/config/imap_glows_l1b_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_glows_l1b_variable_attrs.yaml @@ -251,13 +251,13 @@ filter_temperature_average: LABLAXIS: Avgd Temperature VALIDMAX: 255 -filter_temperature_variance: +filter_temperature_std_dev: <<: *support_data_defaults - CATDESC: spin-block-averaged variance of filter temperature - FIELDNAM: Variance of filter temperature + CATDESC: spin-block-averaged std_dev of filter temperature + FIELDNAM: std_dev of filter temperature FILLVAL: *max_uint32 FORMAT: I6 - LABLAXIS: Variance + LABLAXIS: std_dev VALIDMAX: *max_uint16 hv_voltage_average: @@ -269,12 +269,12 @@ hv_voltage_average: LABLAXIS: Avg voltage VALIDMAX: *max_uint16 -hv_voltage_variance: +hv_voltage_std_dev: <<: *support_data_defaults - CATDESC: variance of HV voltage on the CEM, uint encoded - FIELDNAM: HV voltage variance + CATDESC: std_dev of HV voltage on the CEM, uint encoded + FIELDNAM: HV voltage std_dev FILLVAL: *int_fillval - LABLAXIS: Variance + LABLAXIS: std_dev VALIDMAX: *max_uint32 spin_period_average: @@ -291,13 +291,13 @@ spin_period_average: VALIDMIN: 45000 # TBC 14.63 s where 20.9712 s = 65535, rounded down VAR_TYPE: support_data -spin_period_variance: +spin_period_std_dev: <<: *support_data_defaults - CATDESC: spin-block-averaged variance of spin period - FIELDNAM: variance of spin period + CATDESC: spin-block-averaged std_dev of spin period + FIELDNAM: std_dev of spin period FILLVAL: *int_fillval FORMAT: I10 - LABLAXIS: Variance + LABLAXIS: std_dev VALIDMAX: *max_uint32 # TODO review these @@ -315,13 +315,13 @@ spin_period_ground_average: VALIDMIN: 45000 # TBC 14.63 s where 20.9712 s = 65535, rounded down VAR_TYPE: support_data -spin_period_ground_variance: +spin_period_ground_std_dev: <<: *support_data_defaults - CATDESC: spin-block-averaged variance of spin period on ground - FIELDNAM: ground variance of spin period + CATDESC: spin-block-averaged std_dev of spin period on ground + FIELDNAM: ground std_dev of spin period FILLVAL: *int_fillval FORMAT: I10 - LABLAXIS: Variance + LABLAXIS: std_dev VALIDMAX: *max_uint32 pulse_length_average: @@ -333,13 +333,13 @@ pulse_length_average: LABLAXIS: Avg pulse len VALIDMAX: 255 -pulse_length_variance: +pulse_length_std_dev: <<: *support_data_defaults - CATDESC: spin-block-averaged variance of pulse length - FIELDNAM: Variance of pulse length + CATDESC: spin-block-averaged std_dev of pulse length + FIELDNAM: std_dev of pulse length FILLVAL: *max_uint32 FORMAT: I10 - LABLAXIS: Variance + LABLAXIS: std_dev VALIDMAX: *max_uint16 position_angle_offset_average: @@ -350,21 +350,21 @@ position_angle_offset_average: FORMAT: I4 LABLAXIS: Avg pos angle -position_angle_offset_variance: +position_angle_offset_std_dev: <<: *support_data_defaults - CATDESC: spin-block averaged variance of position angle offset - FIELDNAM: Variance of position angle offset + CATDESC: spin-block averaged std_dev of position angle offset + FIELDNAM: std_dev of position angle offset FILLVAL: *max_uint16 FORMAT: I4 - LABLAXIS: Variance + LABLAXIS: std_dev -spin_axis_orientation_variance: +spin_axis_orientation_std_dev: <<: *support_data_defaults - CATDESC: spin-block averaged variance of spin axis orientation - FIELDNAM: Variance of spin axis orientation + CATDESC: spin-block averaged std_dev of spin axis orientation + FIELDNAM: std_dev of spin axis orientation FILLVAL: *max_uint16 FORMAT: I4 - LABLAXIS: Variance + LABLAXIS: std_dev spin_axis_orientation_average: <<: *support_data_defaults @@ -383,14 +383,14 @@ spacecraft_location_average: FORMAT: I4 LABLAXIS: Avg spacecraft location -spacecraft_location_variance: +spacecraft_location_std_dev: <<: *support_data_defaults DEPEND_1: ecliptic - CATDESC: spin-block averaged variance of spacecraft location - FIELDNAM: Variance of spacecraft location + CATDESC: spin-block averaged std_dev of spacecraft location + FIELDNAM: std_dev of spacecraft location FILLVAL: *max_uint16 FORMAT: I4 - LABLAXIS: Variance + LABLAXIS: std_dev spacecraft_velocity_average: <<: *support_data_defaults @@ -401,14 +401,14 @@ spacecraft_velocity_average: FORMAT: I4 LABLAXIS: Avg spacecraft velocity -spacecraft_velocity_variance: +spacecraft_velocity_std_dev: <<: *support_data_defaults DEPEND_1: ecliptic - CATDESC: spin-block averaged variance of spacecraft velocity - FIELDNAM: Variance of spacecraft velocity + CATDESC: spin-block averaged std_dev of spacecraft velocity + FIELDNAM: std_dev of spacecraft velocity FILLVAL: *max_uint16 FORMAT: I4 - LABLAXIS: Variance + LABLAXIS: std_dev # End of not-in--dicts in generate_de_dataset diff --git a/imap_processing/glows/l1b/glows_l1b.py b/imap_processing/glows/l1b/glows_l1b.py index ab6451b47..0629bee3c 100644 --- a/imap_processing/glows/l1b/glows_l1b.py +++ b/imap_processing/glows/l1b/glows_l1b.py @@ -255,10 +255,10 @@ def process_histogram(l1a: xr.Dataset) -> xr.Dataset: "imap_spin_angle_bin_cntr": ["bins"], "histogram_flag_array": ["bad_angle_flags", "bins"], "spacecraft_location_average": ["ecliptic"], - "spacecraft_location_variance": ["ecliptic"], + "spacecraft_location_std_dev": ["ecliptic"], "spacecraft_velocity_average": ["ecliptic"], - "spacecraft_velocity_variance": ["ecliptic"], - "flags": ["flag_dim", "bins"], + "spacecraft_velocity_std_dev": ["ecliptic"], + "flags": ["flag_dim"], } # For each attribute, retrieve the dims from output_dimension_mapping or use an diff --git a/imap_processing/glows/l1b/glows_l1b_data.py b/imap_processing/glows/l1b/glows_l1b_data.py index 0aa82649d..888559c78 100644 --- a/imap_processing/glows/l1b/glows_l1b_data.py +++ b/imap_processing/glows/l1b/glows_l1b_data.py @@ -417,19 +417,19 @@ class HistogramL1B: IMAP spin angle ψ for bin centers filter_temperature_average block-averaged value, decoded to Celsius degrees using Eq. (47) - filter_temperature_variance + filter_temperature_std_dev standard deviation (1 sigma), decoded to Celsius degrees using Eq. (51) hv_voltage_average block-averaged value, decoded to volts using Eq. (47) - hv_voltage_variance + hv_voltage_std_dev standard deviation (1 sigma), decoded to volts using Eq. (51) spin_period_average block-averaged onboard value, decoded to seconds using Eq. (47) - spin_period_variance + spin_period_std_dev standard deviation (1 sigma), decoded to seconds using Eq. (51) pulse_length_average block-averaged value, decoded to μs using Eq. (47) - pulse_length_variance + pulse_length_std_dev standard deviation (1 sigma), decoded to μs using Eq. (51) glows_start_time GLOWS clock, subseconds as decimal part of float @@ -444,24 +444,24 @@ class HistogramL1B: is_inside_excluded_region, is_excluded_by_instr_team, is_suspected_transient] spin_period_ground_average block-averaged value computed on ground - spin_period_ground_variance + spin_period_ground_std_dev standard deviation (1 sigma) position_angle_offset_average block-averaged value in degrees - position_angle_offset_variance + position_angle_offset_std_dev standard deviation (1 sigma) - spin_axis_orientation_variance + spin_axis_orientation_std_dev standard deviation( 1 sigma): ∆λ, ∆φ for ⟨λ⟩, ⟨φ⟩ spin_axis_orientation_average block-averaged spin-axis ecliptic longitude ⟨λ⟩ and latitude ⟨φ⟩ in degrees spacecraft_location_average block-averaged Cartesian ecliptic coordinates ⟨X⟩, ⟨Y ⟩, ⟨Z⟩ [km] of IMAP - spacecraft_location_variance + spacecraft_location_std_dev standard deviations (1 sigma) ∆X, ∆Y , ∆Z for ⟨X⟩, ⟨Y ⟩, ⟨Z⟩ spacecraft_velocity_average block-averaged values ⟨VX⟩, ⟨VY⟩, ⟨VZ⟩ [km/s] of IMAP velocity components (Cartesian ecliptic frame) - spacecraft_velocity_variance + spacecraft_velocity_std_dev standard deviations (1 sigma) ∆VX , ∆VY , ∆VZ for ⟨VX ⟩, ⟨VY ⟩, ⟨VZ ⟩ flags flags for extra information, per histogram. This should be a human-readable @@ -470,9 +470,7 @@ class HistogramL1B: histogram: np.ndarray flight_software_version: str - # pkts_file_name: str TODO: add this in L0 seq_count_in_pkts_file: int - # l1a_file_name: str TODO: add this # ancillary_data_files: np.ndarray TODO Add this first_spin_id: int last_spin_id: int @@ -482,13 +480,17 @@ class HistogramL1B: number_of_bins_per_histogram: int number_of_events: int filter_temperature_average: np.double - filter_temperature_variance: np.double + filter_temperature_variance: InitVar[np.double] + filter_temperature_std_dev: np.double = field(init=False) hv_voltage_average: np.double - hv_voltage_variance: np.double + hv_voltage_variance: InitVar[np.double] + hv_voltage_std_dev: np.double = field(init=False) spin_period_average: np.double - spin_period_variance: np.double + spin_period_variance: InitVar[np.double] + spin_period_std_dev: np.double = field(init=False) pulse_length_average: np.double - pulse_length_variance: np.double + pulse_length_variance: InitVar[np.double] + pulse_length_std_dev: np.double = field(init=False) imap_start_time: np.double # No conversion needed from l1a->l1b imap_time_offset: np.double # No conversion needed from l1a->l1b glows_start_time: np.double # No conversion needed from l1a->l1b @@ -499,40 +501,60 @@ class HistogramL1B: imap_spin_angle_bin_cntr: np.ndarray = field(init=False) # Same size as bins histogram_flag_array: np.ndarray = field(init=False) spin_period_ground_average: np.double = field(init=False) # retrieved from SPICE? - spin_period_ground_variance: np.double = field(init=False) # retrieved from SPICE? + spin_period_ground_std_dev: np.double = field(init=False) # retrieved from SPICE? position_angle_offset_average: np.double = field(init=False) # retrieved from SPICE - position_angle_offset_variance: np.double = field(init=False) # from SPICE - spin_axis_orientation_variance: np.double = field(init=False) # from SPICE + position_angle_offset_std_dev: np.double = field(init=False) # from SPICE + spin_axis_orientation_std_dev: np.double = field(init=False) # from SPICE spin_axis_orientation_average: np.double = field(init=False) # retrieved from SPICE spacecraft_location_average: np.ndarray = field(init=False) # retrieved from SPIC - spacecraft_location_variance: np.ndarray = field(init=False) # retrieved from SPIC + spacecraft_location_std_dev: np.ndarray = field(init=False) # retrieved from SPIC spacecraft_velocity_average: np.ndarray = field(init=False) # retrieved from SPIC - spacecraft_velocity_variance: np.ndarray = field(init=False) # retrieved from SPIC + spacecraft_velocity_std_dev: np.ndarray = field(init=False) # retrieved from SPIC flags: np.ndarray = field(init=False) # TODO: # - Determine a good way to output flags as "human readable" # - Add spice pieces - # - add in the filenames for the input files - should they be global attributes? # - also unique identifiers # - Bad angle algorithm using SPICE locations # - Move ancillary file to AWS - def __post_init__(self) -> None: - """Will process data.""" + def __post_init__( + self, + filter_temperature_variance: np.double, + hv_voltage_variance: np.double, + spin_period_variance: np.double, + pulse_length_variance: np.double, + ) -> None: + """ + Will process data. + + The input variance values are used to calculate the output standard deviation. + + Parameters + ---------- + filter_temperature_variance : numpy.double + Encoded filter temperature variance. + hv_voltage_variance : numpy.double + Encoded HV voltage variance. + spin_period_variance : numpy.double + Encoded spin period variance. + pulse_length_variance : numpy.double + Encoded pulse length variance. + """ # self.histogram_flag_array = np.zeros((2,)) # TODO: These pieces will need to be filled in from SPICE kernels. For now, # they are placeholders. GLOWS example code has better placeholders if needed. self.spin_period_ground_average = np.double(-999.9) - self.spin_period_ground_variance = np.double(-999.9) + self.spin_period_ground_std_dev = np.double(-999.9) self.position_angle_offset_average = np.double(-999.9) - self.position_angle_offset_variance = np.double(-999.9) - self.spin_axis_orientation_variance = np.double(-999.9) + self.position_angle_offset_std_dev = np.double(-999.9) + self.spin_axis_orientation_std_dev = np.double(-999.9) self.spin_axis_orientation_average = np.double(-999.9) self.spacecraft_location_average = np.array([-999.9, -999.9, -999.9]) - self.spacecraft_location_variance = np.array([-999.9, -999.9, -999.9]) + self.spacecraft_location_std_dev = np.array([-999.9, -999.9, -999.9]) self.spacecraft_velocity_average = np.array([-999.9, -999.9, -999.9]) - self.spacecraft_velocity_variance = np.array([-999.9, -999.9, -999.9]) + self.spacecraft_velocity_std_dev = np.array([-999.9, -999.9, -999.9]) # Will require some additional inputs self.imap_spin_angle_bin_cntr = np.zeros((3600,)) @@ -546,34 +568,34 @@ def __post_init__(self) -> None: self.filter_temperature_average = self.ancillary_parameters.decode( "filter_temperature", self.filter_temperature_average ) - self.filter_temperature_variance = self.ancillary_parameters.decode_std_dev( - "filter_temperature", self.filter_temperature_variance + self.filter_temperature_std_dev = self.ancillary_parameters.decode_std_dev( + "filter_temperature", filter_temperature_variance ) self.hv_voltage_average = self.ancillary_parameters.decode( "hv_voltage", self.hv_voltage_average ) - self.hv_voltage_variance = self.ancillary_parameters.decode_std_dev( - "hv_voltage", self.hv_voltage_variance + self.hv_voltage_std_dev = self.ancillary_parameters.decode_std_dev( + "hv_voltage", hv_voltage_variance ) self.spin_period_average = self.ancillary_parameters.decode( "spin_period", self.spin_period_average ) - self.spin_period_variance = self.ancillary_parameters.decode_std_dev( - "spin_period", self.spin_period_variance + self.spin_period_std_dev = self.ancillary_parameters.decode_std_dev( + "spin_period", spin_period_variance ) self.pulse_length_average = self.ancillary_parameters.decode( "pulse_length", self.pulse_length_average ) - self.pulse_length_variance = self.ancillary_parameters.decode_std_dev( - "pulse_length", self.pulse_length_variance + self.pulse_length_std_dev = self.ancillary_parameters.decode_std_dev( + "pulse_length", pulse_length_variance ) self.histogram_flag_array = np.zeros((4, 3600), dtype=np.uint8) # self.unique_block_identifier = np.datetime_as_string( # np.datetime64(int(self.imap_start_time), "ns"), "s" # ) - self.flags = np.zeros((17, 3600), dtype=np.uint8) + self.flags = np.ones((17,), dtype=np.uint8) def output_data(self) -> tuple: """ diff --git a/imap_processing/glows/l2/glows_l2_data.py b/imap_processing/glows/l2/glows_l2_data.py new file mode 100644 index 000000000..b84e02d71 --- /dev/null +++ b/imap_processing/glows/l2/glows_l2_data.py @@ -0,0 +1,123 @@ +"""Module containing the class definition for the HistogramL2 class.""" + +from dataclasses import InitVar, dataclass, field + +import numpy as np + + +@dataclass +class HistogramL2: + """ + Dataclass describing Histogram L2 data variables and methods. + + This class collects multiple HistogramL1B classes into one L2 per observational day. + + flight_software_version : str + number_of_good_l1b_inputs : int + number of good-time Level-1B times used for generation of Level-2 data + total_l1b_inputs : int + number of all Level-1B times for observational day + identifier : int + unique Level-2 histogram identifier + start_time : numpy.double + UTC start time of a given observational day + end_time : numpy.double + UTC end time of a given observational day + daily_lightcurve : numpy.ndarray + arrays for observational-day-accumulated lightcurve + filter_temperature_average : numpy.ndarray + observational-day-averaged filter temperature [Celsius deg] + filter_temperature_variance : numpy.ndarray + standard deviation for filter temperature [Celsius deg] + hv_voltage_average : numpy.ndarray + observational-day-averaged channeltron voltage [volt] + hv_voltage_variance : numpy.ndarray + standard deviation for channeltron voltage [volt] + spin_period_average : numpy.ndarray + observational-day-averaged spin period [s] (onboard value) + spin_period_variance : numpy.ndarray + a standard deviation for spin period [s] + pulse_length_average : numpy.ndarray + observational-day-averaged pulse length [μs] + pulse_length_variance : numpy.ndarray + standard deviation for pulse length [μs] + spin_period_ground_average : numpy.ndarray + observational-day-averaged spin period [s] (ground value) + spin_period_ground_variance : numpy.ndarray + a standard deviation for spin period [s] + position_angle_offset_average : numpy.ndarray + observational-day-averaged GLOWS angular offset [deg] + position_angle_offset_variance : numpy.ndarray + standard deviation for GLOWS angular offset [seg] + spin_axis_orientation_variance : numpy.ndarray + standard deviation for spin-axis longitude and latitude [deg] + spacecraft_location_variance : numpy.ndarray + standard deviation for ecliptic coordinates [km] of IMAP + spacecraft_velocity_variance : numpy.ndarray + standard deviation for IMAP velocity components [km/s] + spin_axis_orientation_average : numpy.ndarray + observational-day-averaged spin-axis ecliptic longitude and latitude [deg] + spacecraft_location_average : numpy.ndarray + observational-day-averaged Cartesian ecliptic coordinates ⟨X⟩, ⟨Y ⟩, ⟨Z⟩ [km] + of IMAP + spacecraft_velocity_average : numpy.ndarray + observational-day-averaged values ⟨VX ⟩, ⟨VY ⟩, ⟨VZ ⟩ of IMAP velocity + components [km/s] (Cartesian ecliptic frame) + bad_time_flag_occurrences : numpy.ndarray + numbers of occurrences of blocks for each bad-time flag during observational day + """ + + flight_software_version: str + number_of_good_l1b_inputs: int + total_l1b_inputs: int + # identifier: int # comes from unique_block_identifier + start_time: np.double + end_time: np.double + daily_lightcurve: np.ndarray = field(init=False) + filter_temperature_average: np.ndarray[np.double] + filter_temperature_std_dev: np.ndarray[np.double] + hv_voltage_average: np.ndarray[np.double] + hv_voltage_std_dev: np.ndarray[np.double] + spin_period_average: np.ndarray[np.double] + spin_period_std_dev: np.ndarray[np.double] + pulse_length_average: np.ndarray[np.double] + pulse_length_std_dev: np.ndarray[np.double] + spin_period_ground_average: np.ndarray[np.double] + spin_period_ground_std_dev: np.ndarray[np.double] + position_angle_offset_average: np.ndarray[np.double] + position_angle_offset_std_dev: np.ndarray[np.double] + spin_axis_orientation_std_dev: np.ndarray[np.double] + spacecraft_location_std_dev: np.ndarray[np.double] + spacecraft_velocity_std_dev: np.ndarray[np.double] + spin_axis_orientation_average: np.ndarray[np.double] + spacecraft_location_average: np.ndarray[np.double] + spacecraft_velocity_average: np.ndarray[np.double] + bad_time_flag_occurrences: np.ndarray + histogram: InitVar[np.ndarray] + + def __post_init__(self, histogram: np.ndarray) -> None: + """ + Post-initialization method to generate the daily light curve from one histogram. + + Parameters + ---------- + histogram : numpy.ndarray + Histogram data from L1B, of shape (bins,) where bins is nominally 3600. + """ + self.daily_lightcurve = self.generate_lightcurve(histogram) + + def generate_lightcurve(self, histogram: np.ndarray) -> np.ndarray: + """ + Given an array of (n, bins) histograms, generate one lightcurve of size (bins). + + Parameters + ---------- + histogram : numpy.ndarray + Histogram data from L1B, of shape (bins,) where bins is nominally 3600. + + Returns + ------- + numpy.ndarray + Lightcurve of size (bins). + """ + return np.zeros(3600) # type: ignore[no-any-return] diff --git a/imap_processing/mag/l1b/mag_l1b.py b/imap_processing/mag/l1b/mag_l1b.py index bd34fabbf..2c13c7726 100644 --- a/imap_processing/mag/l1b/mag_l1b.py +++ b/imap_processing/mag/l1b/mag_l1b.py @@ -189,5 +189,4 @@ def calibrate_vector( updated_vector[:3] = np.matmul( input_vector[:3], calibration_matrix.values[:, :, int(input_vector[3])] ) - return updated_vector diff --git a/imap_processing/tests/glows/conftest.py b/imap_processing/tests/glows/conftest.py index 8e6fecb39..0c6fc2eb1 100644 --- a/imap_processing/tests/glows/conftest.py +++ b/imap_processing/tests/glows/conftest.py @@ -6,6 +6,7 @@ from imap_processing.glows.l0 import decom_glows from imap_processing.glows.l1a.glows_l1a import glows_l1a, process_de_l0 from imap_processing.glows.l1a.glows_l1a_data import HistogramL1A +from imap_processing.glows.l1b.glows_l1b import glows_l1b @pytest.fixture() @@ -40,3 +41,8 @@ def l1a_test_data(decom_test_data): @pytest.fixture() def l1a_dataset(packet_path): return glows_l1a(packet_path, "v001") + + +@pytest.fixture() +def l1b_hist_dataset(l1a_dataset): + return glows_l1b(l1a_dataset[0], "v001") diff --git a/imap_processing/tests/glows/test_glows_l1b.py b/imap_processing/tests/glows/test_glows_l1b.py index 47ebf3462..44b2606fe 100644 --- a/imap_processing/tests/glows/test_glows_l1b.py +++ b/imap_processing/tests/glows/test_glows_l1b.py @@ -318,23 +318,23 @@ def test_glows_l1b(de_dataset, hist_dataset): "imap_spin_angle_bin_cntr", "histogram_flag_array", "filter_temperature_average", - "filter_temperature_variance", + "filter_temperature_std_dev", "hv_voltage_average", - "hv_voltage_variance", + "hv_voltage_std_dev", "spin_period_average", - "spin_period_variance", + "spin_period_std_dev", "pulse_length_average", - "pulse_length_variance", + "pulse_length_std_dev", "spin_period_ground_average", - "spin_period_ground_variance", + "spin_period_ground_std_dev", "position_angle_offset_average", - "position_angle_offset_variance", - "spin_axis_orientation_variance", + "position_angle_offset_std_dev", + "spin_axis_orientation_std_dev", "spin_axis_orientation_average", "spacecraft_location_average", - "spacecraft_location_variance", + "spacecraft_location_std_dev", "spacecraft_velocity_average", - "spacecraft_velocity_variance", + "spacecraft_velocity_std_dev", "flags", ] diff --git a/imap_processing/tests/glows/test_glows_l1b_data.py b/imap_processing/tests/glows/test_glows_l1b_data.py index fe3a4ff86..f01833132 100644 --- a/imap_processing/tests/glows/test_glows_l1b_data.py +++ b/imap_processing/tests/glows/test_glows_l1b_data.py @@ -102,24 +102,24 @@ def test_validation_data_histogram(l1a_dataset): # "imap_spin_angle_bin_cntr": "imap_spin_angle_bin_cntr", # "histogram_flag_array": "histogram_flag_array", "filter_temperature_average": "filter_temperature_average", - "filter_temperature_std_dev": "filter_temperature_variance", + "filter_temperature_std_dev": "filter_temperature_std_dev", "hv_voltage_average": "hv_voltage_average", - "hv_voltage_std_dev": "hv_voltage_variance", + "hv_voltage_std_dev": "hv_voltage_std_dev", "spin_period_average": "spin_period_average", - "spin_period_std_dev": "spin_period_variance", + "spin_period_std_dev": "spin_period_std_dev", "pulse_length_average": "pulse_length_average", - "pulse_length_std_dev": "pulse_length_variance", + "pulse_length_std_dev": "pulse_length_std_dev", # TODO uncomment when spice is complete # "spin_period_ground_average": "spin_period_ground_average", - # "spin_period_ground_std_dev": "spin_period_ground_variance", + # "spin_period_ground_std_dev": "spin_period_ground_std_dev", # "position_angle_offset_average": "position_angle_offset_average", - # "position_angle_offset_std_dev": "position_angle_offset_variance", + # "position_angle_offset_std_dev": "position_angle_offset_std_dev", # "spin_axis_orientation_average": "spin_axis_orientation_average", - # "spin_axis_orientation_std_dev": "spin_axis_orientation_variance", + # "spin_axis_orientation_std_dev": "spin_axis_orientation_std_dev", # "spacecraft_location_average": "spacecraft_location_average", - # "spacecraft_location_std_dev": "spacecraft_location_variance", + # "spacecraft_location_std_dev": "spacecraft_location_std_dev", # "spacecraft_velocity_average": "spacecraft_velocity_average", - # "spacecraft_velocity_std_dev": "spacecraft_velocity_variance", + # "spacecraft_velocity_std_dev": "spacecraft_velocity_std_dev", } for index, validation_output in enumerate(out["output"]): diff --git a/imap_processing/tests/glows/test_glows_l2_data.py b/imap_processing/tests/glows/test_glows_l2_data.py new file mode 100644 index 000000000..e69de29bb