As of Tue Jun 18 20:07:27 2024

SOUSP: Fits, plots, returns spectral index parameters


INNAME                             Input UV file name (name)
INCLASS                            Input UV file name (class)
INSEQ             0.0     9999.0   Input UV file name (seq. #)
INDISK            0.0        9.0   Input UV file disk unit #
SRCNAME                            Source name
CALCODE                            Calibrator code
QUAL             -1.0              Source qualifier -1 => any
DOCLIP                             > 0 allows the task to clip
                                   bad values at DOCLIP * rms
ORDER                              Order of fit
REFREQ                             Reference frequency in GHz
                                   < 0 -> header, 0 -> 1 GHz
NOISE                              Noise in Jy for each freq
                                      0 => 0.1 initially
                                      0 => rms on the plots
FLDSIZE                            (Flux, freq) in (Jy, GHz)
                                      0 => use source table
DOCONFRM         -1.0        1.0   > 0 => replace SU table
                                      values with fit
SNVER            -1.0              > 0 -> also correct SN table
INVERS           -1.0              > 0 -> correct SNVER-INVERS
SYMBOL            0.0       24.0   Symbol to use on plot
FACTOR            0.0       20.0   Scale plot symbols
PIXRANGE                           Control the Y plot range
DOTV                               > 0 => plot on TV, 0 no plots
                                   < 0 => make 2 plot files
GRCHAN            0.0        7.0   TV graphics channel to use
SPECFLUX @                         Flux at REFREQ
SPECINDX @                         Spectral index
SPECURVE @                         Spectral index curvature


Task:  This task fits fluxes for a source to determine the spectral
       index and spectral index curvature:
           log10 (flux) = A + SPECINDX * log10(f/f0) +
               SPECURVE(1) * [log10(f/f0)]^2 + ...
       where A is log10 of the flux at REFREQ, f is the frequency, and
       f0 is REFREQ.  It then plots the fit in both log and linear space
       on the TV or in plot files.  It will return the adverbs SPECINDX
       and SPECURVE for use in other tasks such as BPASS.
  INNAME.....Input UV file name (name).      Standard defaults.
  INCLASS....Input UV file name (class).     Standard defaults.
  INSEQ......Input UV file name (seq. #).    0 => highest.
  INDISK.....Disk drive # of input UV file.  0 => any.
  SRCNAME....Name of source   ' ' not allowed
  CALCODE....SOURCES(1) may occur more than once in the source table
             with different calibator codes.  CALCODE may then be used
             to select which one you want.
                  '    ' => any calibrator code selected
                  '*   ' => any non blank code (cal. only)
                  '-CAL' => blank codes only (no calibrators)
                  anything else = calibrator code to select.
             NB: The CALCODE test is applied in addition to the other
             tests, i.e. SOURCES(1) and QUAL, in the selection of the
             source for which to determine the solution.
  QUAL.......Source qualifier: -1 => any, 0 is a real value.
  DOCLIP.....> 0 -> examine fluxes(if) and drop any more than
             DOCLIP(1) times the rms away from the median, all evaluated
             in log10(flux(if)),  0 < DOCLIP <= 1 -> 5.
  ORDER......<= 1 => fit spectral index only, 2 also fit SPECURVE(1),
             3 also fit SPECURVE(2), 4 also fit SPECURVE(3).  You will
             normally not wish to use more than 2.
  REFREQ.....Compute total flux, spectra index and curvature with
             reference frequency REFREQ in GHz
             0 => use 1 GHz;  < 0 => use header frequency
             If FLDSIZE is used, REFREQ is set to 1 GHz.
  NOISE......Noise value for frequencies 1 up to 64.  If FLDSIZE is
             not used, then these apply to the fluxes in the SU table
             for the named source.  Otherwise, they apply to the
             fluxes and frequencies listed in FLDSIZE.
             0 -> 0.1 Jy for the weighting used in fitting
             The error bars in the plots use NOISE(i), if > 0, and the
             actual rms otherwise.
  FLDSIZE....FLDSIZE(1,i) is the flux for the i'th frequency to be fit
             in Jy and FLDSIZE(2,i) is the frequency in GHz.  The
             number of frequencies to be fit is determined by the
             number of FLDSIZE pairs that are both > 0.  If all are 0,
             then the SU table is used to provide the fluxes for the
             various IF frequencies.
  DOCONFRM...> 0 => ask after plotting if the SU table values should
                    be replaced by the fit values - a YES or yes
                    answer must be given to make this happen.  This is
                    only done if all of FLDSIZE is 0.
             <= 0 => do not change the fluxes in the SU table and do
                    not ask about it.
  SNVER......If > 0 and DOCONFRM > 0 and all of FLDSIZE is 0, then
             correct SN table version SNVER for new fluxes (if any).
  INVERS.....If > SNVER > 0, correct SN table versions SNVER through
             INVERS for new fluxes (if any).
  SYMBOL.....Choices are
              1: Plus sign           13: Star of David
              2: Cross (X)           14: Seven-pointed star
              3: Circle              15: Eight-pointed star
              4: Box                 16: Nine-pointed star
              5: Triangle            17: Ten-pointed star
              6: Diamond             18: 11-pointed star
              7: Pentagon            19: 12-pointed star
              8: Hexagon             20: 13-pointed star
              9: Septagon            21: 14-pointed star
              10: Octagon            22: Plus (+) with gap
              11: Nine-gon           23: Cross (X) with gap
              12: Five pointed star  24: Vertical line
  FACTOR.....Scale plot symbols by FACTOR     0 -> 1.
             Data points are plotted as symbols, error bars as vertical
             lines, and the fit as a connected line.
  PIXRANGE...If PIXRANGE(2) > PIXRANGE(1), the plot will only cover
             that range in flux.  Otherwise it will cover the full
             trange of the data (only).
  DOTV.......> 0 => plot directly on the TV device, otherwise make a
             plot file for later display on one or more devices
             (including the TV if desired).
  GRCHAN.....Graphics channel (1 - 7) to use for line drawing.
             A value of 0 causes more than one graphics channel to be
Returned adverbs
  SPECINDX...Spectral index defined above.
  SPECURVE...Spectral index curvature parameters based on a reference
             frequency of REFREQ GHz and base-10 logarithms.