; PEEK
;---------------------------------------------------------------
;! fits pointing model function to output from the VLA
;# Task Calibration VLA
;-----------------------------------------------------------------------
;;  Copyright (C) 2018
;;  Associated Universities, Inc. Washington DC, USA.
;;
;;  This program is free software; you can redistribute it and/or
;;  modify it under the terms of the GNU General Public License as
;;  published by the Free Software Foundation; either version 2 of
;;  the License, or (at your option) any later version.
;;
;;  This program is distributed in the hope that it will be useful,
;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;  GNU General Public License for more details.
;;
;;  You should have received a copy of the GNU General Public
;;  License along with this program; if not, write to the Free
;;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
;;  MA 02139, USA.
;;
;;  Correspondence concerning AIPS should be addressed as follows:
;;         Internet email: aipsmail@nrao.edu.
;;         Postal address: AIPS Project Office
;;                         National Radio Astronomy Observatory
;;                         520 Edgemont Road
;;                         Charlottesville, VA 22903-2475 USA
;-----------------------------------------------------------------------
PEEK      LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
PEEK:  Task to fit pointing model function to VLA pointing data
INNAME                             data (name) for plot file
INCLASS                            data (class).
INSEQ             0.0    9999.0    data (seq. #).  0 => high
INDISK                             Disk unit #.       0 => any
ANTENNAS                           Antennas to fit
TIMERANG                           Time range to fit
APARM                              Controls
                                   (1) start MJAD
                                   (2) end MJAD
                                   (3,4) Elevation range (deg)
                                   (5) amplitude limit
                                   (6) wind speed limit
                                   (7,8) beamwidth range
                                   (9) filter change value
                                   (10) filter N * sigma
BAND                               Restrict to this freq band
FPARM                              FPARM(i) > 0 => fit
                                   (1) Tilt
                                   (2) Azzero
                                   (3) Elzero
                                   (4) Colima
                                   (5) Sag
                                   (6) Az3
                                   (7) Azcntr
                                   (8) Elcntr
                                   (9) Axsprp
                                   (10) Az2
                                   (11) Refrac
                                   (12) tilt atached to ant
                                   (16) suppress gnuplot file
                                   (17) suppress ant<nn>.dat
                                   (18) suppress .changes file
                                   (19) suppress filtered
                                        changes file
PRTLEV            0.0        3.0   Print level - 0 normal
ASDMFILE
                                   file name of data
DOPLOT                             > 0 make AIPS plots
DOTV             -1.0        1.0   > 0 -> plot to TV
XYRATIO                            X/y plot size ratio
DPARM                              (1) Symbol type: measured
                                   (2) Symbol type: residual
                                   (3) Symbol factor: measured
                                   (4) Symbol factor: residual
                                   (5) Graphics plane: measured
                                   (6) Graphics plane: residual
----------------------------------------------------------------
PEEK
Type:  Task
Use:   Fits pointing model to VLA pointing data.
Adverbs:
  INNAME.....file name to hold plots (name).  Standard defaults.
  INCLASS....file name (class).      Standard defaults.
  INSEQ......file name (seq. #).     0 => highest.
  INDISK.....Disk unit #.               0 => any.
  TIMERANG...Time range of the data to be fit. In order:
             Start day, hour, min. sec, End day, hour, min. sec
             Days relative to reference date. all 0 -> 0,24hour
  ANTENNAS...A list of the antennas to fit.
  APARM......Control parameters
             (1) start MJAD to include 0 -> 0
             (2) end MJAD to include   0 -> large
             (3,4) Limit to elevation range (min,max)
                  0 -> 7, 122 (degrees)
             (5) Minimum amplitude  0 => 0.01
             (6) Maximum wind speed  0 -> 5 m/sec
             (7,8) Limit to normalized beamwidth range (min,max)
                     0 -> 0.95,1.15
             (9) Filtered change file gets a line when the absolute
                 value of the change > APARM(9)  (0 -> 0.1)
             (10) and the abs (change) * APARM(10) * sigma
                 (parameter)    (0 -> 3.0)
  BAND.......Restrict to band code ' ' => 'X'
             Allowed codes P, L, S, C, X, U, K, A, Q
  FPARM......If FPARM(i) > 0, then fit for the parameter
                 (1) Tilt
                 (2) Azzero
                 (3) Elzero
                 (4) Colima
                 (5) Sag
                 (6) Az3
                 (7) Azcntr
                 (8) Elcntr
                 (9) Axsprp
                 (10) Az2
                 (11) Refrac
             All 0 => fit 1, 2, 3, 4, 11
                 (12) > 0 -> attach tilt to antenna, else to pad
                 (16) > 0 -> suppress output of gnuplot file
                             (gnuplot made obsolete by AIPS plots)
                 (17) > 0 -> suppress output of ant<nn>.dat files
                             If (16) <= 0, (17) is forced to 0
                 (18) > 0 -> suppress output of changes file
                             May only want to keep the filtered
                             changes file.
                 (19) > 0 -> suppress output of filtered changes file
  PRTLEV.....Print level used for debugging problems.  0 normal.
  ASDMFILE...Use both ASDMF(1) and ASDMF(2) to specify the full path
             to the .PNT file (but leave off the .PNT which the task
             will append).  This could be the same values for ASDMF as
             used by BDFLIST and BDF2AIPS if you put the .PNT file in
             the same directory as the top directory of the SDM/BDF
             files.
  DOPLOT.....> 0 => make AIPS plot files of the pointing errors before
                    and after fit.
  DOTV.......> 0 => make the plot(s) on the TV, else make plot files.
  XYRATIO....Scale the X axis longer than the Y by XYRATIO.
                If DOTV >  0, 0 -> fit to the TV window
                If DOTV <= 0, 0 -> 1.
  DPARM......(1) Symbol type for measured Az and El errors
                 Default is 2, the choices are
                 1: Plus sign     12: Five pointed star
                 2: Cross (X)     13: Star of David
                 3: Circle        14: Seven-pointed star
                 4: Box           15: Eight-pointed star
                 5: Triangle      16: Nine-pointed star
                 6: Diamond       17: Ten-pointed star
                 7: Pentagon      18: 11-pointed star
                 8: Hexagon       19: 12-pointed star
                 9: Septagon      20: 13-pointed star
                 10: Octagon      21: 14-pointed star
                 11: Nine-gon     22: Plus with gap
                                  23: vertical line
                                  24: Cross with gap
             (2) Symbol type for residual Az and El (measured - fit)
                 Default is 3 from choices above
             (3) Scaling factor for measured Az and El points:
                 Default = 1
             (4) Scaling factor for residual Az and El points:
                 Default = 1
             (5) Graphics channel for measured Az and El errors.
                 Default is 2, choices are 1 yellow, 2 green, 3 pink,
                 and 4 cyan
             (6) Graphics channel for residual Az and El;
                 default is 3.
----------------------------------------------------------------

