%N cadwrite %F $MIR/src/subs/calio.for
%D Write data into a calibration set
%: calibration, i/o
%P pjt
%B
        SUBROUTINE cadwrite(tno, i, Rtime, Rdata, Rflag, Sindex)

        INTEGER tno, i
        REAL    rtime, rdata(*)
        INTEGER rflag(*), sindex(*)

    CAdwrite writes raw uncalibrated data points to a calibration data
    set.  It also writes an index to the source name of the associated
    data poin. Time ordering is not required.  Arguments are:

  Inputs:
       tno     -- calibration set
       i       -- data slot
       Rtime   -- sampling time
       Rdata   -- correlation data
       Rflag   -- flagging data
       Sindex  -- index name of associated source (0 if not used)
