imap_processing.hi.hi_l1a.parse_direct_events#

imap_processing.hi.hi_l1a.parse_direct_events(de_data: bytes) dict[str, _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]#

Parse event data from a binary blob.

IMAP-Hi direct event data information is stored in 48-bits as follows:

Read 48-bits into 16, 2, 10, 10, 10, bits. Each of these breaks
down as:

de_tag - 16 bits
start_bitmask_data - 2 bits (tA=1, tB=2, tC1=3)
tof_1 - 10 bit counter
tof_2 - 10 bit counter
tof_3 - 10 bit counter

There are at most total of 664 of 48-bits in each data packet. This data packet is of variable length. If there is one event, then DE_TOF will contain 48-bits. If there are 664 events, then DE_TOF will contain 664 x 48-bits. If there is no event, then DE_TOF will contain 0-bits.

There should be two data packets per ESA. Each packet contains meta-event data that is identical between the two packets for a common ESA. If there is no event record for certain ESA step, then both packets will contain 0-bits in DE_TOF.

Parameters:

de_data (bytes) – Binary blob from de_tag field of SCI_DE packet. Must be an integer multiple of 48-bits of data.

Returns:

Parsed event data.

Return type:

Dict[str, list]