[Difx-users] pcal_200213 bug in difx2fits
Leonid Petrov
Leonid.Petrov at lpetrov.net
Thu Feb 13 12:12:41 EST 2020
Dear DiFXers,
pcal_200213 bug in difx2fits was found and fixed:
Synopsis:
Phase calibration frequencies in FITS-IDI are not commensurate to the
phase
cal tone spacings and some frequencies are NaN if for the lower
frequency
of a given IF is no commensurate to the phase cal tone spacings. Was
found
in VLBI experiment VT9259 with IF#1 LO Frequency 3448.4 MHz and pcal
tone
spacings 5 MHz.
Severity:
Serious
Reason:
A trivial coding mistake
Patch:
--- libraries/difxio/difxio/difx_datastream.c~ 2019-04-13
19:05:23.600324077 -0400
+++ libraries/difxio/difxio/difx_datastream.c 2020-02-13
11:28:46.109375671 -0500
@@ -342,7 +342,7 @@
if(df->sideband == 'U')
{
- toneFreq0 = (((int)(loFreq)) / dd->phaseCalIntervalMHz) *
dd->phaseCalIntervalMHz;
+ toneFreq0 = ( (int) loFreq / (int) dd->phaseCalIntervalMHz ) * (int)
dd->phaseCalIntervalMHz;
if(toneFreq0 <= loFreq)
{
toneFreq0 += dd->phaseCalIntervalMHz;
@@ -350,7 +350,7 @@
}
else
{
- toneFreq0 = (((int)(loFreq)) / dd->phaseCalIntervalMHz) *
dd->phaseCalIntervalMHz;
+ toneFreq0 = ( (int) loFreq / (int) dd->phaseCalIntervalMHz ) * (int)
dd->phaseCalIntervalMHz;
if(toneFreq0 == loFreq)
{
toneFreq0 -= dd->phaseCalIntervalMHz;
Leonid
2020.02.13_12:13:06
More information about the Difx-users
mailing list