[daip] SPFLG trouble and possible fix

Olaf Wucknitz wucknitz at astro.uni-bonn.de
Mon Apr 6 09:29:24 EDT 2009


Hello,

when using SPFLG with a rather big global VLBI data set (GW019B), I 
experience the problem that not all of the data is shown for all 
baselines if smoothing in time is applied.
I found a quick fix for this, but I am not sure if it is appropriate for 
all cases. Probably not...


Subroutine SPFLGR in SPFLG.FOR reads the master grid and sets
MTIMES(*) and MSOU(*) accordingly. This happens in lines 1025-1069 in
the original file.
It only uses the first baseline/stokes (BL/ST) combination for this and 
probably assumes that all others have the same information for MTIMES(*) 
and MSOU(*).

The master grid file is created in subroutine GRIDTC in SPFLG.FOR.
This collects information for max. 8 BL/ST combinations at a
time. If there are at most 8 in total, everything works fine.
Otherwise the following happens: There are several calls of GTBWRT
from GRIDTC.
In GTBWRT the arrays are first set to -1 for source number and then filled
bit by bit. When they are filled, all BL/ST combinations get filled
with the source numbers, but only the ones in this actual 8 BL/ST
block. If there are more blocks and the first one has less filled
time slots, the task does not display all the data because it does not 
know about all of them.
As workaround I use the following: Instead of setting the source
number to -1, I use 0 in line 245 of GTBWRT.FOR, i.e. I change the 
following

C                                       Initialize accumulators
            DO 610 LOOP = 1,NBLANK
               RBUFF(MPTR+LOOP,IBUFF) = FBLANK
 610           CONTINUE
            IF (ITYP.EQ.7) THEN
               RBUFF(MPTR+1,IBUFF) = -1.0
               RBUFF(MPTR+2,IBUFF) = TIMES(LROW)
               RBUFF(MPTR+3,IBUFF) = TIMES(LROW+1)
               END IF


to


C                                       Initialize accumulators
            DO 610 LOOP = 1,NBLANK
               RBUFF(MPTR+LOOP,IBUFF) = FBLANK
 610           CONTINUE
            IF (ITYP.EQ.7) THEN
               RBUFF(MPTR+1,IBUFF) = 0.0
               RBUFF(MPTR+2,IBUFF) = TIMES(LROW)
               RBUFF(MPTR+3,IBUFF) = TIMES(LROW+1)
               END IF


The array MSOU(*) that is created from these arrays in subroutine SPFLGR 
is used in subroutine SPFOAD in SPFLG.FOR (lines 6723-6766) to define 
which times should be displayed, but only if additional smoothing is 
wanted. Otherwise all time intervals are shown. When initialising the 
source number to 0 as suggested, all the data are shown, at least in my 
current case. Sometimes this means that a lot of space on the screen is 
reserved for non-existent data, but in this way all baselines are shown 
consistently. The same already works fine now if the smooting interval is 
set to 1.


I can provide a data set that shows the problem if this helps to fix it.


Cheers,
Olaf




More information about the Daip mailing list