; SPECR
;---------------------------------------------------------------
;! Spectral regridding task for UV data
;# TASK UV IMAGING SPECTRAL
;-----------------------------------------------------------------------
;;  Copyright (C) 1995-1996, 2008, 2014, 2019
;;  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
;-----------------------------------------------------------------------
SPECR     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
SPECR:  Spectral regridding task for uv data
INNAME                             Input UV data (name)
INCLASS                            Input UV data (class)
INSEQ                              Input UV data (seq. #)
INDISK                             Input UV data disk #
OUTNAME                            Output uvdata name (name)
OUTCLASS                           Output uv data class
OUTDISK                            Output uvdata disk #
OUTSEQ          -1.0    32000.0    Output seq. no.
NPOINTS          2.0     8192.0    # channels in output data
INTPARM                            Type of smoothing + parms
                                   0 -> FFT (recommended)
BADDISK                            Disk #'s to avoid
----------------------------------------------------------------
SPECR
Type:  Task
Use:   Spectral regridding of UV line data. The user specifies the
       number of channels required in the output database and SPECR will
       regrid the data to obtain that spectral resolution. It can either
       increase or decrease the spectral resolution. Some care must be
       taken by the user to avoid totally over-sampling the spectra.
       Output is compressed if input is compressed.

       NOTE: this task does NOT apply flagging or calibration tables
       to the input UV data.  Run SPLIT first if that operation is
       desired.
Adverbs:
  INNAME.....Input UV data file (name).     Standard defaults.
  INCLASS....Input UV data file (class).    Standard defaults.
  INSEQ......Input UV data file (seq. #).   0 => highest.
  INDISK.....Input UV data file disk #.  0 => any.
  OUTNAME....Output UV data name (name). Standard defaults.
  OUTCLASS...Output UV data file (class).
  OUTDISK....The disk # of output data.  0 => highest with space.
  OUTSEQ.....Output sequence number. 0 => new file.
  NPOINTS....The number of spectral channels (per IF and polarization)
             required in the output data file.
  INTPARM....The input visibility spectra are interpolated to the
             output under control of INTPARM:  With a reasonable
             number of spectral channels, FFT interpolation is
             probably best.  If the spectra are well sampled to begin
             with, then more traditional interpolation methods may be
             used.
             INTPARM(1) = type of interpolation (weighted smoothing)
               to use
                  0 => FFT (recommended under most circumstances)
                  1 => Hanning
                  2 => Gaussian
                  3 => Boxcar
                  4 => Sinc (i.e. sin(x)/x)
                  5 => Exponential
                  6 => Median window
                  7 => 2 point
             INTPARM(2) = the "diameter" of the function, i.e. width
               between first nulls of Hanning triangle and sinc
               function, FWHM of Gaussian, Exponential, width of
               Boxcar and median window. Defaults (if < 0.1) are 4, 2,
               2, 3, 1.99, 4 channels for INTPARM(1) = 1 - 6.
               (Exponential with width 2.00 is strangely slow.)
             INTPARM(3) = the diameter over which the convolving
               function has value - in channels.  Defaults: 1, 3, 1,
               4, 3, 1 times INTPARM(2) used when input INTPARM(3) <
               INTPARM(2) (after application of defaults).
  BADDISK....Disk #'s to avoid for scratch files
----------------------------------------------------------------
