[Kst] Number formats in ASCII data file
Svenn Are Bjerkem
svenn.bjerkem at googlemail.com
Tue Jun 12 15:51:58 UTC 2012
I have an ASCII log file from an Agilent logic analyzer which gives me
hedadecimal numbers in signed 12-bit format from a quadrature ADC.
The first column is indicating I (1) or Q (0) and the following values
are the 12-bit data values from four ADCs operating in parallell using
the same clock.
So far I have used an awk script to extract all I-lines and Q-lines
separately and convert them to signed decimal and write to two files
and then read those two files into kst2. I wonder if there is a way
inside kst to sample every line starting with 0 and put into one
vector, and then sample every line starting with 1 and put into
another vector. The next thing is the conversion of fff to -1 and so
on. Usually hexadecimal numbers are prefixed with 0x, but that is not
done by this Agilent device.
I have a workaround through the awk script, but I wonder if this kind
of number filtering and conversion is already available in kst, or if
it is something I can write a plugin to achieve. Advantage would be to
have the logic analyzer stream the data on a network connection
directly into kst.
In case somebody wonders why I don't use signed decimal representation
on the logic analyzer, it is because the same data will be used in a
VHDL testbench which is optimized for reading the 12-bit numbers on
exactly this format.
I am using kst 2.0.3 as that is the latest version available in Debian unstable.
More information about the Kst