imap_processing.mag.l1a.mag_l1a_data.MagL1a#

class imap_processing.mag.l1a.mag_l1a_data.MagL1a(is_mago: bool, active: bool, SHCOARSE: int, vectors: ndarray)#

Data class for MAG Level 1A data.

TODO: This object should end up having 1 days worth of data.

One MAG L1A object corresponds to part of one MAG L0 packet, which corresponds to one packet of data from the MAG instrument. Each L0 packet consists of data from two sensors, MAGO (outboard) and MAGI (inboard). One of these sensors is designated as the primary sensor (first part of data stream), and one as the secondary.

We expect the primary sensor to be MAGO, and the secondary to be MAGI, but this is not guaranteed. Each MagL1A object contains data from one sensor. The primary/secondary construct is only used to sort the vectors into MAGo and MAGi data, and therefore is not used at higher levels.

is_mago#

True if the data is from MagO, False if data is from MagI

Type:

bool

active#

True if the sensor is active

Type:

bool

SHCOARSE#

Mission elapsed time

Type:

int

vectors#

List of magnetic vector samples, starting at start_time. [x, y, z, range, time], where time is np.datetime64[ns]

Type:

numpy.ndarray

calculate_vector_time(vectors, vectors_per_second, start_time)#
process_vector_data(vector_data, primary_count, secondary_count)#
__init__(is_mago: bool, active: bool, SHCOARSE: int, vectors: ndarray) None#

Methods

__init__(is_mago, active, SHCOARSE, vectors)

calculate_vector_time(vectors, ...)

Add timestamps to the vector list, turning the shape from (n, 4) to (n, 5).

process_vector_data(vector_data, ...)

Given raw packet data, process into Vectors.

Attributes