read_primary_headers¶
- ccsdspy.utils.read_primary_headers(file)[source]¶
Read primary header fields and return contents as a dictionary of arrays.
This function works with mixed files containing multiple APIDs, which may include both fixed length and variable length packets.
- Parameters:
- filestr, file-like
Path to file on the local file system, or file-like object
- Returns:
- header_arraysdict, string to NumPy array
Dictionary mapping header names to NumPy arrays. The header names are:
CCSDS_VERSION_NUMBER
,CCSDS_PACKET_TYPE
,CCSDS_SECONDARY_FLAG
,CCSDS_SEQUENCE_FLAG
,CCSDS_APID
,CCSDS_SEQUENCE_COUNT
,CCSDS_PACKET_LENGTH