How to Scale Unscaled data in RFSA

Updated May 15, 2023

Reported In

Driver

  • NI-RFSA

Issue Details

I used the Unscaled 1D (2D) I16 niRFSA Fetch IQ.vi, and it had a wfm info output. What components does the wfm info consist of and is there a way to scale unscaled data with the wfm info?

Solution

Unscaled niRFSA Fetch IQ fetches unscaled ADC data from the RFSA device.  It has compact data representation, but, as a trade off, does not provide scaling and timestamping. You can use wfm info to recreate amplitude, sampling rate and timestamp values.
Wfm info contains:
absolute timestampreturns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.
relative timestampreturns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference trigger location.
dtreturns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.
actual samples readreturns an integer representing the number of samples in the waveform.
offsetreturns the offset to scale data, (b), in mx + b form.
gainreturns the gain to scale data, (m), in mx + b form.

The formula below can be used to scale the received data:
y = mx + b
where y - scaled amplitude, x - unscaled I16 value, m and b - gain and offset components of wfm info respectively.