; ICHANSEL
;---------------------------------------------------------------
;! Array of start, stop, increment channel #S + IF to average
;# ADVERB CALIBRATION SPECTRAL
;-----------------------------------------------------------------------
;;  Copyright (C) 2000, 2018, 2020
;;  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
;-----------------------------------------------------------------------
ICHANSEL  LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
----------------------------------------------------------------
ICHANSEL
Type: Adverb  (REAL, 4 elements x 20 rows)
Use:  Data selection adverb used to specify a list of start and stop
      channel numbers plus an increment AND IF NUMBER to be used in
      some way, such as to be averaged to form a pseudo-continuum
      channel.  Up to 20 sets of channel numbers/IFs can be specified.
      The first two elements specify the start and stop channel
      numbers, the third specifies the increment within that range,
      i.e.if CHANSEL = 10,20,2 that means take every other channel in
      the range 10 - 20, so that channels 10,12,14,16,18,20 would be
      averaged together.  The fourth element specifies the IF to which
      the previous three apply.
Null Value:  0
      A completely null value means use all channels in some tasks:
         ICHANSEL(1,i) <= 0  =>  1
         ICHANSEL(2,1) <= 0  =>  Nchan
         ICHANSEL(2,i) <= 0  =>  (i > 1) -> no more channel sets
         ICHANSEL(3,i) <= 0  =>  1
         ICHANSEL(4,i) <= 0  =>  all IFs
      BPASS, CPASS, AVSPC, REWAY and many other tasks use the center
      75% of the channels for any IF for which no ICHANSEL was
      specified.  Other tasks have different defaults including being
      unwilling to set defaults.
      Examples:
         ICHANSEL = 9,56         includes all channels 9-56 in all IFs
         ICHANSEL = 12,53,1,1, 62,116,1,1, 12,116,1,2
                                 includes all channels from 12-53 and
                                 62-116 in IF 1, and all channels from
                                 12-116 in IF 2.  If there are more
                                 IFs, default actions are taken.
         ICHANSEL = 17,112,1,0, 23,45,1,1, 87,112,1,1
                                 includes all channels from 17-112 in
                                 all IFs except IF 1 which includes
                                 channels 23-45 and 87-112.  NOTE
                                 WELL: the all IF instruction must
                                 precede any instruction that
                                 partially overrides it.
       In most tasks ICHANSEL selects the channels to be averaged.
Tasks:
  ACSCL......Corrects cross amplitudes using auto correlation
             measurements.
  AVSPC......Averages uv-data in the frequency domain.
  BLCAL......Compute closure offset corrections.
  BLCHN......Compute closure offset corrections on a channel-by-channel
             basis.  ICHANSEL selects the "good" channels to be fit.
  BPASS......Computes spectral bandpass correction table.  ICHANSEL
             selects channels to be averaged in the normalization.
  BPWAY......Determines channel-dependent relative weights.  ICHANSEL
             selects the channels used to find a normalized rms.
  CALIB......Determines antenna calibration: complex gain.
  CPASS......Computes polynomial spectral bandpass correction table.
             ICHANSEL selects the channels to average for a "channel 0".
  DEFLG......Edits data based on decorrelation over channels and time.
  FIXAL......Least squares fit special EVLA aliasing function and
             remove.  ICHANSEL slects channels to be fit.
  FLGIT......Flags data based on the rms of the spectrum.
  PCAL.......Determines instrumental polarization for UV data.
  PHSRF......Perform phase-referencing within a spectral line database.
  REWAY......Computes weights based in rms in spectra.
  RFLAG......Flags data set based on time and freq rms in fringe
             visibilities.  ICHANSEL selects channels to use in the
             spectral median window flagging operation.
  RLCAL......Determines instrumental right-left phase versus time (a
             self-cal).
  SPLAT......Applies calibration and splits or assemble selected
             sources.
  SPLIT......Converts multi-source to single-source UV files w
             calibration.
  UVHOL......Prints holography data from a UV data base with
             calibration.
  UVLIN......Fits and removes continuum visibility spectrum, also can
             flag.  ICHANSEL selects channels to fit.
  UVLSD......Least squares fit to channels and divides the uv data.
             ICHANSEL selects channels to fit.
  UVLSF......Least squares fit to channels and subtracts from uv data.
             ICHANSEL selects channels to fit.
  UVMLN......Edits data based on the rms of the spectrum.  ICHANSEL
             selects channels to fit.
Procedures:
  FXALIAS....Least squares fit special EVLA aliasing function and
             remove.  ICHANSEL selects the channels to be fit.
  IMSCAL.....Large image self-cal with IM2CC and OOCAL.  ICHANSEL
             selects the channels to be averaged.
  OOCAL......Determines antenna complex gain with frequency-dependent
             models.   ICHANSEL selects the channels to be averaged.
----------------------------------------------------------------
