From d7eb03556e5ae317c688ca33c4379de12aab9dc3 Mon Sep 17 00:00:00 2001 From: Matthew Bourque Date: Wed, 4 Sep 2024 13:55:34 -0600 Subject: [PATCH 1/4] Using new imap_xtce tool, generated new CoDICE packet definition --- imap_processing/codice/codice_l0.py | 11 +- imap_processing/codice/codice_l1a.py | 8 +- .../P_COD_HI_INST_COUNTS_AGGREGATED.xml | 193 - .../P_COD_HI_INST_COUNTS_SINGLES.xml | 193 - .../P_COD_HI_OMNI_SPECIES_COUNTS.xml | 191 - .../packet_definitions/P_COD_HI_PHA.xml | 162 - .../P_COD_HI_SECT_SPECIES_COUNTS.xml | 191 - .../P_COD_LO_INST_COUNTS_AGGREGATED.xml | 191 - .../P_COD_LO_INST_COUNTS_SINGLES.xml | 191 - .../P_COD_LO_NSW_ANGULAR_COUNTS.xml | 191 - .../P_COD_LO_NSW_PRIORITY_COUNTS.xml | 191 - .../P_COD_LO_NSW_SPECIES_COUNTS.xml | 191 - .../packet_definitions/P_COD_LO_PHA.xml | 164 - .../P_COD_LO_SW_ANGULAR_COUNTS.xml | 191 - .../P_COD_LO_SW_PRIORITY_COUNTS.xml | 191 - .../P_COD_LO_SW_SPECIES_COUNTS.xml | 191 - .../codice_packet_definition.xml | 5072 +++++++++++++++++ 17 files changed, 5085 insertions(+), 2628 deletions(-) delete mode 100644 imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_AGGREGATED.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_SINGLES.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_HI_OMNI_SPECIES_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_HI_PHA.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_HI_SECT_SPECIES_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_AGGREGATED.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_SINGLES.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_NSW_ANGULAR_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_NSW_PRIORITY_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_NSW_SPECIES_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_PHA.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_SW_ANGULAR_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_SW_PRIORITY_COUNTS.xml delete mode 100644 imap_processing/codice/packet_definitions/P_COD_LO_SW_SPECIES_COUNTS.xml create mode 100644 imap_processing/codice/packet_definitions/codice_packet_definition.xml diff --git a/imap_processing/codice/codice_l0.py b/imap_processing/codice/codice_l0.py index 6f132d580..46532a7f2 100644 --- a/imap_processing/codice/codice_l0.py +++ b/imap_processing/codice/codice_l0.py @@ -19,7 +19,6 @@ import xarray as xr from imap_processing import imap_module_directory -from imap_processing.codice import constants from imap_processing.utils import packet_file_to_datasets @@ -37,9 +36,15 @@ def decom_packets(packet_file: Path) -> dict[int, xr.Dataset]: packets : dict[int, xarray.Dataset] Mapping from apid to ``xarray`` dataset, one dataset per apid. """ + if "hskp" in str(packet_file): + xtce_filename = "P_COD_NHK.xml" + else: + xtce_filename = "codice_packet_definition.xml" xtce_packet_definition = Path( - f"{imap_module_directory}/codice/packet_definitions/{constants.PACKET_TO_XTCE_MAPPING[packet_file.name]}" + f"{imap_module_directory}/codice/packet_definitions/{xtce_filename}" + ) + packets: dict[int, xr.Dataset] = packet_file_to_datasets( + packet_file, xtce_packet_definition ) - packets = packet_file_to_datasets(packet_file, xtce_packet_definition) return packets diff --git a/imap_processing/codice/codice_l1a.py b/imap_processing/codice/codice_l1a.py index f1776a4fa..45dd107a3 100644 --- a/imap_processing/codice/codice_l1a.py +++ b/imap_processing/codice/codice_l1a.py @@ -30,8 +30,6 @@ logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) -# TODO: In decommutation, how to have a variable length data and then a checksum -# after it? (Might be fixed with new XTCE script updates) # TODO: Add support for decomming multiple APIDs from a single file # TODO: Add these as variables in CDF: SPIN_PERIOD, ST_BIAS_GAIN_MODE, # SW_BIAS_GAIN_MODE, RGFO_HALF_SPIN, NSO_HALF_SPIN, DATA_QUALITY @@ -513,8 +511,12 @@ def process_codice_l1a(file_path: Path, data_version: str) -> xr.Dataset: The ``xarray`` dataset containing the science data and supporting metadata. """ # Decom the packets, group data by APID, and sort by time + if "hskp" in str(file_path): + xtce_filename = "P_COD_NHK.xml" + else: + xtce_filename = "codice_packet_definition.xml" xtce_packet_definition = Path( - f"{imap_module_directory}/codice/packet_definitions/{constants.PACKET_TO_XTCE_MAPPING[file_path.name]}" + f"{imap_module_directory}/codice/packet_definitions/{xtce_filename}" ) packets = packet_file_to_datasets(file_path, xtce_packet_definition) diff --git a/imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_AGGREGATED.xml b/imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_AGGREGATED.xml deleted file mode 100644 index 4ac8bc9c1..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_AGGREGATED.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 512 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; - -MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL COUNTERS INCLUDED): - -16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 4,325,376 BITS (540,672 BYTES) - -NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 840 BITS (105 BYTES) - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_SINGLES.xml b/imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_SINGLES.xml deleted file mode 100644 index 1319d645f..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_HI_INST_COUNTS_SINGLES.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 768 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; - -MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL COUNTERS INCLUDED): - -16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 4,325,376 BITS (540,672 BYTES) - -NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 840 BITS (105 BYTES) - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_HI_OMNI_SPECIES_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_HI_OMNI_SPECIES_COUNTS.xml deleted file mode 100644 index 53bae3cde..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_HI_OMNI_SPECIES_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1376 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 146 SQRT(2) SPECEIS COUNTERS INCLUDED): - -16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 146 COUNTERS = 28,704,768 BITS (3,588,096 BYTES) - -NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 42,240 BITS (5,281 BYTES) - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_HI_PHA.xml b/imap_processing/codice/packet_definitions/P_COD_HI_PHA.xml deleted file mode 100644 index b75581c0a..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_HI_PHA.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5760 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGESCOD_LO_PHA. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER THE EVENT DATA IS COMPRESSED. IF 1/YES, EVENT_DATA ARRAY IS COMPRESSED USING THE RICE COMPRESSION ALGORITHM. - - - NUMBER OF EVENTS SELECTED FOR DOWNLINK (I.E. NUMBER OF EVENTS IN THE EVENT_DATA ARRAY) - - - NUMBER OF BYTES IN THE EVENT_DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - OPTIONALLY COMPRESSED ARRAY OF EVENT DATA - -FORMAT IS TBD; SOME CONSIDERATIONS/OPTIONS: -- FULL EVENTS HAVE A LOT OF REDUNDANT DATA (E.G. WILL HAVE MANY EVENTS WITH THE SAME PRIORITY/SPIN/SPIN PHASE INFORMATION). HOW WELL DOES COMPRESSION TO DEAL WITH THE REDUNDANCY? -- COULD INCLUDE MINI-HEADERS FOR EACH (PRIORITY,SPIN, SPIN-PHASE) GROUP AND STRIP THE REDUNDANT DATA FROM THE EVENTS -- SHOULD EVENTS BE TIGHTLY PACKED, OR CAN WE PAD OUT TO 64-BIT WORD BOUNDARIES? HOW WELL DOES COMPRESSION COMPENSATE FOR THE EXTRA BITS? - -EACH EVENT CONSISTS OF: -- 10-BIT TOF -- 9-BIT SSD ENERGY -- 2-BIT ENERGY RANGE -- 7-BIT SPIN ANGLE -- 4-BIT SSD POSITION -- 4-BIT SPIN NUMBER -- 2-BIT PHA TYPE - -TBD: EVENTS MAY BE TIGHTLY PACKED, OR MAY HAVE SPARES ADDED TO KEEP EACH EVENT BYTE-ALIGNED. IN EITHER CASE, THERE MAY BE UP TO 1 BYTE OF PADDING TO KEEP THE TOTAL SIZE OF THE PACKET EVEN. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_HI_SECT_SPECIES_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_HI_SECT_SPECIES_COUNTS.xml deleted file mode 100644 index 176c12ff7..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_HI_SECT_SPECIES_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 992 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL X2 SPECEIS COUNTERS INCLUDED): - -16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 46 COUNTERS = 9,043,968 BITS (1,130,496 BYTES) - -NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 4672 BITS (584 BYTES) - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_AGGREGATED.xml b/imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_AGGREGATED.xml deleted file mode 100644 index 700f09a3b..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_AGGREGATED.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 864 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 22 INSTRUMENT RATE COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 25,952,256 BITS (3,244,032 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_SINGLES.xml b/imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_SINGLES.xml deleted file mode 100644 index 39f0cb1a9..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_INST_COUNTS_SINGLES.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1664 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 22 INSTRUMENT RATE COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 25,952,256 BITS (3,244,032 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_NSW_ANGULAR_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_LO_NSW_ANGULAR_COUNTS.xml deleted file mode 100644 index 807c65d98..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_NSW_ANGULAR_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1024 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_NSW_PRIORITY_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_LO_NSW_PRIORITY_COUNTS.xml deleted file mode 100644 index 5cf1d73c1..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_NSW_PRIORITY_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 704 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 8 PRIORITY-COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 8 COUNTERS = 9,437,184 BITS (1,179,648 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_NSW_SPECIES_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_LO_NSW_SPECIES_COUNTS.xml deleted file mode 100644 index 38a3f20a7..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_NSW_SPECIES_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 608 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_PHA.xml b/imap_processing/codice/packet_definitions/P_COD_LO_PHA.xml deleted file mode 100644 index fc8cd2d85..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_PHA.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 640 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGESCOD_LO_PHA. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER THE EVENT DATA IS COMPRESSED. IF 1/YES, EVENT_DATA ARRAY IS COMPRESSED USING THE LZMA COMPRESSION ALGORITHM. - - - NUMBER OF EVENTS SELECTED FOR DOWNLINK (I.E. NUMBER OF EVENTS IN THE EVENT_DATA ARRAY) - - - NUMBER OF BYTES IN THE EVENT_DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - OPTIONALLY COMPRESSED ARRAY OF EVENT DATA - -FORMAT IS TBD; SOME CONSIDERATIONS/OPTIONS: -- FULL EVENTS HAVE A LOT OF REDUNDANT DATA (E.G. WILL HAVE MANY EVENTS WITH THE SAME PRIORITY/E-STEP/SPIN PHASE INFORMATION). HOW WELL DOES COMPRESSION TO DEAL WITH THE REDUNDANCY? -- COULD INCLUDE MINI-HEADERS FOR EACH (PRIORITY,E-STEP, SPIN-PHASE) GROUP AND STRIP THE REDUNDANT DATA FROM THE EVENTS -- SHOULD EVENTS BE TIGHTLY PACKED, OR CAN WE PAD OUT TO 64-BIT WORD BOUNDARIES? HOW WELL DOES COMPRESSION COMPENSATE FOR THE EXTRA BITS? - -EACH EVENT CONSISTS OF: -- 7-BIT E-STEP -- 10-BIT TOF -- 9-BIT APD ENERGY -- 7-BIT SPIN ANGLE -- 5-BIT POSITION -- 5-BIT APD-ID -- 1-BIT APD-GAIN -- 2-BIT PHA TYPE -- 3-BIT PRIORITY RANGE - -TBD: EVENTS MAY BE TIGHTLY PACKED, OR MAY HAVE SPARES ADDED TO KEEP EACH EVENT BYTE-ALIGNED. IN EITHER CASE, THERE MAY BE UP TO 1 BYTE OF PADDING TO KEEP THE TOTAL SIZE OF THE PACKET EVEN. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_SW_ANGULAR_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_LO_SW_ANGULAR_COUNTS.xml deleted file mode 100644 index f7ff25b08..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_SW_ANGULAR_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1888 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_SW_PRIORITY_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_LO_SW_PRIORITY_COUNTS.xml deleted file mode 100644 index 534fa1389..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_SW_PRIORITY_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 832 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 8 PRIORITY-COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 8 COUNTERS = 9,437,184 BITS (1,179,648 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/P_COD_LO_SW_SPECIES_COUNTS.xml b/imap_processing/codice/packet_definitions/P_COD_LO_SW_SPECIES_COUNTS.xml deleted file mode 100644 index fdedcc79d..000000000 --- a/imap_processing/codice/packet_definitions/P_COD_LO_SW_SPECIES_COUNTS.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1376 - - - - - - - CCSDS Packet Version Number (always 0) - - - CCSDS Packet Type Indicator (0=telemetry) - - - CCSDS Packet Secondary Header Flag (always 1) - - - CCSDS Packet Application Process ID - - - CCSDS Packet Grouping Flags (3=not part of group) - - - CCSDS Packet Sequence Count (increments with each new packet) - - - CCSDS Packet Length (number of bytes after Packet length minus 1) - - - SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK - - - PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. - - - SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. - - - FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED - - - SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) - - - SPARE FOR ALIGNMENT - - - BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR - - - BIAS GAIN MODE FOR THE SOLARWIND SECTOR - - - UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. - - - PLAN TABLE THAT WAS IN USE - - - PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. - - - VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. - - - INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. - - - INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. - - - SPARE - - - INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. - - - WHETHER/HOW THE DATA IS COMPRESSED. - - - NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. - - - COUNTER DATA - -VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): - -128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) - -REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. - -DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. - -THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. - -FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD - -WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. - - - PACKET CHECKSUM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/imap_processing/codice/packet_definitions/codice_packet_definition.xml b/imap_processing/codice/packet_definitions/codice_packet_definition.xml new file mode 100644 index 000000000..98144121b --- /dev/null +++ b/imap_processing/codice/packet_definitions/codice_packet_definition.xml @@ -0,0 +1,5072 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CCSDS Packet Version Number (always 0) + + + CCSDS Packet Type Indicator (0=telemetry) + + + CCSDS Packet Secondary Header Flag (always 1) + + + CCSDS Packet Application Process ID + + + CCSDS Packet Grouping Flags (3=not part of group) + + + CCSDS Packet Sequence Count (increments with each new packet) + + + CCSDS Packet Length (number of bytes after Packet length minus 1) + + + EUROPA CLIPPER SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + NUMBER OF COMMANDS THAT HAVE BEEN EXECUTED. COUNTS 0-255, THEN ROLLS OVER TO 0. RESET VIA CLR_LATCHED_SINGLE(COMMAND_COUNTS) [ALSO RESETS CMDJRCT, CMDACC, ITF_ERROR COUNTS) + + + NUMBER OF COMMANDS THAT HAVE BEEN REJECTED. COUNTS 0-255, THEN ROLLS OVER TO 0. RESET VIA CLR_LATCHED_SINGLE(COMMAND_COUNTS) [ALSO RESETS CMDEXE, CMDACC, ITF_ERROR COUNTS) + + + OPCODE OF THE LAST EXECUTED COMMAND + + + CURRENT OPERATING MODE + + + STATE OF THE MEMORY-OPERATIONS HANDLER + + + STATE OF THE MEMORY-DUMP HANDLER (BUSY/IDLE) + + + NUMBER OF ITF ERRORS THAT HAVE BEEN DETECTED; COUNTS 0-3, THEN ROLLS OVER TO 0. RESET VIA CLR_LATCHED_SINGLE(COMMAND_COUNTS) [ALSO RESETS CMDEXE, CMDJRCT, CMDACC COUNTS) + + + NUMBER OF SPIN PULSES RECEIVED + + + NUMBER OF MISSED PPS PULSES. COUNTS 0-3, THEN FREEZES AT 3. RESET VIA CLR_LATCHED_SINGLE(PPS_STATS) + + + NUMBER OF TIMES THE WATCHDOG HAS TIMED OUT. + + + CURRENT STATUS OF THE HV SAFE/DISABLE PLUGS: +- SAFE: ALL HVPS OUTPUTS PROVIDE 1/10 THE COMMANDED VOLTAGE +- DIS: ALL HVPS OUTPUTS PROVIDE 0V, REGARDLESS OF COMMANDED VOLTAGE +- FULL: HVPS OUTPUTS PROVIDE THE FULL COMMANDED VOLTAGE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INDICATES WHETHER ANY CATEGORY 1 LIMITS HAVE TRIGGERED. + + 2 BITS: 0: NO TRIGGERS; 1: ONE TRIGGER, 2: TWO TRIGGERS, 3: MORE THAN TWO TRIGGERS + + + INDICATES WHETHER ANY CATEGORY 2 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER ANY CATEGORY 3 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER ANY CATEGORY 4 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER ANY CATEGORY 5 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER ANY CATEGORY 6 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER ANY CATEGORY 7 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER ANY CATEGORY 8 LIMITS HAVE TRIGGERED + + + INDICATES WHETHER THE MOST RECENT TRIGGER WAS A MINIMUM OR MAXIMUM LIMIT + + + INDICATES THE ID OF THE MOST RECENT FDC TRIGGER + + + INDICATES THE ACTION THAT WAS TAKEN FOR THE MOST RECENT FDC TRIGGER + + + CURRENT INDEX FOR THE ROUND ROBIN PARAMETER REPORTING. THE ROUND ROBIN MECHANISM REPORTS ONE VALUE FROM THE PARAMETER TABLE EACH TIME THIS PACKET IS GENERATED. + + + PARAMETER VALUE CORRESPONDING TO THE CURRENT ROUND_ROBIN_INDEX VALUE. + + + INDICATES WHETHER FSW CONTROL OF THE OPERATIONAL HEATER IS ENABLED + + + INDICATES THE CURRENT STATE OF THE PHYSICAL HEATER OUTPUT + + + INDICATES THE CURRENT STATE OF THE PHYSICAL HEATER OUTPUT + + + SPARE FOR ALIGNMENT + + + CPU PERCENT IDLE TIME. BASED ON THE MEMORY SCRUB TASK PERCENT, SINCE IT CONSUMES ALL IDLE CYCLES. + + + + + + + + + + + + + + + + + + + + + + + + SPARE FOR ALIGNMENT + + + PACKET CHECKSUM + + + WHOLE-SECONDS PART OF SCLK + + + S/C TIME AT THE END OF THE ACQUISITION CYCLE; ALL PACKETS FOR A GIVEN CYCLE WILL HAVE THE SAME ACQUISITION TIME. + + + DATA QUALITY / STATUS; TBD - BREAK INTO FIELDS + + + COUNTER TO INDICATE WHICH BLOCK OF DATA IS INCLUDED IN THIS PACKET. VALUES 0-231 INCLUDE VALID DATA; 231-239 WILL HAVE FILL DATA + + + DATA BYTE 0 + + + DATA BYTE 1 + + + DATA BYTE 2 + + + DATA BYTE 3 + + + DATA BYTE 4 + + + DATA BYTE 5 + + + DATA BYTE 6 + + + DATA BYTE 7 + + + DATA BYTE 8 + + + DATA BYTE 9 + + + DATA BYTE 10 + + + DATA BYTE 11 + + + DATA BYTE 12 + + + DATA BYTE 13 + + + DATA BYTE 14 + + + SPARE FOR ALIGNMENT + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGESCOD_LO_PHA. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER THE EVENT DATA IS COMPRESSED. IF 1/YES, EVENT_DATA ARRAY IS COMPRESSED USING THE LZMA COMPRESSION ALGORITHM. + + + NUMBER OF EVENTS SELECTED FOR DOWNLINK (I.E. NUMBER OF EVENTS IN THE EVENT_DATA ARRAY) + + + NUMBER OF BYTES IN THE EVENT_DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + OPTIONALLY COMPRESSED ARRAY OF EVENT DATA + +FORMAT IS TBD; SOME CONSIDERATIONS/OPTIONS: +- FULL EVENTS HAVE A LOT OF REDUNDANT DATA (E.G. WILL HAVE MANY EVENTS WITH THE SAME PRIORITY/E-STEP/SPIN PHASE INFORMATION). HOW WELL DOES COMPRESSION TO DEAL WITH THE REDUNDANCY? +- COULD INCLUDE MINI-HEADERS FOR EACH (PRIORITY,E-STEP, SPIN-PHASE) GROUP AND STRIP THE REDUNDANT DATA FROM THE EVENTS +- SHOULD EVENTS BE TIGHTLY PACKED, OR CAN WE PAD OUT TO 64-BIT WORD BOUNDARIES? HOW WELL DOES COMPRESSION COMPENSATE FOR THE EXTRA BITS? + +EACH EVENT CONSISTS OF: +- 7-BIT E-STEP +- 10-BIT TOF +- 9-BIT APD ENERGY +- 7-BIT SPIN ANGLE +- 5-BIT POSITION +- 5-BIT APD-ID +- 1-BIT APD-GAIN +- 2-BIT PHA TYPE +- 3-BIT PRIORITY RANGE + +TBD: EVENTS MAY BE TIGHTLY PACKED, OR MAY HAVE SPARES ADDED TO KEEP EACH EVENT BYTE-ALIGNED. IN EITHER CASE, THERE MAY BE UP TO 1 BYTE OF PADDING TO KEEP THE TOTAL SIZE OF THE PACKET EVEN. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 8 PRIORITY-COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 8 COUNTERS = 9,437,184 BITS (1,179,648 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 32 SPECIES-COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 32 COUNTERS = 37,748,736 BITS (4,718,592 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 8 PRIORITY-COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 8 COUNTERS = 9,437,184 BITS (1,179,648 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 22 INSTRUMENT RATE COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 25,952,256 BITS (3,244,032 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + INDICATES THE POINT WHEN REDUCED GAIN FACTOR OPERATION (RGFO) WAS ACTIVED. IN RGFO, THE ENTRANCE ESA VOLTAGE IS REDUCED IN ORDER TO LIMIT THE NUMBER OF IONS THAT REACH THE DETECTORS. + + + INDICATES THE POINT WHEN NO-SCAN OPERATION (NSO) WAS ACTIVED. IN NSO, THE ESA VOLTAGE IS SET TO THE FIRST STEP IN THE SCAN AND REMAINS FIXED UNTIL THE NEXT CYCLE BOUNDARY. + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 22 INSTRUMENT RATE COUNTERS INCLUDED): + +128 ENERGIES X 24 POSITIONS X 12 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 25,952,256 BITS (3,244,032 BYTES) + +REALISTICALLY, DATA IS AGGRESSIVELY COLLAPSED AND COMPRESSED, AND ONLY A SUBSET OF THE 32 SPECIES COUNTERS WILL BE INCLUDED, SO THIS DATA FIELD WILL BE MUCH SMALLER THAN THE MAXIMUM. + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X ENERGY DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + WHOLE-SECONDS PART OF SCLK + + + S/C TIME AT THE END OF THE ACQUISITION CYCLE; ALL PACKETS FOR A GIVEN CYCLE WILL HAVE THE SAME ACQUISITION TIME. + + + DATA QUALITY / STATUS; TBD - BREAK INTO FIELDS + + + COUNTER TO INDICATE WHICH BLOCK OF DATA IS INCLUDED IN THIS PACKET. VALUES 0-231 INCLUDE VALID DATA; 231-239 WILL HAVE FILL DATA + + + DATA BYTE 0 + + + DATA BYTE 1 + + + DATA BYTE 2 + + + DATA BYTE 3 + + + DATA BYTE 4 + + + SPARE FOR 16-BIT ALIGNMENT + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGESCOD_LO_PHA. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER THE EVENT DATA IS COMPRESSED. IF 1/YES, EVENT_DATA ARRAY IS COMPRESSED USING THE RICE COMPRESSION ALGORITHM. + + + NUMBER OF EVENTS SELECTED FOR DOWNLINK (I.E. NUMBER OF EVENTS IN THE EVENT_DATA ARRAY) + + + NUMBER OF BYTES IN THE EVENT_DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + OPTIONALLY COMPRESSED ARRAY OF EVENT DATA + +FORMAT IS TBD; SOME CONSIDERATIONS/OPTIONS: +- FULL EVENTS HAVE A LOT OF REDUNDANT DATA (E.G. WILL HAVE MANY EVENTS WITH THE SAME PRIORITY/SPIN/SPIN PHASE INFORMATION). HOW WELL DOES COMPRESSION TO DEAL WITH THE REDUNDANCY? +- COULD INCLUDE MINI-HEADERS FOR EACH (PRIORITY,SPIN, SPIN-PHASE) GROUP AND STRIP THE REDUNDANT DATA FROM THE EVENTS +- SHOULD EVENTS BE TIGHTLY PACKED, OR CAN WE PAD OUT TO 64-BIT WORD BOUNDARIES? HOW WELL DOES COMPRESSION COMPENSATE FOR THE EXTRA BITS? + +EACH EVENT CONSISTS OF: +- 10-BIT TOF +- 9-BIT SSD ENERGY +- 2-BIT ENERGY RANGE +- 7-BIT SPIN ANGLE +- 4-BIT SSD POSITION +- 4-BIT SPIN NUMBER +- 2-BIT PHA TYPE + +TBD: EVENTS MAY BE TIGHTLY PACKED, OR MAY HAVE SPARES ADDED TO KEEP EACH EVENT BYTE-ALIGNED. IN EITHER CASE, THERE MAY BE UP TO 1 BYTE OF PADDING TO KEEP THE TOTAL SIZE OF THE PACKET EVEN. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; + +MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL COUNTERS INCLUDED): + +16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 4,325,376 BITS (540,672 BYTES) + +NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 840 BITS (105 BYTES) + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; + +MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL COUNTERS INCLUDED): + +16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 4,325,376 BITS (540,672 BYTES) + +NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 840 BITS (105 BYTES) + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL 146 SQRT(2) SPECEIS COUNTERS INCLUDED): + +16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 146 COUNTERS = 28,704,768 BITS (3,588,096 BYTES) + +NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 42,240 BITS (5,281 BYTES) + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL X2 SPECEIS COUNTERS INCLUDED): + +16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 46 COUNTERS = 9,043,968 BITS (1,130,496 BYTES) + +NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 4672 BITS (584 BYTES) + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + SECONDARY HEADER - WHOLE-SECONDS PART OF SCLK + + + PACKET VERSION - THIS WILL BE INCREMENTED EACH TIME THE FORMAT OF THE PACKET CHANGES. + + + SPIN PERIOD REPORTED BY THE SPACECRAFT IN THE TIME AND STATUS MESSAGE. REPORTED PERIOD IS THE PERIOD THAT WAS ACTIVE WHEN THE 16-SPIN ACQUISITION CYCLE STARTED. + + + FULL-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED + + + SUB-SECONDS PORTION OF THE TIME AT WHICH THE 16-SPIN CYCLE STARTED (MICROSECONDS) + + + SPARE FOR ALIGNMENT + + + BIAS GAIN MODE FOR THE SUPRATHERMAL SECTOR + + + BIAS GAIN MODE FOR THE SOLARWIND SECTOR + + + UNIQUE ID ASSIGNED TO A SPECIFIC TABLE CONFIGURATION. THIS FIELD IS USED TO LINK THE OVERALL ACQUISITION AND PROCESSING SETTINGS TO A SPECIFIC TABLE CONFIGURATION. + + + PLAN TABLE THAT WAS IN USE + + + PLAN STEP THAT WAS ACTIVE WHEN THIS DATA WAS ACQUIRED AND PROCESSED. + + + VIEW ID PROVIDES INFORMATION ABOUT HOW DATA WAS COLLAPSED AND/OR COMPRESSED. + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + N/A FOR CODICE-HI; INCLUDED IN ORDER TO MAINTAIN COMMON PACKET FORMAT + + + SPARE + + + INDICATES THAT THERE WAS SOME ERROR DETECTED DURING ACQUISITION OR PROCESSING OF THE DATA. ERRORS COULD INCLUDE CORRUPTED ACQUISITION MEMORY (I.E. EDAC ERRORS), TIMING VIOLATIONS, OR OTHER EVENTS THAT INTERRUPTED OR OTHERWISE AFFECTED DATA COLLECTION. + + + WHETHER/HOW THE DATA IS COMPRESSED. + + + NUMBER OF BYTES IN THE DATA ARRAY. IF COMPRESSED, THIS VALUE REPRESENTS THE LENGTH OF THE COMPRESSED DATA. + + + COUNTER DATA + +VARIABLE LENGTH; + +MAXIMUM (BASED ON UNCOLLAPSED, UNCOMPRESSED DATA, AND ASSUMING ALL COUNTERS INCLUDED): + +16 SPINS X 16 POSITIONS X 24 SPIN-ANGLES X 32 BITS X 22 COUNTERS = 4,325,376 BITS (540,672 BYTES) + +NOMINAL (BASED ON CURRENT PLAN FOR COUNTER SELECTION, COLLAPSING, AND COMPRESSION): 840 BITS (105 BYTES) + +DATA FORMAT IS A SERIES OF SPIN-ANGLE X POSITION X SPIN NUMBER DATA CUBES COLLAPSED PER THE SCI_LUT COLLAPSE TABLE SELECTED BY THE VIEW_ID. WHICH COUNTERS ARE INCLUDED IS DETERMINED BY USING THE PLAN_ID AND PLAN_STEP TO INDEX INTO THE SCI_LUT DATA PRODUCTS HI/LO TABLES TO FIND ALL THE COUNTERS THAT ARE ASSOCIATED WITH THE VIEW_ID. + +THE COLLAPSED DATA CUBES ARE ALSO OPTIONALLY COMPRESSED USING LOSSY AND/OR LOSSLESS COMPRESSION. LOSSY COMPRESSION IS A TABLE-BASED 24->8 BIT COMPRESSION APPLIED TO EACH COUNTER VALUE. LOSSLESS COMPRESSION USES THE LZMA COMPRESSION ALGORITHM AND IS APPLIED TO THE FULL DATA FIELD AS A SINGLE UNIT. + +FIELD WILL ADDITIONALLY BE PADDED IN ORDER TO MEET THE REQUIREMENT OF PACKETS BEING A MULTIPLE OF 16 BITS; ANY PAD BITS WILL BE ACCOUNTED FOR IN THE CCSDS HEADER LENGTH FIELD, BUT WILL *NOT* BE INCLUDED IN THE BYTE_COUNT FIELD + +WHEN THIS ARRAY IS TOO LARGE FOR A SINGLE CCSDS PACKET, CODICE WILL UTILIZE THE CCSDS GROUPING FLAGS TO PROVIDE THE FULL DATA PACKET OVER SEVERAL CCSDS PACKETS. + + + PACKET CHECKSUM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 55fc04bf768f4297a1108bc12881dd8802e6d984 Mon Sep 17 00:00:00 2001 From: Matthew Bourque Date: Wed, 4 Sep 2024 14:31:48 -0600 Subject: [PATCH 2/4] Now using codice_l0.decom_packets as only place to perform decom, added clarifying inline comments --- imap_processing/codice/codice_l0.py | 5 +++++ imap_processing/codice/codice_l1a.py | 11 ++--------- imap_processing/codice/constants.py | 19 ------------------- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/imap_processing/codice/codice_l0.py b/imap_processing/codice/codice_l0.py index 46532a7f2..26b0ce91c 100644 --- a/imap_processing/codice/codice_l0.py +++ b/imap_processing/codice/codice_l0.py @@ -36,6 +36,11 @@ def decom_packets(packet_file: Path) -> dict[int, xr.Dataset]: packets : dict[int, xarray.Dataset] Mapping from apid to ``xarray`` dataset, one dataset per apid. """ + # TODO: Currently need to use the 'old' packet definition for housekeeping + # because the test housekeeping packet has LAST_OPCODE=0, and the + # telemetry definition "STATES" tab doesn't allow for a 0 value for + # this. Need to figure out if the test packet is bad, or the telemetry + # definition is wrong. if "hskp" in str(packet_file): xtce_filename = "P_COD_NHK.xml" else: diff --git a/imap_processing/codice/codice_l1a.py b/imap_processing/codice/codice_l1a.py index 45dd107a3..8c42e06cc 100644 --- a/imap_processing/codice/codice_l1a.py +++ b/imap_processing/codice/codice_l1a.py @@ -23,9 +23,9 @@ from imap_processing import imap_module_directory from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes from imap_processing.codice import constants +from imap_processing.codice.codice_l0 import decom_packets from imap_processing.codice.decompress import decompress from imap_processing.codice.utils import CODICEAPID -from imap_processing.utils import packet_file_to_datasets logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) @@ -511,14 +511,7 @@ def process_codice_l1a(file_path: Path, data_version: str) -> xr.Dataset: The ``xarray`` dataset containing the science data and supporting metadata. """ # Decom the packets, group data by APID, and sort by time - if "hskp" in str(file_path): - xtce_filename = "P_COD_NHK.xml" - else: - xtce_filename = "codice_packet_definition.xml" - xtce_packet_definition = Path( - f"{imap_module_directory}/codice/packet_definitions/{xtce_filename}" - ) - packets = packet_file_to_datasets(file_path, xtce_packet_definition) + packets = decom_packets(file_path) for apid in packets: packet = packets[apid] diff --git a/imap_processing/codice/constants.py b/imap_processing/codice/constants.py index cbe25ee19..f063087f2 100644 --- a/imap_processing/codice/constants.py +++ b/imap_processing/codice/constants.py @@ -14,28 +14,9 @@ # TODO: What to do in the case of a value of 255 in LOSSY_A and LOSSY_B # compression? -# TODO: Improve PACKET_TO_XTCE_MAPPING to not have hard-coded dates/versions from imap_processing.codice.utils import CODICEAPID, CoDICECompression -PACKET_TO_XTCE_MAPPING = { - "imap_codice_l0_hi-counters-aggregated_20240429_v001.pkts": "P_COD_HI_INST_COUNTS_AGGREGATED.xml", # noqa - "imap_codice_l0_hi-counters-singles_20240429_v001.pkts": "P_COD_HI_INST_COUNTS_SINGLES.xml", # noqa - "imap_codice_l0_hi-omni_20240429_v001.pkts": "P_COD_HI_OMNI_SPECIES_COUNTS.xml", - "imap_codice_l0_hi-sectored_20240429_v001.pkts": "P_COD_HI_SECT_SPECIES_COUNTS.xml", - "imap_codice_l0_hi-pha_20240429_v001.pkts": "P_COD_HI_PHA.xml", - "imap_codice_l0_hskp_20100101_v001.pkts": "P_COD_NHK.xml", - "imap_codice_l0_lo-counters-aggregated_20240429_v001.pkts": "P_COD_LO_INST_COUNTS_AGGREGATED.xml", # noqa - "imap_codice_l0_lo-counters-singles_20240429_v001.pkts": "P_COD_LO_INST_COUNTS_SINGLES.xml", # noqa - "imap_codice_l0_lo-sw-angular_20240429_v001.pkts": "P_COD_LO_SW_ANGULAR_COUNTS.xml", - "imap_codice_l0_lo-nsw-angular_20240429_v001.pkts": "P_COD_LO_NSW_ANGULAR_COUNTS.xml", # noqa - "imap_codice_l0_lo-sw-priority_20240429_v001.pkts": "P_COD_LO_SW_PRIORITY_COUNTS.xml", # noqa - "imap_codice_l0_lo-nsw-priority_20240429_v001.pkts": "P_COD_LO_NSW_PRIORITY_COUNTS.xml", # noqa - "imap_codice_l0_lo-sw-species_20240429_v001.pkts": "P_COD_LO_SW_SPECIES_COUNTS.xml", - "imap_codice_l0_lo-nsw-species_20240429_v001.pkts": "P_COD_LO_NSW_SPECIES_COUNTS.xml", # noqa - "imap_codice_l0_lo-pha_20240429_v001.pkts": "P_COD_LO_PHA.xml", -} - APIDS_FOR_SCIENCE_PROCESSING = [ CODICEAPID.COD_HI_INST_COUNTS_AGGREGATED, CODICEAPID.COD_HI_INST_COUNTS_SINGLES, From 7a83e5270a644a3e478c7c01b8653b0430780db7 Mon Sep 17 00:00:00 2001 From: Matthew Bourque Date: Mon, 9 Sep 2024 14:47:18 -0600 Subject: [PATCH 3/4] Addressed PR comments --- imap_processing/codice/codice_l0.py | 6 +++--- imap_processing/codice/codice_l1a.py | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/imap_processing/codice/codice_l0.py b/imap_processing/codice/codice_l0.py index 26b0ce91c..1860ab36f 100644 --- a/imap_processing/codice/codice_l0.py +++ b/imap_processing/codice/codice_l0.py @@ -33,7 +33,7 @@ def decom_packets(packet_file: Path) -> dict[int, xr.Dataset]: Returns ------- - packets : dict[int, xarray.Dataset] + datasets : dict[int, xarray.Dataset] Mapping from apid to ``xarray`` dataset, one dataset per apid. """ # TODO: Currently need to use the 'old' packet definition for housekeeping @@ -48,8 +48,8 @@ def decom_packets(packet_file: Path) -> dict[int, xr.Dataset]: xtce_packet_definition = Path( f"{imap_module_directory}/codice/packet_definitions/{xtce_filename}" ) - packets: dict[int, xr.Dataset] = packet_file_to_datasets( + datasets: dict[int, xr.Dataset] = packet_file_to_datasets( packet_file, xtce_packet_definition ) - return packets + return datasets diff --git a/imap_processing/codice/codice_l1a.py b/imap_processing/codice/codice_l1a.py index 8c42e06cc..0e6de7551 100644 --- a/imap_processing/codice/codice_l1a.py +++ b/imap_processing/codice/codice_l1a.py @@ -511,30 +511,30 @@ def process_codice_l1a(file_path: Path, data_version: str) -> xr.Dataset: The ``xarray`` dataset containing the science data and supporting metadata. """ # Decom the packets, group data by APID, and sort by time - packets = decom_packets(file_path) + datasets = decom_packets(file_path) - for apid in packets: - packet = packets[apid] + for apid in datasets: + packet_dataset = datasets[apid] logger.info(f"\nProcessing {CODICEAPID(apid).name} packet") if apid == CODICEAPID.COD_NHK: - dataset = create_hskp_dataset(packet, data_version) + dataset = create_hskp_dataset(packet_dataset, data_version) elif apid in [CODICEAPID.COD_LO_PHA, CODICEAPID.COD_HI_PHA]: - dataset = create_event_dataset(apid, packet, data_version) + dataset = create_event_dataset(apid, packet_dataset, data_version) elif apid in constants.APIDS_FOR_SCIENCE_PROCESSING: # Extract the data - science_values = packet.data.data[0] + science_values = packet_dataset.data.data[0] # Get the four "main" parameters for processing - table_id, plan_id, plan_step, view_id = get_params(packet) + table_id, plan_id, plan_step, view_id = get_params(packet_dataset) # Run the pipeline to create a dataset for the product pipeline = CoDICEL1aPipeline(table_id, plan_id, plan_step, view_id) pipeline.configure_data_products(apid) pipeline.unpack_science_data(science_values) - dataset = pipeline.create_science_dataset(packet, data_version) + dataset = pipeline.create_science_dataset(packet_dataset, data_version) logger.info(f"\nFinal data product:\n{dataset}\n") From f6f03c2f4fc9b1316f7e5c66e153ef4d309bc90a Mon Sep 17 00:00:00 2001 From: Matthew Bourque Date: Wed, 11 Sep 2024 10:57:35 -0600 Subject: [PATCH 4/4] Put in workaround for LAST_OPCODE=0 issue, updated TODO --- imap_processing/codice/codice_l0.py | 7 +++---- .../codice/packet_definitions/codice_packet_definition.xml | 1 + imap_processing/tests/codice/test_codice_l0.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/imap_processing/codice/codice_l0.py b/imap_processing/codice/codice_l0.py index 1860ab36f..757874ddf 100644 --- a/imap_processing/codice/codice_l0.py +++ b/imap_processing/codice/codice_l0.py @@ -37,10 +37,9 @@ def decom_packets(packet_file: Path) -> dict[int, xr.Dataset]: Mapping from apid to ``xarray`` dataset, one dataset per apid. """ # TODO: Currently need to use the 'old' packet definition for housekeeping - # because the test housekeeping packet has LAST_OPCODE=0, and the - # telemetry definition "STATES" tab doesn't allow for a 0 value for - # this. Need to figure out if the test packet is bad, or the telemetry - # definition is wrong. + # because the simulated housekeeping data being used has various + # mis-matches from the telemetry definition. This may be updated + # once new simulated housekeeping data are acquired. if "hskp" in str(packet_file): xtce_filename = "P_COD_NHK.xml" else: diff --git a/imap_processing/codice/packet_definitions/codice_packet_definition.xml b/imap_processing/codice/packet_definitions/codice_packet_definition.xml index 98144121b..85bafc10d 100644 --- a/imap_processing/codice/packet_definitions/codice_packet_definition.xml +++ b/imap_processing/codice/packet_definitions/codice_packet_definition.xml @@ -45,6 +45,7 @@ + diff --git a/imap_processing/tests/codice/test_codice_l0.py b/imap_processing/tests/codice/test_codice_l0.py index 9f99d4f53..e6bae4733 100644 --- a/imap_processing/tests/codice/test_codice_l0.py +++ b/imap_processing/tests/codice/test_codice_l0.py @@ -12,7 +12,7 @@ from imap_processing.codice.codice_l1a import create_hskp_dataset from imap_processing.utils import convert_raw_to_eu -# Define the CCSDS header fields (which will be ignored in these tests)) +# Define the CCSDS header fields (which will be ignored in these tests) CCSDS_HEADER_FIELDS = [ "shcoarse", "version",