[daip] ANTAB KEYIN problem when station FT used

James M. Anderson anderson at gfz-potsdam.de
Tue Jul 12 05:08:37 EDT 2016


Hello daip,

I have a problem with ANTAB, as my dataset includes the station FT
(Fortaleza, Brazil).

>From the ANTAB.FOR source code, I see that the standard KEYIN keywords
list contains 'FT      ' for the factor by which to multiply all TSYS/TANT
values.  Then, all of the station names get added as KEYIN keywords,
so that 'FT      ' for the station Fortaleza gets added in after the
FT factor keyword.  Then, when parsing the ANTAB input file, ANTAB
only thinks that it see the TSYS multiplication factor keyword and
dies with

ANTAB2: TSYS FT                 FT=1.0 TIMEOFF=0   INDEX ='R1','R2','R3'
ANTAB2: TXTCAL: TSYS RECORD MISSING STATION NAME
ANTAB2: Purports to die of UNNATURAL causes

or

ANTAB2: TSYS FT                 TIMEOFF=0   INDEX ='R1','R2','R3','R4','
ANTAB2: TXTCAL: TSYS RECORD MISSING STATION NAME
ANTAB2: Purports to die of UNNATURAL causes

if I remove the FT=1.0 statement from the KEYIN line.


I *could* edit the AN tables to change 'FT' to "FORTALEZ' or
something, change my ANTAB input files to have FORTALEZ instead of FT,
run ANTAB, and then change the AN tables to revert back to 'FT' (I
have many other automatic flagging and other tools that depend on the
station name), but it would be nicer if ANTAB itself could do
something here.

I suspect that it might be dangerous to change the KEYIN subroutines
to check whether or not there are multiple KEYS with the same values,
and if multiple instances of such a keyword appear, to populate
the multiple KEYS locations.

And changing the multiplier keyword FT to FACTOR would probably break
quite a few scripts around the world designed to generate ANTAB input
files.

So, would it be possible to change the ANTAB.FOR code to replace a
station name 'FT' by 'FORTALEZ' for the KEYIN KEYS list, so that only
the ANTAB-related code needs to be changed?

Does ANCAL also need to be changed?  I see no other instances of
'FT' in the AIPS source code.

At the bottom I have attached some diff output for suggested code
changes.

Have a good day,


James M Anderson



-- 
James M Anderson, PhD
Department 1: Geodesy
Section 1.1:  Space Geodetic Techniques
Tel.:         +49 (0)331/288-28948
Fax:          +49 (0)331/288-1111
E-Mail:       anderson at gfz-potsdam.de
___________________________________

Helmholtz-Zentrum Potsdam
Deutsches GeoForschungsZentrum GFZ
Stiftung des öff. Rechts Land Brandenburg
Telegrafenberg A6
14473 Potsdam
Germany

















*** ./APL/PGM/NOTST/ANTAB.FOR   Thu Nov 19 05:42:41 2015
--- /home/anderson/ANTAB.FOR    Tue Jul 12 10:49:35 2016
***************
*** 600,606 ****
  C                                       Add antenna names as keywords
        IOFF = IOFF + 2 * MAXIF
        DO 70 I = 1, MAXANT
!          IF (I.LE.NSTNS) LPARS(I+IOFF) = STNNAM(I)
  70       CONTINUE
  C                                       IOFF points to end of current LPARS
        IOFF = IOFF + NSTNS
--- 600,621 ----
  C                                       Add antenna names as keywords
        IOFF = IOFF + 2 * MAXIF
        DO 70 I = 1, MAXANT
!          IF (I.LE.NSTNS) THEN
!             IF (STNNAM(I).NE.'FT') THEN
!                LPARS(I+IOFF) = STNNAM(I)
!             ELSE
!                DO 68 J = 1, MAXANT
!                   IF (J.LE.NSTNS) THEN
!                      IF (STNNAM(I).EQ.'FORTALEZ') THEN
!                         WRITE (MSGTXT,1730)
!                         IRET = 12
!                         GO TO 990
!                         END IF
!                      END IF
!  68               CONTINUE
!                LPARS(I+IOFF) = 'FORTALEZ'
!                END IF
!             END IF
  70       CONTINUE
  C                                       IOFF points to end of current LPARS
        IOFF = IOFF + NSTNS
***************
*** 856,861 ****
--- 871,878 ----
   1400 FORMAT ('TXTCHK: GAIN RECORD MISSING STATION NAME')
   1415 FORMAT ('TXTCHK: NO GAIN CURVE TYPE SPECIFIED')
   1520 FORMAT ('TXTCHK: ERROR',I3,' READING ',A4,' VALUES')
+  1730 FORMAT ('TXTCHK: BOTH STATIONS FT AND FORTALEZ EXIST IN ANTENNA
+      * TABLES')
   1995 FORMAT ('CHK ERROR',I3,' RE-OPENING ',A)
        END
        SUBROUTINE TXTCAL (NTABGC, IRET)
***************
*** 1011,1017 ****
  C                                       Add antenna names as keywords
        IOFF = IOFF + 2 * MAXIF
        DO 70 I = 1, MAXANT
!          IF (I.LE.NSTNS) LPARS(I+IOFF) = STNNAM(I)
  70       CONTINUE
  C                                       IOFF points to end of current LPARS
        IOFF = IOFF + NSTNS
--- 1028,1055 ----
  C                                       Add antenna names as keywords
        IOFF = IOFF + 2 * MAXIF
        DO 70 I = 1, MAXANT
!          IF (I.LE.NSTNS) THEN
!             IF (STNNAM(I).NE.'FT') THEN
!                LPARS(I+IOFF) = STNNAM(I)
!             ELSE
!                DO 68 J = 1, MAXANT
!                   IF (J.LE.NSTNS) THEN
!                      IF (STNNAM(I).EQ.'FORTALEZ') THEN
!                         WRITE (MSGTXT,1731)
!                         IRET = 12
!                         GO TO 990
!                         END IF
!                      END IF
!  68               CONTINUE
!                WRITE(MSGTXT,1700)
!                CALL MSGWRT(8)
!                WRITE(MSGTXT,1710)
!                CALL MSGWRT(8)
!                WRITE(MSGTXT,1720)
!                CALL MSGWRT(8)
!                LPARS(I+IOFF) = 'FORTALEZ'
!                END IF
!             END IF
  70       CONTINUE
  C                                       IOFF points to end of current LPARS
        IOFF = IOFF + NSTNS
***************
*** 1679,1684 ****
--- 1717,1730 ----
       * use *cal.vlba')
   1650 FORMAT ('! file FROM DATES ABOVE unless you understand what you
       * are doing.')
+  1700 FORMAT ('! WARNING: Station name FT conflicts with the KEYIN
+      * keyword FT')
+  1710 FORMAT ('! for the TSYS/TANT multiplication factor.  All
+      * occurances')
+  1720 FORMAT ('! of station FT should be re-labeled as FORTALEZ in the
+      * CALIN input file.')
+  1731 FORMAT ('TXTCAL: BOTH STATIONS FT AND FORTALEZ EXIST IN ANTENNA
+      * TABLES')
   1900 FORMAT (I6,' unidentified records skipped on input')
        END
        FUNCTION IKEY (LKEY, LPARS, NPARS)
*** ./HELP/ANTAB.HLP    Thu Nov 19 05:42:41 2015
--- /home/anderson/ANTAB.HLP    Tue Jul 12 10:34:43 2016
***************
*** 3,9 ****
  ;! Read amplitude calibration information into AIPS
  ;# Task Calibration VLBI
  ;-----------------------------------------------------------------------
! ;;  Copyright (C) 1995-1999, 2001, 2008, 2009, 2014, 2015
  ;;  Associated Universities, Inc. Washington DC, USA.
  ;;
  ;;  This program is free software; you can redistribute it and/or
--- 3,9 ----
  ;! Read amplitude calibration information into AIPS
  ;# Task Calibration VLBI
  ;-----------------------------------------------------------------------
! ;;  Copyright (C) 1995-1999, 2001, 2008, 2009, 2014-2016
  ;;  Associated Universities, Inc. Washington DC, USA.
  ;;
  ;;  This program is free software; you can redistribute it and/or
***************
*** 425,430 ****
--- 425,444 ----
  reported as an error.
  =========================================================================
  
+ ************************************************************************
+   The KEYIN keyword FT for the multiplicative factor by which to scale
+   TSYS or TANT values causes a conflict with the station name FT
+   (Fortaleza, Brazil) for experiments incorporating this station.  In
+   order to work around this historial design choice for ANTAB, and
+   minimize the impact on the majority of experiments that do not
+   incorporate this station, users should edit the CALIN input file for
+   ANTAB to replace the station name FT by FORTALEZ.
+ 
+   ONLY CALIN INPUT FILES FOR ANTAB AND ANCAL NEED TO BE CHANGED.  INPUT
+   FILES FOR OTHER TASKS SUCH AS UVFLG SHOULD USE THE STATION NAME AS IT
+   APPEARS IN THE ANTENNA TABLE.
+ ************************************************************************
+ 
*** ./APL/PGM/NOTST/ANCAL.FOR   Tue Sep  1 05:42:37 2015
--- /home/anderson/ANCAL.FOR    Tue Jul 12 10:59:19 2016
***************
*** 696,701 ****
--- 696,721 ----
  C                                      array PARS.
        DO 50 I = 1, NSTNS
           PARS(10+I) = STNNAM(I)
+          IF (STNNAM(I).NE.'FT') THEN
+             LPARS(I+IOFF) = STNNAM(I)
+          ELSE
+             DO 48 J = 1, MAXANT
+                IF (J.LE.NSTNS) THEN
+                   IF (STNNAM(I).EQ.'FORTALEZ') THEN
+                      WRITE (MSGTXT,1830)
+                      IERR = 12
+                      GO TO 990
+                      END IF
+  48                  CONTINUE
+                WRITE(MSGTXT,1800)
+                CALL MSGWRT(8)
+                WRITE(MSGTXT,1810)
+                CALL MSGWRT(8)
+                WRITE(MSGTXT,1820)
+                CALL MSGWRT(8)
+                LPARS(I+IOFF) = 'FORTALEZ'
+                END IF
+             END IF
   50      CONTINUE
  C                                       Init antenna counts, bl factors
        DOBFAC = .FALSE.
***************
*** 1139,1144 ****
--- 1159,1172 ----
   1440 FORMAT ('GETCAL: ERROR =',I3,' FROM KEYIN READING TANT CARDS')
   1610 FORMAT ('Source : ',A8,' Flux density (Jy) = ',F8.3)
   1710 FORMAT ('NO SYSTEM TEMPS FOUND FOR STATION : ',A)
+  1800 FORMAT ('! WARNING: Station name FT conflicts with the KEYIN
+      * keyword FT')
+  1810 FORMAT ('! for the TSYS/TANT multiplication factor.  All
+      * occurances')
+  1820 FORMAT ('! of station FT should be re-labeled as FORTALEZ in the
+      * CALIN input file.')
+  1830 FORMAT ('GETCAL: BOTH STATIONS FT AND FORTALEZ EXIST IN ANTENNA
+      * TABLES')
        END
        SUBROUTINE CHKCRD (TVALS, ISTN, ITYP, IERR)
  C-----------------------------------------------------------------------
*** ./HELP/ANCAL.HLP    Tue Oct 14 05:43:17 2008
--- /home/anderson/ANCAL.HLP    Tue Jul 12 10:39:08 2016
***************
*** 3,9 ****
  ;! Places antenna-based Tsys and gain corrections in CL table
  ;# Task Calibration VLBI
  ;-----------------------------------------------------------------------
! ;;  Copyright (C) 1995, 2008
  ;;  Associated Universities, Inc. Washington DC, USA.
  ;;
  ;;  This program is free software; you can redistribute it and/or
--- 3,9 ----
  ;! Places antenna-based Tsys and gain corrections in CL table
  ;# Task Calibration VLBI
  ;-----------------------------------------------------------------------
! ;;  Copyright (C) 1995, 2008, 2016
  ;;  Associated Universities, Inc. Washington DC, USA.
  ;;
  ;;  This program is free software; you can redistribute it and/or
***************
*** 283,288 ****
--- 283,303 ----
     289 02:00 37.0
     /
  
+ ****************************************************************
+   The KEYIN keyword FT for the multiplicative factor by which to
+   scale TSYS or TANT values causes a conflict with the station
+   name FT (Fortaleza, Brazil) for experiments incorporating this
+   station.  In order to work around this historial design choice
+   for ANTAB, and minimize the impact on the majority of
+   experiments that do not incorporate this station, users should
+   edit the CALIN input file for ANCAL to replace the station
+   name FT by FORTALEZ.
+ 
+   ONLY CALIN INPUT FILES FOR ANTAB AND ANCAL NEED TO BE CHANGED.
+   INPUT FILES FOR OTHER TASKS SUCH AS UVFLG SHOULD USE THE
+   STATION NAME AS IT APPEARS IN THE ANTENNA TABLE.
+ ****************************************************************
+ 
  ================================================================
  
      4) The gain group. Several gain curves are built into ANCAL.



More information about the Daip mailing list