For products with pretrigger implemented in hardware (most products), this function converts and aligns the raw data collected by
a_pretrig().
The a_pretrig() function can return either raw A/D data or converted data, depending on whether or not the :class:`ScanOptions.CONVERTDATA` option was used.
The raw data as it is collected is not in the correct order. After the data collection is completed it must be rearranged into the correct order.
This function correctly orders the data also, starting with the first pretrigger data point and ending with the last post-trigger point
a_convert_pretrig_data(board_num, pretrig_count, total_count, data, chan_tags = None)
board_num (int)
The number associated with the board when it was installed with InstaCal or created with create_daq_device().
pretrig_count (int)
Number of pre-trigger samples. This value must match the actual_pretrig_count returned by a_pretrig().
total_count (int)
Total number of samples that were collected
data (POINTER(c_ushort))
Pointer to the data array.
data (POINTER(c_ushort), optional)
Pointer to the channel tag array. Default value is None if omitted. A value of None may be passed if using 16-bit boards or if channel tags are not desired; see the note regarding 16-bit boards below.
When you collect data with a_pretrig() and you don't use the CONVERTDATA scan option, you must use a_convert_pretrig_data() to convert the data after it is collected. There are cases where the CONVERTDATA` option is not allowed, for example, if you use the BACKGROUND option with a_pretrig() on some devices, the CONVERTDATA option is not allowed. In those cases this function should be used to convert the data after the data collection is complete.