diff --git a/imap_processing/ccsds/ccsds_data.py b/imap_processing/ccsds/ccsds_data.py index a73452afb..eb9c5c30f 100644 --- a/imap_processing/ccsds/ccsds_data.py +++ b/imap_processing/ccsds/ccsds_data.py @@ -42,10 +42,7 @@ class CcsdsData: def __init__(self, packet_header: dict): attributes = [field.name for field in fields(self)] - for key, item in packet_header.items(): - value = ( - item.derived_value if item.derived_value is not None else item.raw_value - ) + for key, value in packet_header.items(): if key in attributes: setattr(self, key, value) else: diff --git a/imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml b/imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml index d593f215b..efe1c43bd 100644 --- a/imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml @@ -30,9 +30,11 @@ string_base_attrs: CATDESC: string metadata FIELDNAM: string_metadata FORMAT: A80 - VAR_TYPE: metadata + LABLAXIS: "none" + VAR_TYPE: support_data DISPLAY_TYPE: no_plot DEPEND_0: epoch + UNITS: " " packet_data_attrs: CATDESC: packet data diff --git a/imap_processing/codice/codice_l1a.py b/imap_processing/codice/codice_l1a.py index cee2d81a2..81542380a 100644 --- a/imap_processing/codice/codice_l1a.py +++ b/imap_processing/codice/codice_l1a.py @@ -28,6 +28,7 @@ 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 convert_to_binary_string logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) @@ -541,6 +542,7 @@ def process_codice_l1a(file_path: Path, data_version: str) -> xr.Dataset: elif apid in constants.APIDS_FOR_SCIENCE_PROCESSING: # Extract the data science_values = packet_dataset.data.data[0] + science_values = convert_to_binary_string(science_values) # Get the four "main" parameters for processing table_id, plan_id, plan_step, view_id = get_params(packet_dataset) diff --git a/imap_processing/codice/utils.py b/imap_processing/codice/utils.py index 934656146..a0293c179 100644 --- a/imap_processing/codice/utils.py +++ b/imap_processing/codice/utils.py @@ -7,8 +7,6 @@ from enum import IntEnum -import space_packet_parser - class CODICEAPID(IntEnum): """Create ENUM for CoDICE APIDs.""" @@ -57,39 +55,3 @@ class CoDICECompression(IntEnum): LOSSLESS = 3 LOSSY_A_LOSSLESS = 4 LOSSY_B_LOSSLESS = 5 - - -def add_metadata_to_array(packet: space_packet_parser, metadata_arrays: dict) -> dict: - """ - Add metadata to the metadata_arrays. - - Parameters - ---------- - packet : space_packet_parser.parser.Packet - CODICE data packet. - metadata_arrays : dict - Metadata arrays. - - Returns - ------- - metadata_arrays : dict - Updated metadata arrays with values. - """ - ignore_list = [ - "SPARE_1", - "SPARE_2", - "SPARE_3", - "SPARE_4", - "SPARE_5", - "SPARE_6", - "CHECKSUM", - ] - - for key, value in packet.header.items(): - metadata_arrays.setdefault(key, []).append(value.raw_value) - - for key, value in packet.data.items(): - if key not in ignore_list: - metadata_arrays.setdefault(key, []).append(value.raw_value) - - return metadata_arrays diff --git a/imap_processing/decom.py b/imap_processing/decom.py index 94b6e23a7..de36f1ec7 100644 --- a/imap_processing/decom.py +++ b/imap_processing/decom.py @@ -8,7 +8,7 @@ from pathlib import Path from typing import Union -from space_packet_parser import parser, xtcedef +from space_packet_parser import definitions def decom_packets( @@ -32,9 +32,8 @@ def decom_packets( list List of all the unpacked data. """ - packet_definition = xtcedef.XtcePacketDefinition(xtce_packet_definition) - packet_parser = parser.PacketParser(packet_definition) + packet_definition = definitions.XtcePacketDefinition(xtce_packet_definition) with open(packet_file, "rb") as binary_data: - packet_generator = packet_parser.generator(binary_data) + packet_generator = packet_definition.packet_generator(binary_data) return list(packet_generator) diff --git a/imap_processing/glows/l0/decom_glows.py b/imap_processing/glows/l0/decom_glows.py index e892d5348..7782d68a0 100644 --- a/imap_processing/glows/l0/decom_glows.py +++ b/imap_processing/glows/l0/decom_glows.py @@ -3,7 +3,7 @@ from enum import Enum from pathlib import Path -from space_packet_parser import parser, xtcedef +from space_packet_parser import definitions from imap_processing import imap_module_directory from imap_processing.ccsds.ccsds_data import CcsdsData @@ -49,8 +49,7 @@ def decom_packets( f"{imap_module_directory}/glows/packet_definitions/GLX_COMBINED.xml" ) - packet_definition = xtcedef.XtcePacketDefinition(xtce_document) - glows_parser = parser.PacketParser(packet_definition) + packet_definition = definitions.XtcePacketDefinition(xtce_document) histdata = [] dedata = [] @@ -58,30 +57,20 @@ def decom_packets( filename = packet_file_path.name with open(packet_file_path, "rb") as binary_data: - glows_packets = glows_parser.generator(binary_data) + glows_packets = packet_definition.packet_generator(binary_data) for packet in glows_packets: - apid = packet.header["PKT_APID"].derived_value + apid = packet["PKT_APID"] # Do something with the packet data if apid == GlowsParams.HIST_APID.value: - values = [ - item.derived_value - if item.derived_value is not None - else item.raw_value - for item in packet.data.values() - ] + values = [item.raw_value for item in packet.user_data.values()] hist_l0 = HistogramL0( __version__, filename, CcsdsData(packet.header), *values ) histdata.append(hist_l0) if apid == GlowsParams.DE_APID.value: - values = [ - item.derived_value - if item.derived_value is not None - else item.raw_value - for item in packet.data.values() - ] + values = [item.raw_value for item in packet.user_data.values()] de_l0 = DirectEventL0( __version__, filename, CcsdsData(packet.header), *values diff --git a/imap_processing/glows/l0/glows_l0_data.py b/imap_processing/glows/l0/glows_l0_data.py index dd68530b4..a8965df68 100644 --- a/imap_processing/glows/l0/glows_l0_data.py +++ b/imap_processing/glows/l0/glows_l0_data.py @@ -114,17 +114,7 @@ class HistogramL0(GlowsL0): ELAVG: int ELVAR: int EVENTS: int - HISTOGRAM_DATA: bytearray - - def __post_init__(self) -> None: - """Convert HISTOGRAM_DATA attribute from string to bytearray if needed.""" - if isinstance(self.HISTOGRAM_DATA, str): - # Convert string output from space_packet_parser to bytearray - self.HISTOGRAM_DATA = bytearray( - int(self.HISTOGRAM_DATA, 2).to_bytes( - len(self.HISTOGRAM_DATA) // 8, "big" - ) - ) + HISTOGRAM_DATA: bytes @dataclass diff --git a/imap_processing/hi/l1a/histogram.py b/imap_processing/hi/l1a/histogram.py index e5a0cae67..33d09846f 100644 --- a/imap_processing/hi/l1a/histogram.py +++ b/imap_processing/hi/l1a/histogram.py @@ -4,6 +4,7 @@ import xarray as xr from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes +from imap_processing.utils import convert_to_binary_string # define the names of the 24 counter arrays # contained in the histogram packet @@ -59,10 +60,11 @@ def create_dataset(input_ds: xr.Dataset) -> xr.Dataset: # TODO: Look into avoiding the for-loops below # It seems like we could try to reshape the arrays and do some numpy # broadcasting rather than for-loops directly here - for i_epoch, counters_binary_data in enumerate(input_ds["counters"].data): + for i_epoch, counters_bytes_data in enumerate(input_ds["counters"].data): + binary_str_val = convert_to_binary_string(counters_bytes_data) # unpack 24 arrays of 90 12-bit unsigned integers counter_ints = [ - int(counters_binary_data[i * 12 : (i + 1) * 12], 2) for i in range(90 * 24) + int(binary_str_val[i * 12 : (i + 1) * 12], 2) for i in range(90 * 24) ] # populate the dataset with the unpacked integers for i_counter, counter in enumerate( diff --git a/imap_processing/hi/l1a/science_direct_event.py b/imap_processing/hi/l1a/science_direct_event.py index 407170bad..fc08bc01d 100644 --- a/imap_processing/hi/l1a/science_direct_event.py +++ b/imap_processing/hi/l1a/science_direct_event.py @@ -5,6 +5,7 @@ from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes from imap_processing.spice.time import met_to_j2000ns +from imap_processing.utils import convert_to_binary_string # TODO: read LOOKED_UP_DURATION_OF_TICK from # instrument status summary later. This value @@ -328,8 +329,9 @@ def science_direct_event(packets_data: xr.Dataset) -> xr.Dataset: # end of the list. This way, I don't need to flatten # the list later. for i, data in enumerate(packets_data["de_tof"].data): + binary_str_val = convert_to_binary_string(data) # break binary stream data into unit of 48-bits - event_48bits_list = break_into_bits_size(data) + event_48bits_list = break_into_bits_size(binary_str_val) # parse 48-bits into meaningful data such as metaevent or direct event de_data_list.extend([parse_direct_event(event) for event in event_48bits_list]) # add packet time to packet_met_time diff --git a/imap_processing/hit/l0/data_classes/housekeeping.py b/imap_processing/hit/l0/data_classes/housekeeping.py index 832a6c818..c9dd3b5b3 100644 --- a/imap_processing/hit/l0/data_classes/housekeeping.py +++ b/imap_processing/hit/l0/data_classes/housekeeping.py @@ -213,7 +213,7 @@ class Housekeeping(HITBase): def __init__( self, - packet: space_packet_parser.parser.Packet, + packet: space_packet_parser.packets.CCSDSPacket, software_version: str, packet_file_name: str, ): diff --git a/imap_processing/hit/l0/decom_hit.py b/imap_processing/hit/l0/decom_hit.py index 23f9256c3..67c450435 100644 --- a/imap_processing/hit/l0/decom_hit.py +++ b/imap_processing/hit/l0/decom_hit.py @@ -5,6 +5,8 @@ import numpy as np import xarray as xr +from imap_processing.utils import convert_to_binary_string + # TODO: Consider moving global values into a config file # Structure to hold binary details for a @@ -357,7 +359,9 @@ def assemble_science_frames(sci_dataset: xr.Dataset) -> xr.Dataset: # Convert sequence flags and counters to NumPy arrays for vectorized operations seq_flgs = sci_dataset.seq_flgs.values seq_ctrs = sci_dataset.src_seq_ctr.values - science_data = sci_dataset.science_data.values + science_data = [ + convert_to_binary_string(data) for data in sci_dataset.science_data.values + ] epoch_data = sci_dataset.epoch.values # Number of packets in the file diff --git a/imap_processing/hit/l0/utils/hit_base.py b/imap_processing/hit/l0/utils/hit_base.py index 7cba7d95f..d8f6d29e4 100644 --- a/imap_processing/hit/l0/utils/hit_base.py +++ b/imap_processing/hit/l0/utils/hit_base.py @@ -31,19 +31,19 @@ class HITBase: packet_file_name: str ccsds_header: CcsdsData - def parse_data(self, packet: space_packet_parser.parser.Packet) -> None: + def parse_data(self, packet: space_packet_parser.packets.CCSDSPacket) -> None: """ Parse Lo L0 packet data. Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket A single Lo L0 packet from space packet parser. """ attributes = [field.name for field in fields(self)] # For each item in packet, assign it to the matching attribute in the class. - for key, item in packet.data.items(): + for key, item in packet.user_data.items(): value = ( item.derived_value if item.derived_value is not None else item.raw_value ) diff --git a/imap_processing/idex/idex_l1a.py b/imap_processing/idex/idex_l1a.py index f8d7b6713..8db16d285 100644 --- a/imap_processing/idex/idex_l1a.py +++ b/imap_processing/idex/idex_l1a.py @@ -18,6 +18,7 @@ from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes from imap_processing.idex.idex_l0 import decom_packets from imap_processing.spice.time import met_to_j2000ns +from imap_processing.utils import convert_to_binary_string logger = logging.getLogger(__name__) @@ -131,9 +132,9 @@ def __init__(self, packet_file: Union[str, Path], data_version: str) -> None: dust_events = {} for packet in decom_packet_list: - if "IDX__SCI0TYPE" in packet.data: - scitype = packet.data["IDX__SCI0TYPE"].raw_value - event_number = packet.data["IDX__SCI0EVTNUM"].derived_value + if "IDX__SCI0TYPE" in packet: + scitype = packet["IDX__SCI0TYPE"] + event_number = packet["IDX__SCI0EVTNUM"] if scitype == Scitype.FIRST_PACKET: # Initial packet for new dust event # Further packets will fill in data @@ -167,7 +168,7 @@ class RawDustEvent: Parameters ---------- - header_packet : space_packet_parser.parser.Packet + header_packet : space_packet_parser.packets.CCSDSPacket The FPGA metadata event header. data_version : str The version of the data product being created. @@ -217,7 +218,7 @@ class RawDustEvent: ) def __init__( - self, header_packet: space_packet_parser.parser.Packet, data_version: str + self, header_packet: space_packet_parser.packets.CCSDSPacket, data_version: str ) -> None: """ Initialize a raw dust event, with an FPGA Header Packet from IDEX. @@ -230,7 +231,7 @@ def __init__( Parameters ---------- - header_packet : space_packet_parser.parser.Packet + header_packet : space_packet_parser.packets.CCSDSPacket The FPGA metadata event header. data_version : str Data version for CDF filename, in the format ``vXXX``. @@ -247,7 +248,7 @@ def __init__( # Iterate through the trigger description dictionary and pull out the values self.trigger_values = { - trigger.name: header_packet.data[trigger.packet_name].raw_value + trigger.name: header_packet[trigger.packet_name].raw_value for trigger in TRIGGER_DESCRIPTION_DICT.values() } logger.debug( @@ -293,7 +294,7 @@ def _append_raw_data(self, scitype: Scitype, bits: str) -> None: else: logger.warning("Unknown science type received: [%s]", scitype) - def _set_impact_time(self, packet: space_packet_parser.parser.Packet) -> None: + def _set_impact_time(self, packet: space_packet_parser.packets.CCSDSPacket) -> None: """ Calculate the impact time from the FPGA header information. @@ -302,7 +303,7 @@ def _set_impact_time(self, packet: space_packet_parser.parser.Packet) -> None: Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket The IDEX FPGA header packet. Notes @@ -312,9 +313,9 @@ def _set_impact_time(self, packet: space_packet_parser.parser.Packet) -> None: testing. """ # Number of seconds since epoch (nominally the launch time) - seconds_since_launch = packet.data["SHCOARSE"].derived_value + seconds_since_launch = packet["SHCOARSE"] # Number of 20 microsecond "ticks" since the last second - num_of_20_microsecond_increments = packet.data["SHFINE"].derived_value + num_of_20_microsecond_increments = packet["SHFINE"] # Number of microseconds since the last second microseconds_since_last_second = 20 * num_of_20_microsecond_increments # Get the datetime of Jan 1 2012 as the start date @@ -323,7 +324,7 @@ def _set_impact_time(self, packet: space_packet_parser.parser.Packet) -> None: self.impact_time = met_to_j2000ns(met) def _set_sample_trigger_times( - self, packet: space_packet_parser.parser.Packet + self, packet: space_packet_parser.packets.CCSDSPacket ) -> None: """ Calculate the actual sample trigger time. @@ -333,7 +334,7 @@ def _set_sample_trigger_times( Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket The IDEX FPGA header packet info. Notes @@ -353,15 +354,11 @@ def _set_sample_trigger_times( rather than the number of samples before triggering. """ # Retrieve the number of samples of high gain delay - high_gain_delay = packet.data["IDX__TXHDRADC0IDELAY"].raw_value + high_gain_delay = packet["IDX__TXHDRADC0IDELAY"] # Retrieve number of low/high sample pre-trigger blocks - num_low_sample_pretrigger_blocks = packet.data[ - "IDX__TXHDRLSPREBLOCKS" - ].derived_value - num_high_sample_pretrigger_blocks = packet.data[ - "IDX__TXHDRHSPREBLOCKS" - ].derived_value + num_low_sample_pretrigger_blocks = packet["IDX__TXHDRLSPREBLOCKS"] + num_high_sample_pretrigger_blocks = packet["IDX__TXHDRHSPREBLOCKS"] # Calculate the low and high sample trigger times based on the high gain delay # and the number of high sample/low sample pretrigger blocks @@ -488,18 +485,20 @@ def _calc_high_sample_resolution(self, num_samples: int) -> npt.NDArray: ) return time_high_sr_data - def _populate_bit_strings(self, packet: space_packet_parser.parser.Packet) -> None: + def _populate_bit_strings( + self, packet: space_packet_parser.packets.CCSDSPacket + ) -> None: """ Parse IDEX data packets to populate bit strings. Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket A single science data packet for one of the 6. IDEX observables. """ - scitype = packet.data["IDX__SCI0TYPE"].raw_value - raw_science_bits = packet.data["IDX__SCI0RAW"].raw_value + scitype = packet["IDX__SCI0TYPE"] + raw_science_bits = convert_to_binary_string(packet["IDX__SCI0RAW"]) self._append_raw_data(scitype, raw_science_bits) def process(self) -> xr.Dataset: diff --git a/imap_processing/lo/l0/data_classes/star_sensor.py b/imap_processing/lo/l0/data_classes/star_sensor.py index 512fa7349..1296f161d 100644 --- a/imap_processing/lo/l0/data_classes/star_sensor.py +++ b/imap_processing/lo/l0/data_classes/star_sensor.py @@ -25,7 +25,7 @@ class StarSensor(LoBase): Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket The packet. software_version : str Software version. @@ -60,7 +60,7 @@ class StarSensor(LoBase): # must be commented out for the unit tests to run properly def __init__( self, - packet: space_packet_parser.parser.Packet, + packet: space_packet_parser.packets.CCSDSPacket, software_version: str, packet_file_name: str, ) -> None: diff --git a/imap_processing/lo/l0/lo_science.py b/imap_processing/lo/l0/lo_science.py index 0718192a2..e9b29abd6 100644 --- a/imap_processing/lo/l0/lo_science.py +++ b/imap_processing/lo/l0/lo_science.py @@ -17,6 +17,7 @@ Decompress, decompress_int, ) +from imap_processing.utils import convert_to_binary_string HistPacking = namedtuple( "HistPacking", @@ -70,7 +71,7 @@ def parse_histogram(dataset: xr.Dataset, attr_mgr: ImapCdfAttributes) -> xr.Data dataset : xr.Dataset Parsed and decompressed histogram data. """ - hist_bin = dataset.sci_cnt + hist_bin = [convert_to_binary_string(data) for data in dataset.sci_cnt.values] # initialize the starting bit for the sections of data section_start = 0 @@ -83,7 +84,7 @@ def parse_histogram(dataset: xr.Dataset, attr_mgr: ImapCdfAttributes) -> xr.Data decompress( bin_str, data_meta.bit_length, section_start, data_meta.section_length ) - for bin_str in hist_bin.values + for bin_str in hist_bin ] # add on the epoch length (equal to number of packets) to the diff --git a/imap_processing/lo/l0/utils/lo_base.py b/imap_processing/lo/l0/utils/lo_base.py index b369dda5f..e2cff4507 100644 --- a/imap_processing/lo/l0/utils/lo_base.py +++ b/imap_processing/lo/l0/utils/lo_base.py @@ -2,7 +2,7 @@ from dataclasses import dataclass, fields -from space_packet_parser.parser import Packet +from space_packet_parser import packets from imap_processing.ccsds.ccsds_data import CcsdsData @@ -31,19 +31,19 @@ class LoBase: packet_file_name: str ccsds_header: CcsdsData - def set_attributes(self, packet: Packet) -> None: + def set_attributes(self, packet: packets.CCSDSPacket) -> None: """ Set dataclass attributes with packet data. Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket A single Lo L0 packet from space packet parser. """ attributes = [field.name for field in fields(self)] # For each item in packet, assign it to the matching attribute in the class. - for key, item in packet.data.items(): + for key, item in packet.user_data.items(): value = ( item.derived_value if item.derived_value is not None else item.raw_value ) diff --git a/imap_processing/mag/l0/decom_mag.py b/imap_processing/mag/l0/decom_mag.py index e9adb998d..35af6dec1 100644 --- a/imap_processing/mag/l0/decom_mag.py +++ b/imap_processing/mag/l0/decom_mag.py @@ -9,7 +9,7 @@ import numpy as np import xarray as xr -from space_packet_parser import parser, xtcedef +from space_packet_parser import definitions from imap_processing import imap_module_directory from imap_processing.ccsds.ccsds_data import CcsdsData @@ -41,24 +41,18 @@ def decom_packets(packet_file_path: str | Path) -> dict[str, list[MagL0]]: f"{imap_module_directory}/mag/packet_definitions/MAG_SCI_COMBINED.xml" ) - packet_definition = xtcedef.XtcePacketDefinition(xtce_document) - mag_parser = parser.PacketParser(packet_definition) + packet_definition = definitions.XtcePacketDefinition(xtce_document) norm_data = [] burst_data = [] with open(packet_file_path, "rb") as binary_data: - mag_packets = mag_parser.generator(binary_data) + mag_packets = packet_definition.packet_generator(binary_data) for packet in mag_packets: - apid = packet.header["PKT_APID"].derived_value + apid = packet["PKT_APID"] if apid in (Mode.BURST, Mode.NORMAL): - values = [ - item.derived_value - if item.derived_value is not None - else item.raw_value - for item in packet.data.values() - ] + values = [item.raw_value for item in packet.user_data.values()] if apid == Mode.NORMAL: norm_data.append(MagL0(CcsdsData(packet.header), *values)) else: diff --git a/imap_processing/mag/l0/mag_l0_data.py b/imap_processing/mag/l0/mag_l0_data.py index 8427a2a10..8f1011663 100644 --- a/imap_processing/mag/l0/mag_l0_data.py +++ b/imap_processing/mag/l0/mag_l0_data.py @@ -97,7 +97,7 @@ class MagL0: PRI_FNTM: int SEC_COARSETM: int SEC_FNTM: int - VECTORS: np.ndarray | str + VECTORS: np.ndarray | bytes def __post_init__(self) -> None: """ @@ -106,11 +106,11 @@ def __post_init__(self) -> None: Also convert encoded "VECSEC" (vectors per second) into proper vectors per second values. """ - if isinstance(self.VECTORS, str): - # Convert string output from space_packet_parser to numpy array of + if isinstance(self.VECTORS, bytes): + # Convert byte output from space_packet_parser to numpy array of # big-endian bytes self.VECTORS = np.frombuffer( - int(self.VECTORS, 2).to_bytes(len(self.VECTORS) // 8, "big"), + self.VECTORS, dtype=np.dtype(">B"), ) diff --git a/imap_processing/swe/l1a/swe_science.py b/imap_processing/swe/l1a/swe_science.py index 88ab527e8..660ecbdf4 100644 --- a/imap_processing/swe/l1a/swe_science.py +++ b/imap_processing/swe/l1a/swe_science.py @@ -119,9 +119,7 @@ def swe_science(l0_dataset: xr.Dataset, data_version: str) -> xr.Dataset: # 4. Reshape the data to 180 x 7 raw_science_array = np.array( [ - np.frombuffer( - int(binary_string, 2).to_bytes(1260, byteorder="big"), dtype=np.uint8 - ).reshape(180, 7) + np.frombuffer(binary_string, dtype=np.uint8).reshape(180, 7) for binary_string in l0_dataset["science_data"].values ] ) diff --git a/imap_processing/tests/glows/test_glows_decom.py b/imap_processing/tests/glows/test_glows_decom.py index 5431c5056..5ae9db9ee 100644 --- a/imap_processing/tests/glows/test_glows_decom.py +++ b/imap_processing/tests/glows/test_glows_decom.py @@ -1,7 +1,6 @@ from collections import namedtuple import pytest -from space_packet_parser.parser import ParsedDataItem from imap_processing.ccsds.ccsds_data import CcsdsData @@ -66,26 +65,26 @@ def test_bad_header(): def test_header(decom_test_data): expected_hist = CcsdsData( { - "VERSION": ParsedDataItem("VERSION", 0, unit=None), - "TYPE": ParsedDataItem("TYPE", 0, unit=None), - "SEC_HDR_FLG": ParsedDataItem("SEC_HDR_FLG", 1, unit=None), - "PKT_APID": ParsedDataItem("PKT_APID", 1480, unit=None), - "SEQ_FLGS": ParsedDataItem("SEQ_FLGS", 3, unit=None), - "SRC_SEQ_CTR": ParsedDataItem("SRC_SEQ_CTR", 0, unit=None), - "PKT_LEN": ParsedDataItem("PKT_LEN", 3663, unit=None), + "VERSION": 0, + "TYPE": 0, + "SEC_HDR_FLG": 1, + "PKT_APID": 1480, + "SEQ_FLGS": 3, + "SRC_SEQ_CTR": 0, + "PKT_LEN": 3663, } ) assert expected_hist == decom_test_data[0][0].ccsds_header expected_de = CcsdsData( { - "VERSION": ParsedDataItem("VERSION", 0, unit=None), - "TYPE": ParsedDataItem("TYPE", 0, unit=None), - "SEC_HDR_FLG": ParsedDataItem("SEC_HDR_FLG", 1, unit=None), - "PKT_APID": ParsedDataItem("PKT_APID", 1481, unit=None), - "SEQ_FLGS": ParsedDataItem("SEQ_FLGS", 3, unit=None), - "SRC_SEQ_CTR": ParsedDataItem("SRC_SEQ_CTR", 0, unit=None), - "PKT_LEN": ParsedDataItem("PKT_LEN", 2775, unit=None), + "VERSION": 0, + "TYPE": 0, + "SEC_HDR_FLG": 1, + "PKT_APID": 1481, + "SEQ_FLGS": 3, + "SRC_SEQ_CTR": 0, + "PKT_LEN": 2775, } ) @@ -94,21 +93,19 @@ def test_header(decom_test_data): def test_bytearrays(decom_test_data): for hist_test_data in decom_test_data[0]: - assert isinstance(hist_test_data.HISTOGRAM_DATA, bytearray) + assert isinstance(hist_test_data.HISTOGRAM_DATA, bytes) for de_test_data in decom_test_data[1]: - assert isinstance(de_test_data.DE_DATA, bytearray) - - # print(decom_test_data[0][0].HISTOGRAM_DATA[:32].hex()) + assert isinstance(de_test_data.DE_DATA, bytes) # first 32 bytes, from original binary string of the first test histogram packet - expected_value_hist_partial = bytearray.fromhex( + expected_value_hist_partial = bytes.fromhex( "1D1E1E1D1D1E1E1E1E1D1D1E1F1D1E1E1F1D1E1E1F1E1E1E1F1F1E1E1E1F1F1E" ) assert decom_test_data[0][0].HISTOGRAM_DATA[:32] == expected_value_hist_partial - expected_value_de_partial = bytearray.fromhex( + expected_value_de_partial = bytes.fromhex( "033B8512033B8511001E74D6033B851300010100B71B444400372B0109CB07D7" ) diff --git a/imap_processing/tests/ialirt/unit/test_decom_ialirt.py b/imap_processing/tests/ialirt/unit/test_decom_ialirt.py index 0948917c6..e570a5d12 100644 --- a/imap_processing/tests/ialirt/unit/test_decom_ialirt.py +++ b/imap_processing/tests/ialirt/unit/test_decom_ialirt.py @@ -62,26 +62,26 @@ def test_enumerated(decom_packets_data): """Test if enumerated values derived correctly""" for packet in decom_packets_data: - assert packet.data["SC_SWAPI_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_MAG_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_HIT_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_CODICE_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_LO_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_HI_45_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_HI_90_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_ULTRA_45_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_ULTRA_90_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_SWE_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_IDEX_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_GLOWS_STATUS"].derived_value == "NOT_OPERATIONAL" - assert packet.data["SC_SPINPERIODVALID"].derived_value == "INVALID" - assert packet.data["SC_SPINPHASEVALID"].derived_value == "INVALID" - assert packet.data["SC_ATTITUDE"].derived_value == "SUNSENSOR" - assert packet.data["SC_CATBEDHEATERFLAG"].derived_value == "ON" - assert packet.data["SC_AUTONOMY"].derived_value == "OPERATIONAL" - assert packet.data["HIT_STATUS"].derived_value == "OFF-NOMINAL" - assert packet.data["SWE_NOM_FLAG"].derived_value == "OFF-NOMINAL" - assert packet.data["SWE_OPS_FLAG"].derived_value == "NON-HVSCI" + assert packet["SC_SWAPI_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_MAG_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_HIT_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_CODICE_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_LO_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_HI_45_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_HI_90_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_ULTRA_45_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_ULTRA_90_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_SWE_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_IDEX_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_GLOWS_STATUS"] == "NOT_OPERATIONAL" + assert packet["SC_SPINPERIODVALID"] == "INVALID" + assert packet["SC_SPINPHASEVALID"] == "INVALID" + assert packet["SC_ATTITUDE"] == "SUNSENSOR" + assert packet["SC_CATBEDHEATERFLAG"] == "ON" + assert packet["SC_AUTONOMY"] == "OPERATIONAL" + assert packet["HIT_STATUS"] == "OFF-NOMINAL" + assert packet["SWE_NOM_FLAG"] == "OFF-NOMINAL" + assert packet["SWE_OPS_FLAG"] == "NON-HVSCI" def test_generate_xarray(binary_packet_path, xtce_ialirt_path, decom_packets_data): diff --git a/imap_processing/tests/swapi/test_swapi_decom.py b/imap_processing/tests/swapi/test_swapi_decom.py index 5385e5947..45af40019 100644 --- a/imap_processing/tests/swapi/test_swapi_decom.py +++ b/imap_processing/tests/swapi/test_swapi_decom.py @@ -45,18 +45,18 @@ def test_swapi_sci_data(decom_test_data, swapi_l0_validation_data_path): grouped_data = group_by_apid(decom_test_data) sci_packets = grouped_data[SWAPIAPID.SWP_SCI] first_data = sci_packets[0] - validation_data = raw_validation_data.loc[first_data.data["SHCOARSE"].raw_value] + validation_data = raw_validation_data.loc[first_data["SHCOARSE"]] # compare raw values of validation data - for key, value in first_data.data.items(): + for key, value in first_data.items(): # check if the data is the same if key == "PLAN_ID_SCIENCE": # We had to work around this because HK and SCI packet uses # PLAN_ID but they uses different length of bits. - assert value.raw_value == validation_data["PLAN_ID"] + assert value == validation_data["PLAN_ID"] elif key == "SPARE_2_SCIENCE": # Same for this SPARE_2 as above case - assert value.raw_value == validation_data["SPARE_2"] + assert value == validation_data["SPARE_2"] elif key == "MODE": assert value.raw_value == validation_data[key] elif "RNG" in key: @@ -81,7 +81,7 @@ def test_swapi_hk_data(decom_test_data, swapi_l0_validation_data_path): grouped_data = group_by_apid(decom_test_data) hk_packets = grouped_data[SWAPIAPID.SWP_HK] first_data = hk_packets[0] - validation_data = raw_validation_data.loc[first_data.data["SHCOARSE"].raw_value] + validation_data = raw_validation_data.loc[first_data["SHCOARSE"]] bad_keys = [ "N5_V", "SCEM_I", @@ -95,19 +95,19 @@ def test_swapi_hk_data(decom_test_data, swapi_l0_validation_data_path): "CHKSUM", ] # compare raw values of validation data - for key, value in first_data.data.items(): + for key, value in first_data.items(): if key == "PLAN_ID_HK": # We had to work around this because HK and SCI packet uses # PLAN_ID but they uses different length of bits. - assert value.raw_value == validation_data["PLAN_ID"] + assert value == validation_data["PLAN_ID"] elif key == "SPARE_2_HK": # Same for this SPARE_2 as PLAN_ID - assert value.raw_value == validation_data["SPARE_2"] + assert value == validation_data["SPARE_2"] elif key == "SHCOARSE": # for SHCOARSE we need the name of the column. # This is done because pandas removed it from the main columns # to make it the index. - assert value.raw_value == validation_data.name + assert value == validation_data.name elif key in bad_keys: # TODO: remove this elif after getting good validation data # Validation data has wrong value for N5_V diff --git a/imap_processing/tests/ultra/unit/test_decom_apid_880.py b/imap_processing/tests/ultra/unit/test_decom_apid_880.py index 1317c9388..32ea8b80c 100644 --- a/imap_processing/tests/ultra/unit/test_decom_apid_880.py +++ b/imap_processing/tests/ultra/unit/test_decom_apid_880.py @@ -31,10 +31,10 @@ def test_aux_enumerated(decom_test_data): apid_data = grouped_data[880] for packet in apid_data: - assert packet.data["SPINPERIODVALID"].derived_value == "INVALID" - assert packet.data["SPINPHASEVALID"].derived_value == "VALID" - assert packet.data["SPINPERIODSOURCE"].derived_value == "NOMINAL" - assert packet.data["CATBEDHEATERFLAG"].derived_value == "UNFLAGGED" + assert packet["SPINPERIODVALID"] == "INVALID" + assert packet["SPINPHASEVALID"] == "VALID" + assert packet["SPINPERIODSOURCE"] == "NOMINAL" + assert packet["CATBEDHEATERFLAG"] == "UNFLAGGED" count += 1 assert count == total_packets @@ -59,11 +59,11 @@ def test_aux_mode(decom_test_data): _, packets = decom_test_data for packet in packets: - if packet.header["PKT_APID"].derived_value == 880: - assert packet.data["HWMODE"].derived_value == "MODE0" - assert packet.data["IMCENB"].derived_value == "MODE0" - assert packet.data["LEFTDEFLECTIONCHARGE"].derived_value == "MODE0" - assert packet.data["RIGHTDEFLECTIONCHARGE"].derived_value == "MODE0" + if packet["PKT_APID"] == 880: + assert packet["HWMODE"] == "MODE0" + assert packet["IMCENB"] == "MODE0" + assert packet["LEFTDEFLECTIONCHARGE"] == "MODE0" + assert packet["RIGHTDEFLECTIONCHARGE"] == "MODE0" @pytest.mark.parametrize( diff --git a/imap_processing/ultra/l0/decom_tools.py b/imap_processing/ultra/l0/decom_tools.py index f099c4d16..6a4faeb16 100644 --- a/imap_processing/ultra/l0/decom_tools.py +++ b/imap_processing/ultra/l0/decom_tools.py @@ -9,6 +9,7 @@ append_fillval, parse_event, ) +from imap_processing.utils import convert_to_binary_string def read_and_advance( @@ -238,14 +239,14 @@ def decompress_image( def read_image_raw_events_binary( - packet: space_packet_parser.parser.Packet, decom_data: dict + packet: space_packet_parser.packets.CCSDSPacket, decom_data: dict ) -> dict: """ Convert contents of binary string 'EVENTDATA' into values. Parameters ---------- - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket Packet. decom_data : dict Parsed data. @@ -255,8 +256,8 @@ def read_image_raw_events_binary( decom_data : dict Each for loop appends to the existing dictionary. """ - binary = packet.data["EVENTDATA"].raw_value - count = packet.data["COUNT"].derived_value + binary = convert_to_binary_string(packet["EVENTDATA"]) + count = packet["COUNT"] # 166 bits per event event_length = 166 if count else 0 diff --git a/imap_processing/ultra/l0/decom_ultra.py b/imap_processing/ultra/l0/decom_ultra.py index f01f793b8..64c9faad9 100644 --- a/imap_processing/ultra/l0/decom_ultra.py +++ b/imap_processing/ultra/l0/decom_ultra.py @@ -6,7 +6,7 @@ from typing import Any, Union import numpy as np -from space_packet_parser.parser import Packet +from space_packet_parser import packets from imap_processing.ccsds.ccsds_data import CcsdsData from imap_processing.ultra.l0.decom_tools import ( @@ -22,7 +22,7 @@ ULTRA_TOF, append_ccsds_fields, ) -from imap_processing.utils import sort_by_time +from imap_processing.utils import convert_to_binary_string, sort_by_time logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @@ -30,7 +30,7 @@ def append_tof_params( decom_data: dict, - packet: Packet, + packet: packets.CCSDSPacket, decompressed_data: np.ndarray, data_dict: dict, stacked_dict: dict, @@ -42,7 +42,7 @@ def append_tof_params( ---------- decom_data : dict Dictionary to which the data is appended. - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket Individual packet. decompressed_data : list Data that has been decompressed. @@ -53,24 +53,24 @@ def append_tof_params( """ # TODO: add error handling to make certain every timestamp has 8 SID values - for key in packet.data.keys(): + for key in packet.user_data.keys(): # Keep appending packet data until SID = 7 if key == "PACKETDATA": data_dict[key].append(decompressed_data) # Keep appending all other data until SID = 7 else: - data_dict[key].append(packet.data[key].derived_value) + data_dict[key].append(packet[key]) # Append CCSDS fields to the dictionary ccsds_data = CcsdsData(packet.header) append_ccsds_fields(data_dict, ccsds_data) # Once "SID" reaches 7, we have all the images and data for the single timestamp - if packet.data["SID"].derived_value == 7: + if packet["SID"] == 7: decom_data["SHCOARSE"].extend(list(set(data_dict["SHCOARSE"]))) data_dict["SHCOARSE"].clear() - for key in packet.data.keys(): + for key in packet.user_data.keys(): if key != "SHCOARSE": stacked_dict[key].append(np.stack(data_dict[key])) data_dict[key].clear() @@ -79,7 +79,7 @@ def append_tof_params( data_dict[key].clear() -def append_params(decom_data: dict, packet: Packet) -> None: +def append_params(decom_data: dict, packet: packets.CCSDSPacket) -> None: # Todo Update what packet type is. """ Append parsed items to a dictionary, including decompressed data if available. @@ -88,11 +88,11 @@ def append_params(decom_data: dict, packet: Packet) -> None: ---------- decom_data : dict Dictionary to which the data is appended. - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket Individual packet. """ - for key, item in packet.data.items(): - decom_data[key].append(item.derived_value) + for key, value in packet.user_data.items(): + decom_data[key].append(value) ccsds_data = CcsdsData(packet.header) append_ccsds_fields(decom_data, ccsds_data) @@ -154,16 +154,17 @@ def process_ultra_tof( # For TOF we need to sort by time and then SID sorted_packets = sorted( sorted_packets, - key=lambda x: (x.data["SHCOARSE"].raw_value, x.data["SID"].raw_value), + key=lambda x: (x["SHCOARSE"].raw_value, x["SID"].raw_value), ) if isinstance(ULTRA_TOF.mantissa_bit_length, int) and isinstance( ULTRA_TOF.width, int ): for packet in sorted_packets: + binary_data = convert_to_binary_string(packet["PACKETDATA"]) # Decompress the image data decompressed_data = decompress_image( - packet.data["P00"].derived_value, - packet.data["PACKETDATA"].raw_value, + packet["P00"], + binary_data, ULTRA_TOF.width, ULTRA_TOF.mantissa_bit_length, ) @@ -205,7 +206,7 @@ def process_ultra_events(sorted_packets: list, decom_data: dict) -> dict: # Here there are multiple images in a single packet, # so we need to loop through each image and decompress it. decom_data = read_image_raw_events_binary(packet, decom_data) - count = packet.data["COUNT"].derived_value + count = packet["COUNT"] if count == 0: append_params(decom_data, packet) @@ -262,8 +263,9 @@ def process_ultra_rates(sorted_packets: list, decom_data: dict) -> dict: and isinstance(ULTRA_RATES.width, int) ): for packet in sorted_packets: + raw_binary_string = convert_to_binary_string(packet["FASTDATA_00"]) decompressed_data = decompress_binary( - packet.data["FASTDATA_00"].raw_value, + raw_binary_string, ULTRA_RATES.width, ULTRA_RATES.block, ULTRA_RATES.len_array, diff --git a/imap_processing/ultra/l0/ultra_utils.py b/imap_processing/ultra/l0/ultra_utils.py index 2d0f84be3..ca8ba42d9 100644 --- a/imap_processing/ultra/l0/ultra_utils.py +++ b/imap_processing/ultra/l0/ultra_utils.py @@ -279,11 +279,11 @@ def append_fillval(decom_data: dict, packet): # type: ignore[no-untyped-def] ---------- decom_data : dict Parsed data. - packet : space_packet_parser.parser.Packet + packet : space_packet_parser.packets.CCSDSPacket Packet. """ for key in decom_data: - if (key not in packet.header.keys()) and (key not in packet.data.keys()): + if (key not in packet.header.keys()) and (key not in packet.user_data.keys()): decom_data[key].append(np.iinfo(np.int64).min) diff --git a/imap_processing/utils.py b/imap_processing/utils.py index c9ec7b92c..fd1dd0e81 100644 --- a/imap_processing/utils.py +++ b/imap_processing/utils.py @@ -8,9 +8,8 @@ import numpy as np import pandas as pd import xarray as xr -from space_packet_parser import parser, xtcedef +from space_packet_parser import definitions, encodings, parameters -from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes from imap_processing.spice.time import met_to_j2000ns logger = logging.getLogger(__name__) @@ -33,7 +32,7 @@ def sort_by_time(packets: list, time_key: str) -> list: sorted_packets : list Sorted packets. """ - sorted_packets = sorted(packets, key=lambda x: x.data[time_key].raw_value) + sorted_packets = sorted(packets, key=lambda x: x[time_key]) return sorted_packets @@ -53,7 +52,7 @@ def group_by_apid(packets: list) -> dict: """ grouped_packets: dict[list] = collections.defaultdict(list) for packet in packets: - apid = packet.header["PKT_APID"].raw_value + apid = packet["PKT_APID"] grouped_packets.setdefault(apid, []).append(packet) return grouped_packets @@ -140,94 +139,10 @@ def convert_raw_to_eu( return dataset -def create_dataset( - packets: list[parser.Packet], - spacecraft_time_key: str = "shcoarse", - include_header: bool = True, - skip_keys: Optional[list[str]] = None, -) -> xr.Dataset: - """ - Create dataset for each metadata field. - - Parameters - ---------- - packets : list[Packet] - Packet list. - spacecraft_time_key : str - Default is "shcoarse" because many instrument uses it, optional. - This key is used to get spacecraft time for epoch dimension. - include_header : bool - Whether to include CCSDS header data in the dataset, optional. - skip_keys : list - Keys to skip in the metadata, optional. - - Returns - ------- - dataset : xr.dataset - Dataset with all metadata field data in xr.DataArray. - """ - metadata_arrays = collections.defaultdict(list) - description_dict = {} - - sorted_packets = sort_by_time(packets, spacecraft_time_key.upper()) - - for data_packet in sorted_packets: - data_to_include = ( - (data_packet.header | data_packet.data) - if include_header - else data_packet.data - ) - - # Drop keys using skip_keys - if skip_keys is not None: - for key in skip_keys: - data_to_include.pop(key, None) - - # Add metadata to array - for key, value in data_to_include.items(): - # convert key to lower case to match SPDF requirement - data_key = key.lower() - metadata_arrays[data_key].append(value.raw_value) - # description should be same for all packets - description_dict[data_key] = ( - value.long_description or value.short_description - ) - - # NOTE: At this point, we keep epoch time as raw value from packet - # which is in seconds and spacecraft time. Some instrument uses this - # raw value in processing. - # Load the CDF attributes - cdf_manager = ImapCdfAttributes() - epoch_time = xr.DataArray( - metadata_arrays[spacecraft_time_key], - name="epoch", - dims=["epoch"], - attrs=cdf_manager.get_variable_attributes("epoch"), - ) - - dataset = xr.Dataset( - coords={"epoch": epoch_time}, - ) - - # create xarray dataset for each metadata field - for key, value in metadata_arrays.items(): - # replace description and fieldname - data_attrs = cdf_manager.get_variable_attributes("metadata_attrs") - data_attrs["CATDESC"] = description_dict[key] - data_attrs["FIELDNAM"] = key - data_attrs["LABLAXIS"] = key - - dataset[key] = xr.DataArray( - value, - dims=["epoch"], - attrs=data_attrs, - ) - - return dataset - - def _get_minimum_numpy_datatype( # noqa: PLR0912 - Too many branches - name: str, definition: xtcedef.XtcePacketDefinition, use_derived_value: bool = True + name: str, + definition: definitions.XtcePacketDefinition, + use_derived_value: bool = True, ) -> Optional[str]: """ Get the minimum datatype for a given variable. @@ -236,7 +151,7 @@ def _get_minimum_numpy_datatype( # noqa: PLR0912 - Too many branches ---------- name : str The variable name. - definition : xtcedef.XtcePacketDefinition + definition : space_packet_parser.definitions.XtcePacketDefinition The XTCE packet definition. use_derived_value : bool, default True Whether or not the derived value from the XTCE definition was used. @@ -250,12 +165,12 @@ def _get_minimum_numpy_datatype( # noqa: PLR0912 - Too many branches if use_derived_value and isinstance( definition.named_parameters[name].parameter_type, - xtcedef.EnumeratedParameterType, + parameters.EnumeratedParameterType, ): # We don't have a way of knowing what is enumerated, # let numpy infer the datatype return None - elif isinstance(data_encoding, xtcedef.NumericDataEncoding): + elif isinstance(data_encoding, encodings.NumericDataEncoding): if use_derived_value and ( data_encoding.context_calibrators is not None or data_encoding.default_calibrator is not None @@ -264,7 +179,7 @@ def _get_minimum_numpy_datatype( # noqa: PLR0912 - Too many branches # let numpy infer the datatype return None nbits = data_encoding.size_in_bits - if isinstance(data_encoding, xtcedef.IntegerDataEncoding): + if isinstance(data_encoding, encodings.IntegerDataEncoding): datatype = "int" if data_encoding.encoding == "unsigned": datatype = "uint" @@ -276,17 +191,17 @@ def _get_minimum_numpy_datatype( # noqa: PLR0912 - Too many branches datatype += "32" else: datatype += "64" - elif isinstance(data_encoding, xtcedef.FloatDataEncoding): + elif isinstance(data_encoding, encodings.FloatDataEncoding): datatype = "float" if nbits == 32: datatype += "32" else: datatype += "64" - elif isinstance(data_encoding, xtcedef.BinaryDataEncoding): + elif isinstance(data_encoding, encodings.BinaryDataEncoding): # TODO: Binary string representation right now, do we want bytes or # something else like the new StringDType instead? - datatype = "str" - elif isinstance(data_encoding, xtcedef.StringDataEncoding): + datatype = "object" + elif isinstance(data_encoding, encodings.StringDataEncoding): # TODO: Use the new StringDType instead? datatype = "str" else: @@ -342,34 +257,31 @@ def packet_file_to_datasets( variable_mapping: dict[int, set] = dict() # Set up the parser from the input packet definition - packet_definition = xtcedef.XtcePacketDefinition(xtce_packet_definition) - packet_parser = parser.PacketParser(packet_definition) + packet_definition = definitions.XtcePacketDefinition(xtce_packet_definition) with open(packet_file, "rb") as binary_data: - packet_generator = packet_parser.generator(binary_data) + packet_generator = packet_definition.packet_generator(binary_data) for packet in packet_generator: - apid = packet.header["PKT_APID"].raw_value + apid = packet["PKT_APID"] if apid not in data_dict: # This is the first packet for this APID data_dict[apid] = collections.defaultdict(list) datatype_mapping[apid] = dict() - variable_mapping[apid] = packet.data.keys() - if variable_mapping[apid] != packet.data.keys(): + variable_mapping[apid] = packet.keys() + if variable_mapping[apid] != packet.keys(): raise ValueError( f"Packet fields do not match for APID {apid}. This could be " f"due to a conditional packet definition in the XTCE, while this " f"function currently only supports flat packet definitions." - f"\nExpected: {variable_mapping[apid]},\ngot: {packet.data.keys()}" + f"\nExpected: {variable_mapping[apid]},\n" + f"got: {packet.keys()}" ) # TODO: Do we want to give an option to remove the header content? - packet_content = packet.data | packet.header + packet_content = packet.user_data | packet.header for key, value in packet_content.items(): - val = value.raw_value - if use_derived_value: - # Use the derived value if it exists, otherwise use the raw value - val = value.derived_value or val + val = value if use_derived_value else value.raw_value data_dict[apid][key].append(val) if key not in datatype_mapping[apid]: # Add this datatype to the mapping @@ -411,3 +323,21 @@ def packet_file_to_datasets( dataset_by_apid[apid] = ds return dataset_by_apid + + +def convert_to_binary_string(data: bytes) -> str: + """ + Convert bytes to a string representation. + + Parameters + ---------- + data : bytes + Bytes to convert to a binary string. + + Returns + ------- + binary_data : str + The binary data as a string. + """ + binary_str_data = f"{int.from_bytes(data, byteorder='big'):0{len(data)*8}b}" + return binary_str_data diff --git a/poetry.lock b/poetry.lock index 70c252da4..30506d0a9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -83,151 +83,6 @@ charset-normalizer = ["charset-normalizer"] html5lib = ["html5lib"] lxml = ["lxml"] -[[package]] -name = "bitarray" -version = "2.9.2" -description = "efficient arrays of booleans -- C extension" -optional = false -python-versions = "*" -files = [ - {file = "bitarray-2.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:917905de565d9576eb20f53c797c15ba88b9f4f19728acabec8d01eee1d3756a"}, - {file = "bitarray-2.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b35bfcb08b7693ab4bf9059111a6e9f14e07d57ac93cd967c420db58ab9b71e1"}, - {file = "bitarray-2.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ea1923d2e7880f9e1959e035da661767b5a2e16a45dfd57d6aa831e8b65ee1bf"}, - {file = "bitarray-2.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e0b63a565e8a311cc8348ff1262d5784df0f79d64031d546411afd5dd7ef67d"}, - {file = "bitarray-2.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cf0620da2b81946d28c0b16f3e3704d38e9837d85ee4f0652816e2609aaa4fed"}, - {file = "bitarray-2.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:79a9b8b05f2876c7195a2b698c47528e86a73c61ea203394ff8e7a4434bda5c8"}, - {file = "bitarray-2.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:345c76b349ff145549652436235c5532e5bfe9db690db6f0a6ad301c62b9ef21"}, - {file = "bitarray-2.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e2936f090bf3f4d1771f44f9077ebccdbc0415d2b598d51a969afcb519df505"}, - {file = "bitarray-2.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f9346e98fc2abcef90b942973087e2462af6d3e3710e82938078d3493f7fef52"}, - {file = "bitarray-2.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e6ec283d4741befb86e8c3ea2e9ac1d17416c956d392107e45263e736954b1f7"}, - {file = "bitarray-2.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:962892646599529917ef26266091e4cb3077c88b93c3833a909d68dcc971c4e3"}, - {file = "bitarray-2.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e8da5355d7d75a52df5b84750989e34e39919ec7e59fafc4c104cc1607ab2d31"}, - {file = "bitarray-2.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:603e7d640e54ad764d2b4da6b61e126259af84f253a20f512dd10689566e5478"}, - {file = "bitarray-2.9.2-cp310-cp310-win32.whl", hash = "sha256:f00079f8e69d75c2a417de7961a77612bb77ef46c09bc74607d86de4740771ef"}, - {file = "bitarray-2.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:1bb33673e7f7190a65f0a940c1ef63266abdb391f4a3e544a47542d40a81f536"}, - {file = "bitarray-2.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fe71fd4b76380c2772f96f1e53a524da7063645d647a4fcd3b651bdd80ca0f2e"}, - {file = "bitarray-2.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d527172919cdea1e13994a66d9708a80c3d33dedcf2f0548e4925e600fef3a3a"}, - {file = "bitarray-2.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:052c5073bdcaa9dd10628d99d37a2f33ec09364b86dd1f6281e2d9f8d3db3060"}, - {file = "bitarray-2.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e064caa55a6ed493aca1eda06f8b3f689778bc780a75e6ad7724642ba5dc62f7"}, - {file = "bitarray-2.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:508069a04f658210fdeee85a7a0ca84db4bcc110cbb1d21f692caa13210f24a7"}, - {file = "bitarray-2.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4da73ebd537d75fa7bccfc2228fcaedea0803f21dd9d0bf0d3b67fef3c4af294"}, - {file = "bitarray-2.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5cb378eaa65cd43098f11ff5d27e48ee3b956d2c00d2d6b5bfc2a09fe183be47"}, - {file = "bitarray-2.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d14c790b91f6cbcd9b718f88ed737c78939980c69ac8c7f03dd7e60040c12951"}, - {file = "bitarray-2.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7eea9318293bc0ea6447e9ebfba600a62f3428bea7e9c6d42170ae4f481dbab3"}, - {file = "bitarray-2.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b76ffec27c7450b8a334f967366a9ebadaea66ee43f5b530c12861b1a991f503"}, - {file = "bitarray-2.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:76b76a07d4ee611405045c6950a1e24c4362b6b44808d4ad6eea75e0dbc59af4"}, - {file = "bitarray-2.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:c7d16beeaaab15b075990cd26963d6b5b22e8c5becd131781514a00b8bdd04bd"}, - {file = "bitarray-2.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60df43e868a615c7e15117a1e1c2e5e11f48f6457280eba6ddf8fbefbec7da99"}, - {file = "bitarray-2.9.2-cp311-cp311-win32.whl", hash = "sha256:e788608ed7767b7b3bbde6d49058bccdf94df0de9ca75d13aa99020cc7e68095"}, - {file = "bitarray-2.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:a23397da092ef0a8cfe729571da64c2fc30ac18243caa82ac7c4f965087506ff"}, - {file = "bitarray-2.9.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:90e3a281ffe3897991091b7c46fca38c2675bfd4399ffe79dfeded6c52715436"}, - {file = "bitarray-2.9.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:bed637b674db5e6c8a97a4a321e3e4d73e72d50b5c6b29950008a93069cc64cd"}, - {file = "bitarray-2.9.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e49066d251dbbe4e6e3a5c3937d85b589e40e2669ad0eef41a00f82ec17d844b"}, - {file = "bitarray-2.9.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c4344e96642e2211fb3a50558feff682c31563a4c64529a931769d40832ca79"}, - {file = "bitarray-2.9.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aeb60962ec4813c539a59fbd4f383509c7222b62c3fb1faa76b54943a613e33a"}, - {file = "bitarray-2.9.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ed0f7982f10581bb16553719e5e8f933e003f5b22f7d25a68bdb30fac630a6ff"}, - {file = "bitarray-2.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c71d1cabdeee0cdda4669168618f0e46b7dace207b29da7b63aaa1adc2b54081"}, - {file = "bitarray-2.9.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0ef2d0a6f1502d38d911d25609b44c6cc27bee0a4363dd295df78b075041b60"}, - {file = "bitarray-2.9.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6f71d92f533770fb027388b35b6e11988ab89242b883f48a6fe7202d238c61f8"}, - {file = "bitarray-2.9.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ba0734aa300757c924f3faf8148e1b8c247176a0ac8e16aefdf9c1eb19e868f7"}, - {file = "bitarray-2.9.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:d91406f413ccbf4af6ab5ae7bc78f772a95609f9ddd14123db36ef8c37116d95"}, - {file = "bitarray-2.9.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:87abb7f80c0a042f3fe8e5264da1a2756267450bb602110d5327b8eaff7682e7"}, - {file = "bitarray-2.9.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b558ce85579b51a2e38703877d1e93b7728a7af664dd45a34e833534f0b755d"}, - {file = "bitarray-2.9.2-cp312-cp312-win32.whl", hash = "sha256:dac2399ee2889fbdd3472bfc2ede74c34cceb1ccf29a339964281a16eb1d3188"}, - {file = "bitarray-2.9.2-cp312-cp312-win_amd64.whl", hash = "sha256:48a30d718d1a6dfc22a49547450107abe8f4afdf2abdcbe76eb9ed88edc49498"}, - {file = "bitarray-2.9.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2c6be1b651fad8f3adb7a5aa12c65b612cd9b89530969af941844ae680f7d981"}, - {file = "bitarray-2.9.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5b399ae6ab975257ec359f03b48fc00b1c1cd109471e41903548469b8feae5c"}, - {file = "bitarray-2.9.2-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0b3543c8a1cb286ad105f11c25d8d0f712f41c5c55f90be39f0e5a1376c7d0b0"}, - {file = "bitarray-2.9.2-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:03adaacb79e2fb8f483ab3a67665eec53bb3fd0cd5dbd7358741aef124688db3"}, - {file = "bitarray-2.9.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ae5b0657380d2581e13e46864d147a52c1e2bbac9f59b59c576e42fa7d10cf0"}, - {file = "bitarray-2.9.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c1f4bf6ea8eb9d7f30808c2e9894237a96650adfecbf5f3643862dc5982f89e"}, - {file = "bitarray-2.9.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a8873089be2aa15494c0f81af1209f6e1237d762c5065bc4766c1b84321e1b50"}, - {file = "bitarray-2.9.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:677e67f50e2559efc677a4366707070933ad5418b8347a603a49a070890b19bc"}, - {file = "bitarray-2.9.2-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:a620d8ce4ea2f1c73c6b6b1399e14cb68c6915e2be3fad5808c2998ed55b4acf"}, - {file = "bitarray-2.9.2-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:64115ccabbdbe279c24c367b629c6b1d3da9ed36c7420129e27c338a3971bfee"}, - {file = "bitarray-2.9.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:5d6fb422772e75385b76ad1c52f45a68bd4efafd8be8d0061c11877be74c4d43"}, - {file = "bitarray-2.9.2-cp36-cp36m-win32.whl", hash = "sha256:852e202875dd6dfd6139ce7ec4e98dac2b17d8d25934dc99900831e81c3adaef"}, - {file = "bitarray-2.9.2-cp36-cp36m-win_amd64.whl", hash = "sha256:7dfefdcb0dc6a3ba9936063cec65a74595571b375beabe18742b3d91d087eefd"}, - {file = "bitarray-2.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b306c4cf66912511422060f7f5e1149c8bdb404f8e00e600561b0749fdd45659"}, - {file = "bitarray-2.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a09c4f81635408e3387348f415521d4b94198c562c23330f560596a6aaa26eaf"}, - {file = "bitarray-2.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5361413fd2ecfdf44dc8f065177dc6aba97fa80a91b815586cb388763acf7f8d"}, - {file = "bitarray-2.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e8a9475d415ef1eaae7942df6f780fa4dcd48fce32825eda591a17abba869299"}, - {file = "bitarray-2.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9b87baa7bfff9a5878fcc1bffe49ecde6e647a72a64b39a69cd8a2992a43a34"}, - {file = "bitarray-2.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bb6b86cfdfc503e92cb71c68766a24565359136961642504a7cc9faf936d9c88"}, - {file = "bitarray-2.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:cd56b8ae87ebc71bcacbd73615098e8a8de952ecbb5785b6b4e2b07da8a06e1f"}, - {file = "bitarray-2.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3fa909cfd675004aed8b4cc9df352415933656e0155a6209d878b7cb615c787e"}, - {file = "bitarray-2.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:b069ca9bf728e0c5c5b60e00a89df9af34cc170c695c3bfa3b372d8f40288efb"}, - {file = "bitarray-2.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:6067f2f07a7121749858c7daa93c8774325c91590b3e81a299621e347740c2ae"}, - {file = "bitarray-2.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:321841cdad1dd0f58fe62e80e9c9c7531f8ebf8be93f047401e930dc47425b1e"}, - {file = "bitarray-2.9.2-cp37-cp37m-win32.whl", hash = "sha256:54e16e32e60973bb83c315de9975bc1bcfc9bd50bb13001c31da159bc49b0ca1"}, - {file = "bitarray-2.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:f4dcadb7b8034aa3491ee8f5a69b3d9ba9d7d1e55c3cc1fc45be313e708277f8"}, - {file = "bitarray-2.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c8919fdbd3bb596b104388b56ae4b266eb28da1f2f7dff2e1f9334a21840fe96"}, - {file = "bitarray-2.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:eb7a9d8a2e400a1026de341ad48e21670a6261a75b06df162c5c39b0d0e7c8f4"}, - {file = "bitarray-2.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6ec84668dd7b937874a2b2c293cd14ba84f37be0d196dead852e0ada9815d807"}, - {file = "bitarray-2.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2de9a31c34e543ae089fd2a5ced01292f725190e379921384f695e2d7184bd3"}, - {file = "bitarray-2.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9521f49ae121a17c0a41e5112249e6fa7f6a571245b1118de81fb86e7c1bc1ce"}, - {file = "bitarray-2.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6cc6545d6d76542aee3d18c1c9485fb7b9812b8df4ebe52c4535ec42081b48f"}, - {file = "bitarray-2.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:856bbe1616425f71c0df5ef2e8755e878d9504d5a531acba58ab4273c52c117a"}, - {file = "bitarray-2.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d4bba8042ea6ab331ade91bc435d81ad72fddb098e49108610b0ce7780c14e68"}, - {file = "bitarray-2.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a035da89c959d98afc813e3c62f052690d67cfd55a36592f25d734b70de7d4b0"}, - {file = "bitarray-2.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6d70b1579da7fb71be5a841a1f965d19aca0ef27f629cfc07d06b09aafd0a333"}, - {file = "bitarray-2.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:405b83bed28efaae6d86b6ab287c75712ead0adbfab2a1075a1b7ab47dad4d62"}, - {file = "bitarray-2.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:7eb8be687c50da0b397d5e0ab7ca200b5ebb639e79a9f5e285851d1944c94be9"}, - {file = "bitarray-2.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:eceb551dfeaf19c609003a69a0cf8264b0efd7abc3791a11dfabf4788daf0d19"}, - {file = "bitarray-2.9.2-cp38-cp38-win32.whl", hash = "sha256:bb198c6ed1edbcdaf3d1fa3c9c9d1cdb7e179a5134ef5ee660b53cdec43b34e7"}, - {file = "bitarray-2.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:648d2f2685590b0103c67a937c2fb9e09bcc8dfb166f0c7c77bd341902a6f5b3"}, - {file = "bitarray-2.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ea816dc8f8e65841a8bbdd30e921edffeeb6f76efe6a1eb0da147b60d539d1cf"}, - {file = "bitarray-2.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4d0e32530f941c41eddfc77600ec89b65184cb909c549336463a738fab3ed285"}, - {file = "bitarray-2.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4a22266fb416a3b6c258bf7f83c9fe531ba0b755a56986a81ad69dc0f3bcc070"}, - {file = "bitarray-2.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc6d3e80dd8239850f2604833ff3168b28909c8a9357abfed95632cccd17e3e7"}, - {file = "bitarray-2.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f135e804986b12bf14f2cd1eb86674c47dea86c4c5f0fa13c88978876b97ebe6"}, - {file = "bitarray-2.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87580c7f7d14f7ec401eda7adac1e2a25e95153e9c339872c8ae61b3208819a1"}, - {file = "bitarray-2.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64b433e26993127732ac7b66a7821b2537c3044355798de7c5fcb0af34b8296f"}, - {file = "bitarray-2.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e497c535f2a9b68c69d36631bf2dba243e05eb343b00b9c7bbdc8c601c6802d"}, - {file = "bitarray-2.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e40b3cb9fa1edb4e0175d7c06345c49c7925fe93e39ef55ecb0bc40c906b0c09"}, - {file = "bitarray-2.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f2f8692f95c9e377eb19ca519d30d1f884b02feb7e115f798de47570a359e43f"}, - {file = "bitarray-2.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f0b84fc50b6dbeced4fa390688c07c10a73222810fb0e08392bd1a1b8259de36"}, - {file = "bitarray-2.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d656ad38c942e38a470ddbce26b5020e08e1a7ea86b8fd413bb9024b5189993a"}, - {file = "bitarray-2.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6ab0f1dbfe5070db98771a56aa14797595acd45a1af9eadfb193851a270e7996"}, - {file = "bitarray-2.9.2-cp39-cp39-win32.whl", hash = "sha256:0a99b23ac845a9ea3157782c97465e6ae026fe0c7c4c1ed1d88f759fd6ea52d9"}, - {file = "bitarray-2.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:9bbcfc7c279e8d74b076e514e669b683f77b4a2a328585b3f16d4c5259c91222"}, - {file = "bitarray-2.9.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:43847799461d8ba71deb4d97b47250c2c2fb66d82cd3cb8b4caf52bb97c03034"}, - {file = "bitarray-2.9.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4f44381b0a4bdf64416082f4f0e7140377ae962c0ced6f983c6d7bbfc034040"}, - {file = "bitarray-2.9.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a484061616fb4b158b80789bd3cb511f399d2116525a8b29b6334c68abc2310f"}, - {file = "bitarray-2.9.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1ff9e38356cc803e06134cf8ae9758e836ccd1b793135ef3db53c7c5d71e93bc"}, - {file = "bitarray-2.9.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b44105792fbdcfbda3e26ee88786790fda409da4c71f6c2b73888108cf8f062f"}, - {file = "bitarray-2.9.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7e913098de169c7fc890638ce5e171387363eb812579e637c44261460ac00aa2"}, - {file = "bitarray-2.9.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6fe315355cdfe3ed22ef355b8bdc81a805ca4d0949d921576560e5b227a1112"}, - {file = "bitarray-2.9.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f708e91fdbe443f3bec2df394ed42328fb9b0446dff5cb4199023ac6499e09fd"}, - {file = "bitarray-2.9.2-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b7b09489b71f9f1f64c0fa0977e250ec24500767dab7383ba9912495849cadf"}, - {file = "bitarray-2.9.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:128cc3488176145b9b137fdcf54c1c201809bbb8dd30b260ee40afe915843b43"}, - {file = "bitarray-2.9.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:21f21e7f56206be346bdbda2a6bdb2165a5e6a11821f88fd4911c5a6bbbdc7e2"}, - {file = "bitarray-2.9.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f4dd3af86dd8a617eb6464622fb64ca86e61ce99b59b5c35d8cd33f9c30603d"}, - {file = "bitarray-2.9.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6465de861aff7a2559f226b37982007417eab8c3557543879987f58b453519bd"}, - {file = "bitarray-2.9.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbaf2bb71d6027152d603f1d5f31e0dfd5e50173d06f877bec484e5396d4594b"}, - {file = "bitarray-2.9.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:2f32948c86e0d230a296686db28191b67ed229756f84728847daa0c7ab7406e3"}, - {file = "bitarray-2.9.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:be94e5a685e60f9d24532af8fe5c268002e9016fa80272a94727f435de3d1003"}, - {file = "bitarray-2.9.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5cc9381fd54f3c23ae1039f977bfd6d041a5c3c1518104f616643c3a5a73b15"}, - {file = "bitarray-2.9.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd926e8ae4d1ed1ac4a8f37212a62886292f692bc1739fde98013bf210c2d175"}, - {file = "bitarray-2.9.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:461a3dafb9d5fda0bb3385dc507d78b1984b49da3fe4c6d56c869a54373b7008"}, - {file = "bitarray-2.9.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:393cb27fd859af5fd9c16eb26b1c59b17b390ff66b3ae5d0dd258270191baf13"}, - {file = "bitarray-2.9.2.tar.gz", hash = "sha256:a8f286a51a32323715d77755ed959f94bef13972e9a2fe71b609e40e6d27957e"}, -] - -[[package]] -name = "bitstring" -version = "4.2.3" -description = "Simple construction, analysis and modification of binary data." -optional = false -python-versions = ">=3.8" -files = [ - {file = "bitstring-4.2.3-py3-none-any.whl", hash = "sha256:20ed0036e2fcf0323acb0f92f0b7b178516a080f3e91061470aa019ac4ede404"}, - {file = "bitstring-4.2.3.tar.gz", hash = "sha256:e0c447af3fda0d114f77b88c2d199f02f97ee7e957e6d719f40f41cf15fbb897"}, -] - -[package.dependencies] -bitarray = ">=2.9.0,<3.0.0" - [[package]] name = "cdflib" version = "1.3.1" @@ -558,12 +413,12 @@ files = [ [[package]] name = "imap-data-access" -version = "0.7.0" +version = "0.10.1" description = "IMAP SDC Data Access" optional = false python-versions = "*" files = [ - {file = "imap_data_access-0.7.0.tar.gz", hash = "sha256:f0db935949d048394fc554b308b1e4a1572a18acd41636462d37c309c7cb4c9d"}, + {file = "imap_data_access-0.10.1.tar.gz", hash = "sha256:54a65d2a220fe82bba08290c4d8fa5cb3aa58ff587230d2f4b2f544ef1bb0f67"}, ] [package.extras] @@ -652,6 +507,160 @@ files = [ [package.dependencies] referencing = ">=0.31.0" +[[package]] +name = "lxml" +version = "5.3.0" +description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +optional = false +python-versions = ">=3.6" +files = [ + {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:dd36439be765e2dde7660212b5275641edbc813e7b24668831a5c8ac91180656"}, + {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ae5fe5c4b525aa82b8076c1a59d642c17b6e8739ecf852522c6321852178119d"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:501d0d7e26b4d261fca8132854d845e4988097611ba2531408ec91cf3fd9d20a"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb66442c2546446944437df74379e9cf9e9db353e61301d1a0e26482f43f0dd8"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9e41506fec7a7f9405b14aa2d5c8abbb4dbbd09d88f9496958b6d00cb4d45330"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f7d4a670107d75dfe5ad080bed6c341d18c4442f9378c9f58e5851e86eb79965"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41ce1f1e2c7755abfc7e759dc34d7d05fd221723ff822947132dc934d122fe22"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:44264ecae91b30e5633013fb66f6ddd05c006d3e0e884f75ce0b4755b3e3847b"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:3c174dc350d3ec52deb77f2faf05c439331d6ed5e702fc247ccb4e6b62d884b7"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:2dfab5fa6a28a0b60a20638dc48e6343c02ea9933e3279ccb132f555a62323d8"}, + {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b1c8c20847b9f34e98080da785bb2336ea982e7f913eed5809e5a3c872900f32"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2c86bf781b12ba417f64f3422cfc302523ac9cd1d8ae8c0f92a1c66e56ef2e86"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:c162b216070f280fa7da844531169be0baf9ccb17263cf5a8bf876fcd3117fa5"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:36aef61a1678cb778097b4a6eeae96a69875d51d1e8f4d4b491ab3cfb54b5a03"}, + {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f65e5120863c2b266dbcc927b306c5b78e502c71edf3295dfcb9501ec96e5fc7"}, + {file = "lxml-5.3.0-cp310-cp310-win32.whl", hash = "sha256:ef0c1fe22171dd7c7c27147f2e9c3e86f8bdf473fed75f16b0c2e84a5030ce80"}, + {file = "lxml-5.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:052d99051e77a4f3e8482c65014cf6372e61b0a6f4fe9edb98503bb5364cfee3"}, + {file = "lxml-5.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:74bcb423462233bc5d6066e4e98b0264e7c1bed7541fff2f4e34fe6b21563c8b"}, + {file = "lxml-5.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a3d819eb6f9b8677f57f9664265d0a10dd6551d227afb4af2b9cd7bdc2ccbf18"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b8f5db71b28b8c404956ddf79575ea77aa8b1538e8b2ef9ec877945b3f46442"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c3406b63232fc7e9b8783ab0b765d7c59e7c59ff96759d8ef9632fca27c7ee4"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ecdd78ab768f844c7a1d4a03595038c166b609f6395e25af9b0f3f26ae1230f"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:168f2dfcfdedf611eb285efac1516c8454c8c99caf271dccda8943576b67552e"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa617107a410245b8660028a7483b68e7914304a6d4882b5ff3d2d3eb5948d8c"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:69959bd3167b993e6e710b99051265654133a98f20cec1d9b493b931942e9c16"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:bd96517ef76c8654446fc3db9242d019a1bb5fe8b751ba414765d59f99210b79"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:ab6dd83b970dc97c2d10bc71aa925b84788c7c05de30241b9e96f9b6d9ea3080"}, + {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:eec1bb8cdbba2925bedc887bc0609a80e599c75b12d87ae42ac23fd199445654"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a7095eeec6f89111d03dabfe5883a1fd54da319c94e0fb104ee8f23616b572d"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6f651ebd0b21ec65dfca93aa629610a0dbc13dbc13554f19b0113da2e61a4763"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:f422a209d2455c56849442ae42f25dbaaba1c6c3f501d58761c619c7836642ec"}, + {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:62f7fdb0d1ed2065451f086519865b4c90aa19aed51081979ecd05a21eb4d1be"}, + {file = "lxml-5.3.0-cp311-cp311-win32.whl", hash = "sha256:c6379f35350b655fd817cd0d6cbeef7f265f3ae5fedb1caae2eb442bbeae9ab9"}, + {file = "lxml-5.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c52100e2c2dbb0649b90467935c4b0de5528833c76a35ea1a2691ec9f1ee7a1"}, + {file = "lxml-5.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:e99f5507401436fdcc85036a2e7dc2e28d962550afe1cbfc07c40e454256a859"}, + {file = "lxml-5.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:384aacddf2e5813a36495233b64cb96b1949da72bef933918ba5c84e06af8f0e"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:874a216bf6afaf97c263b56371434e47e2c652d215788396f60477540298218f"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65ab5685d56914b9a2a34d67dd5488b83213d680b0c5d10b47f81da5a16b0b0e"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aac0bbd3e8dd2d9c45ceb82249e8bdd3ac99131a32b4d35c8af3cc9db1657179"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b369d3db3c22ed14c75ccd5af429086f166a19627e84a8fdade3f8f31426e52a"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24037349665434f375645fa9d1f5304800cec574d0310f618490c871fd902b3"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:62d172f358f33a26d6b41b28c170c63886742f5b6772a42b59b4f0fa10526cb1"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:c1f794c02903c2824fccce5b20c339a1a14b114e83b306ff11b597c5f71a1c8d"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:5d6a6972b93c426ace71e0be9a6f4b2cfae9b1baed2eed2006076a746692288c"}, + {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:3879cc6ce938ff4eb4900d901ed63555c778731a96365e53fadb36437a131a99"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:74068c601baff6ff021c70f0935b0c7bc528baa8ea210c202e03757c68c5a4ff"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:ecd4ad8453ac17bc7ba3868371bffb46f628161ad0eefbd0a855d2c8c32dd81a"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:7e2f58095acc211eb9d8b5771bf04df9ff37d6b87618d1cbf85f92399c98dae8"}, + {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e63601ad5cd8f860aa99d109889b5ac34de571c7ee902d6812d5d9ddcc77fa7d"}, + {file = "lxml-5.3.0-cp312-cp312-win32.whl", hash = "sha256:17e8d968d04a37c50ad9c456a286b525d78c4a1c15dd53aa46c1d8e06bf6fa30"}, + {file = "lxml-5.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:c1a69e58a6bb2de65902051d57fde951febad631a20a64572677a1052690482f"}, + {file = "lxml-5.3.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c72e9563347c7395910de6a3100a4840a75a6f60e05af5e58566868d5eb2d6a"}, + {file = "lxml-5.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e92ce66cd919d18d14b3856906a61d3f6b6a8500e0794142338da644260595cd"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d04f064bebdfef9240478f7a779e8c5dc32b8b7b0b2fc6a62e39b928d428e51"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c2fb570d7823c2bbaf8b419ba6e5662137f8166e364a8b2b91051a1fb40ab8b"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c120f43553ec759f8de1fee2f4794452b0946773299d44c36bfe18e83caf002"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:562e7494778a69086f0312ec9689f6b6ac1c6b65670ed7d0267e49f57ffa08c4"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:423b121f7e6fa514ba0c7918e56955a1d4470ed35faa03e3d9f0e3baa4c7e492"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:c00f323cc00576df6165cc9d21a4c21285fa6b9989c5c39830c3903dc4303ef3"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_ppc64le.whl", hash = "sha256:1fdc9fae8dd4c763e8a31e7630afef517eab9f5d5d31a278df087f307bf601f4"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_s390x.whl", hash = "sha256:658f2aa69d31e09699705949b5fc4719cbecbd4a97f9656a232e7d6c7be1a367"}, + {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1473427aff3d66a3fa2199004c3e601e6c4500ab86696edffdbc84954c72d832"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a87de7dd873bf9a792bf1e58b1c3887b9264036629a5bf2d2e6579fe8e73edff"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:0d7b36afa46c97875303a94e8f3ad932bf78bace9e18e603f2085b652422edcd"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:cf120cce539453ae086eacc0130a324e7026113510efa83ab42ef3fcfccac7fb"}, + {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:df5c7333167b9674aa8ae1d4008fa4bc17a313cc490b2cca27838bbdcc6bb15b"}, + {file = "lxml-5.3.0-cp313-cp313-win32.whl", hash = "sha256:c802e1c2ed9f0c06a65bc4ed0189d000ada8049312cfeab6ca635e39c9608957"}, + {file = "lxml-5.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:406246b96d552e0503e17a1006fd27edac678b3fcc9f1be71a2f94b4ff61528d"}, + {file = "lxml-5.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8f0de2d390af441fe8b2c12626d103540b5d850d585b18fcada58d972b74a74e"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1afe0a8c353746e610bd9031a630a95bcfb1a720684c3f2b36c4710a0a96528f"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56b9861a71575f5795bde89256e7467ece3d339c9b43141dbdd54544566b3b94"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:9fb81d2824dff4f2e297a276297e9031f46d2682cafc484f49de182aa5e5df99"}, + {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2c226a06ecb8cdef28845ae976da407917542c5e6e75dcac7cc33eb04aaeb237"}, + {file = "lxml-5.3.0-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:7d3d1ca42870cdb6d0d29939630dbe48fa511c203724820fc0fd507b2fb46577"}, + {file = "lxml-5.3.0-cp36-cp36m-win32.whl", hash = "sha256:094cb601ba9f55296774c2d57ad68730daa0b13dc260e1f941b4d13678239e70"}, + {file = "lxml-5.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:eafa2c8658f4e560b098fe9fc54539f86528651f61849b22111a9b107d18910c"}, + {file = "lxml-5.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cb83f8a875b3d9b458cada4f880fa498646874ba4011dc974e071a0a84a1b033"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25f1b69d41656b05885aa185f5fdf822cb01a586d1b32739633679699f220391"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23e0553b8055600b3bf4a00b255ec5c92e1e4aebf8c2c09334f8368e8bd174d6"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ada35dd21dc6c039259596b358caab6b13f4db4d4a7f8665764d616daf9cc1d"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:81b4e48da4c69313192d8c8d4311e5d818b8be1afe68ee20f6385d0e96fc9512"}, + {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:2bc9fd5ca4729af796f9f59cd8ff160fe06a474da40aca03fcc79655ddee1a8b"}, + {file = "lxml-5.3.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:07da23d7ee08577760f0a71d67a861019103e4812c87e2fab26b039054594cc5"}, + {file = "lxml-5.3.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:ea2e2f6f801696ad7de8aec061044d6c8c0dd4037608c7cab38a9a4d316bfb11"}, + {file = "lxml-5.3.0-cp37-cp37m-win32.whl", hash = "sha256:5c54afdcbb0182d06836cc3d1be921e540be3ebdf8b8a51ee3ef987537455f84"}, + {file = "lxml-5.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:f2901429da1e645ce548bf9171784c0f74f0718c3f6150ce166be39e4dd66c3e"}, + {file = "lxml-5.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c56a1d43b2f9ee4786e4658c7903f05da35b923fb53c11025712562d5cc02753"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ee8c39582d2652dcd516d1b879451500f8db3fe3607ce45d7c5957ab2596040"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdf3a3059611f7585a78ee10399a15566356116a4288380921a4b598d807a22"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:146173654d79eb1fc97498b4280c1d3e1e5d58c398fa530905c9ea50ea849b22"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:0a7056921edbdd7560746f4221dca89bb7a3fe457d3d74267995253f46343f15"}, + {file = "lxml-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:9e4b47ac0f5e749cfc618efdf4726269441014ae1d5583e047b452a32e221920"}, + {file = "lxml-5.3.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:f914c03e6a31deb632e2daa881fe198461f4d06e57ac3d0e05bbcab8eae01945"}, + {file = "lxml-5.3.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:213261f168c5e1d9b7535a67e68b1f59f92398dd17a56d934550837143f79c42"}, + {file = "lxml-5.3.0-cp38-cp38-win32.whl", hash = "sha256:218c1b2e17a710e363855594230f44060e2025b05c80d1f0661258142b2add2e"}, + {file = "lxml-5.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:315f9542011b2c4e1d280e4a20ddcca1761993dda3afc7a73b01235f8641e903"}, + {file = "lxml-5.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1ffc23010330c2ab67fac02781df60998ca8fe759e8efde6f8b756a20599c5de"}, + {file = "lxml-5.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2b3778cb38212f52fac9fe913017deea2fdf4eb1a4f8e4cfc6b009a13a6d3fcc"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b0c7a688944891086ba192e21c5229dea54382f4836a209ff8d0a660fac06be"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:747a3d3e98e24597981ca0be0fd922aebd471fa99d0043a3842d00cdcad7ad6a"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86a6b24b19eaebc448dc56b87c4865527855145d851f9fc3891673ff97950540"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b11a5d918a6216e521c715b02749240fb07ae5a1fefd4b7bf12f833bc8b4fe70"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68b87753c784d6acb8a25b05cb526c3406913c9d988d51f80adecc2b0775d6aa"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:109fa6fede314cc50eed29e6e56c540075e63d922455346f11e4d7a036d2b8cf"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:02ced472497b8362c8e902ade23e3300479f4f43e45f4105c85ef43b8db85229"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:6b038cc86b285e4f9fea2ba5ee76e89f21ed1ea898e287dc277a25884f3a7dfe"}, + {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:7437237c6a66b7ca341e868cda48be24b8701862757426852c9b3186de1da8a2"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7f41026c1d64043a36fda21d64c5026762d53a77043e73e94b71f0521939cc71"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:482c2f67761868f0108b1743098640fbb2a28a8e15bf3f47ada9fa59d9fe08c3"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1483fd3358963cc5c1c9b122c80606a3a79ee0875bcac0204149fa09d6ff2727"}, + {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dec2d1130a9cda5b904696cec33b2cfb451304ba9081eeda7f90f724097300a"}, + {file = "lxml-5.3.0-cp39-cp39-win32.whl", hash = "sha256:a0eabd0a81625049c5df745209dc7fcef6e2aea7793e5f003ba363610aa0a3ff"}, + {file = "lxml-5.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:89e043f1d9d341c52bf2af6d02e6adde62e0a46e6755d5eb60dc6e4f0b8aeca2"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7b1cd427cb0d5f7393c31b7496419da594fe600e6fdc4b105a54f82405e6626c"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51806cfe0279e06ed8500ce19479d757db42a30fd509940b1701be9c86a5ff9a"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee70d08fd60c9565ba8190f41a46a54096afa0eeb8f76bd66f2c25d3b1b83005"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:8dc2c0395bea8254d8daebc76dcf8eb3a95ec2a46fa6fae5eaccee366bfe02ce"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:6ba0d3dcac281aad8a0e5b14c7ed6f9fa89c8612b47939fc94f80b16e2e9bc83"}, + {file = "lxml-5.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:6e91cf736959057f7aac7adfc83481e03615a8e8dd5758aa1d95ea69e8931dba"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:94d6c3782907b5e40e21cadf94b13b0842ac421192f26b84c45f13f3c9d5dc27"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c300306673aa0f3ed5ed9372b21867690a17dba38c68c44b287437c362ce486b"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78d9b952e07aed35fe2e1a7ad26e929595412db48535921c5013edc8aa4a35ce"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:01220dca0d066d1349bd6a1726856a78f7929f3878f7e2ee83c296c69495309e"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:2d9b8d9177afaef80c53c0a9e30fa252ff3036fb1c6494d427c066a4ce6a282f"}, + {file = "lxml-5.3.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:20094fc3f21ea0a8669dc4c61ed7fa8263bd37d97d93b90f28fc613371e7a875"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ace2c2326a319a0bb8a8b0e5b570c764962e95818de9f259ce814ee666603f19"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:92e67a0be1639c251d21e35fe74df6bcc40cba445c2cda7c4a967656733249e2"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd5350b55f9fecddc51385463a4f67a5da829bc741e38cf689f38ec9023f54ab"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c1fefd7e3d00921c44dc9ca80a775af49698bbfd92ea84498e56acffd4c5469"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:71a8dd38fbd2f2319136d4ae855a7078c69c9a38ae06e0c17c73fd70fc6caad8"}, + {file = "lxml-5.3.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:97acf1e1fd66ab53dacd2c35b319d7e548380c2e9e8c54525c6e76d21b1ae3b1"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:68934b242c51eb02907c5b81d138cb977b2129a0a75a8f8b60b01cb8586c7b21"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b710bc2b8292966b23a6a0121f7a6c51d45d2347edcc75f016ac123b8054d3f2"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18feb4b93302091b1541221196a2155aa296c363fd233814fa11e181adebc52f"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:3eb44520c4724c2e1a57c0af33a379eee41792595023f367ba3952a2d96c2aab"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:609251a0ca4770e5a8768ff902aa02bf636339c5a93f9349b48eb1f606f7f3e9"}, + {file = "lxml-5.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:516f491c834eb320d6c843156440fe7fc0d50b33e44387fcec5b02f0bc118a4c"}, + {file = "lxml-5.3.0.tar.gz", hash = "sha256:4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f"}, +] + +[package.extras] +cssselect = ["cssselect (>=0.7)"] +html-clean = ["lxml-html-clean"] +html5 = ["html5lib"] +htmlsoup = ["BeautifulSoup4"] +source = ["Cython (>=3.0.11)"] + [[package]] name = "markupsafe" version = "2.1.5" @@ -1406,17 +1415,17 @@ files = [ [[package]] name = "space-packet-parser" -version = "4.2.0" +version = "5.0.1" description = "A CCSDS telemetry packet decoding library based on the XTCE packet format description standard." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "space_packet_parser-4.2.0-py3-none-any.whl", hash = "sha256:3563f700634d11384686e5a80b86e7f51717c2332ad9e817d62d5542fb920e6d"}, - {file = "space_packet_parser-4.2.0.tar.gz", hash = "sha256:5afe6ed49a84884e236aa19a1a96d8976796bbbbf85e8f9b063ebd8a74bc024c"}, + {file = "space_packet_parser-5.0.1-py3-none-any.whl", hash = "sha256:f3f10cbc83aa306cce5c0689109c8cdbccab4da2515525b5657e0d53c1b6f4cc"}, + {file = "space_packet_parser-5.0.1.tar.gz", hash = "sha256:f72b937ec6d1bfb426124e8b2d4e500784f3963c4f88ce22339f24bb249cfad8"}, ] [package.dependencies] -bitstring = ">=4.0.1" +lxml = ">=4.8.0" [[package]] name = "sphinx" @@ -1757,4 +1766,4 @@ tools = ["openpyxl", "pandas"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "a1058d51a7b9a42f74687ad3408619874f8b1b1a574b55aa94142abadde2e41b" +content-hash = "a3e45e1ac913b9501eaa37c64f931d9a76308ce53c201c1add6f101f4552b5ec" diff --git a/pyproject.toml b/pyproject.toml index 691d3fdaf..56ade300f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,10 +31,10 @@ classifiers = [ ] [tool.poetry.dependencies] -cdflib = "==1.3.1" -imap-data-access = ">=0.5.0" +cdflib = "^1.3.1" +imap-data-access = ">=0.10.1" python = ">=3.9,<4" -space_packet_parser = "^4.2.0" +space_packet_parser = "^5.0.1" spiceypy = ">=6.0.0" xarray = '>=2023.0.0' pyyaml = "^6.0.1"