obspy.io.reftek.packet._unpack_C0_C2_data_safe

_unpack_C0_C2_data_safe(packets, encoding)[source]

Unpacks sample data from a packet array that uses ‘C0’ or ‘C2’ data encoding.

If the packet array is not contiguous in memory, fall back to slightly slower unpacking with looking up the memory position of the first packed byte in each packet individually.

Parameters:
  • packets (numpy.ndarray (dtype PACKET_FINAL_DTYPE)) Array of data packets (packet_type 'DT') from which to unpack the sample data (with data encoding ‘C0’ or ‘C2’).
  • encoding (str) Reftek data encoding as specified in event header (EH) packet, either 'C0' or 'C2'.