imap_processing.mag.l1a.mag_l1a_data.MagL1aPacketProperties#

class imap_processing.mag.l1a.mag_l1a_data.MagL1aPacketProperties(shcoarse: int, start_time: TimeTuple, vectors_per_second: int, pus_ssubtype: InitVar[int], src_seq_ctr: int, compression: int, mago_is_primary: int, first_byte: InitVar[int])#

Data class with Mag L1A per-packet data.

This contains per-packet variations in L1a data that is passed into CDF files. Since each L1a file contains multiple packets, the variables in this class vary by time in the end CDF file.

seconds_per_packet, and total_vectors are calculated from pus_ssubtype and vecsec values, which are only passed in to the init method and cannot be accessed from an instance as they are InitVars.

To use the class, pass in pus_ssubtype and either PRI_VECSEC or SEC_VECSEC, then you can access seconds_per_packet and total_vectors.

shcoarse#

Mission elapsed time for the packet

Type:

int

start_time#

Start time of the packet

Type:

TimeTuple

vectors_per_second#

Number of vectors per second

Type:

int

pus_ssubtype#

PUS Service Subtype - used to calculate seconds_per_packet. This is an InitVar, meaning it is only used when creating the class and cannot be accessed from an instance of the class - instead seconds_per_packet should be used.

Type:

int

src_seq_ctr#

Sequence counter from the ccsds header

Type:

int

compression#

Science Data Compression Flag from level 0

Type:

int

mago_is_primary#

1 if mago is designated the primary sensor, otherwise 0

Type:

int

first_byte#

First byte of the vector data. Needed to compute compression_width.

Type:

int

seconds_per_packet#

Number of seconds of data in this packet - calculated as pus_ssubtype + 1

Type:

int

total_vectors#

Total number of vectors in this packet - calculated as seconds_per_packet * vecsec

Type:

int

compression_width#

Value between 0-20 indicating the width of the compressed data. If the packet is uncompressed, this defaults to 0.

Type:

int

__init__(shcoarse: int, start_time: TimeTuple, vectors_per_second: int, pus_ssubtype: InitVar[int], src_seq_ctr: int, compression: int, mago_is_primary: int, first_byte: InitVar[int]) None#

Methods

__init__(shcoarse, start_time, ...)

Attributes