[Difx-users] Change for 4- and 8-bit VDIF

Walter Brisken wbrisken at nrao.edu
Wed Feb 19 18:39:00 EST 2025


Hi DiFX users,

The mark5access library in the difx software suite contains the routines 
to reconstruct a VDIF stream into voltage samples.  Since support of 4- 
and 8- bit VDIF was introduced into this library, which probably dates 
back to around 2013 or so, these two modes have used an asymmetric 
mapping of reconstructed values.  That is, in the case of n bits per 
sample, the reconstructed value corresponding to sample state 2^(n-1) 
was zero (mimicking the values that a signed integer can take).  This is 
not the case (and never has been) for 1 and 2 bit VDIF.  The VDIF 
specification does not specify the mapping of sample state to 
reconstructed value (unless I am missing it), but I am convinced that 
the symmetric output is the more useful and least surprising way to 
proceed. This also provides one additional useful situation within 
mark5access: it allows decoded invalid packets to be reconstructed as 
zero and be unambiguously interpreted as such.

I have just put in a change to mark5access to symmetrize the 
reconstructed values for 4- and 8-bit VDIF (both real and complex).  No 
change was made to the 1- or 2-bit cases.

The effect of assuming one mapping and using the other is the 
introduction of a fixed DC offset in the output values.  This is how the 
pre-existing behavior was identified.

Please let me know if you have questions or concerns.

-Walter



More information about the Difx-users mailing list