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

        INTEGER tno, i, err
        REAL Rtime, Rdata(*)
        INTEGER Rflag(*), Sindex(*)

    CAdread reads raw uncalibrated data points from a calibration data
    set.  Arguments are:

  Inputs:
       tno     -- calibration set
       i       -- data slot

  Outputs:
       Rtime   -- sampling time
       Rdata   -- correlation data
       Rflag   -- flagging data
       Sindex  -- index name of associated source (0 if not used)
       err     -- error output

       err = 0 --> nonexistent slot
       err = 1 --> no errors detected
