; VLBASRT
;---------------------------------------------------------------
;! Sorts VLBA data, if necessary
;# PROCEDURE VLBI UTILITY
;-----------------------------------------------------------------------
;;  Copyright (C) 2002, 2006, 2008
;;  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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
VLBASRT   LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
VLBASRT : Procedure to sort and index VLBA data
INNAME                             Input file name
INCLASS                            Input file class
INSEQ                              Input file sequence number
INDISK                             Disk number for input file
CLINT                              CL entry interval (min)
                                   0 => 0.25 minute.

          VLBASRT is defined in the VLBAUTIL run file.
----------------------------------------------------------------
VLBASRT
Type: Procedure
Use:  VLBASRT is a procedure that will sort and index VLBA data,
      if necessary.

      Type RUN VLBAUTIL to make the VLBASRT procedure available.
      NOTE: NEVER ABORT THIS PROCEDURE WHILE IT IS RUNNING, IT
            COULD CAUSE YOUR ORIGINAL DATA FILE TO BE DESTROYED.

  INNAME.....The name of the file to be corrected. Wildcard characters are
             allowed.
  INCLASS....The class of the file to be corrected. Wildcard characters are
             allowed.
  INSEQ......The sequence number of the file to be corrected. Zero defaults
             to the highest sequence number matching INNAME, INCLASS, and
             INDISK.
  INDISK.....The disk drive number of the file to be corrected. Zero defaults
             to any disk.
  CLINT......Calibration table interval in minutes. This should normally be in
             the range 0.25 to 1.0 and is used when the calibration table is
             regenerated. A calibration interval of 0.25 minute will be assumed
             if this is less than or equal to zero.
----------------------------------------------------------------
VLBASRT:            Procedure to look for subarrays
Documentor:         Amy Mioduszewski
Related Programs:   MSORT, INDXR, VLBAUTIL

Use VLBASRT if you FITLD or VLBALOAD has produced messages
that say that there may be a subarray condition or the data
may be out of order, but you know that you do not have
subarrays or if you just know your data needs to be sorted.
VLBASRT will check if your data needs sorting and if so the
data is sorted with MSORT; then it checks if your data has
the first calibration (CL) and index (NX) tables, and if not
creates them by running INDXR.

NEVER ABORT THIS PROCEDURE WHILE IT IS RUNNING, IT COULD
CAUSE YOUR ORIGINAL DATA FILE TO BE DESTROYED.

You should run VLBASRT after you have finished loading the data
from tape but before you either change the polarization
structure of the data with FXPOL, load any calibration data for
non-VLBA telescopes, or apply the calibration data.

VLBASRT is intended for all levels of VLBA users.
