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 breaksdown as:de_tag - 16 bitsstart_bitmask_data - 2 bits (tA=1, tB=2, tC1=3)tof_1 - 10 bit countertof_2 - 10 bit countertof_3 - 10 bit counterThere 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.