vallenae.io.encode_data_blob

vallenae.io.encode_data_blob(data, data_format, factor_millivolts)[source]

Encodes array of voltage values to BLOB of 16-bit ADC values for memory-efficient storage.

Parameters
  • data (ndarray) – Array with voltage values

  • data_format (int) –

    • 0: uncompressed

    • 2: FLAC compression

  • factor_millivolts (float) – Factor from int16 representation to millivolts. Stored in tradb -> tr_params as ‘TR_mV’

Return type

bytes

Returns

Data blob