%N blwrite %F $MIR/src/subs/mir_io.c
%D Write the baseline header for a MIR data set
%P dnf
%: low-level-i/o
%B
FORTRAN call sequence
       subroutine blWrite(blhid,inhid,isb,ipol,pa,iaq,ibq,icq,ioq,irec,
                         iifc,u,v,w,prbl,angres,vis,coh,sigcoh,csnr,
                         vflux,cnoise,avedhrs,ampav,phaave,tpvar,blsid,
                         itel1,itel2,iblcd,ble,bln,blu,soid)

       integer blhid,inhid,isb,ipol,iaq,ibq,icq,ioq,irec,iifc,blsid,
               itel1,tel2,iblcd
       real pa,u,v,w,prbl,angres,vis,coh,sigcoh,csnr,vflux,cnoise,ampav,
            phaave,tpvar,ble,bln,blu,soid
       double precision avedhrs

  This writes an entry into a MIR baseline header

  Input:
    blhid     baseline header id (globally unique)
    inhid     integration header id (globally unique, same as that for integration header)
    isb       sideband code
    ipol      polarization code
    pa        polarization angle
    iaq       amplitude quality code
    ibq       baseline quality code
    icq       coherence quality code
    ioq       offset quality code
    irec      receiver code
    iifc      if channel code
    u         u in meters
    v         v in meters
    w         w in meters
    prbl      projected baseline in meters
    angres    angular resolution of baseline in arcsec
    vis       fractional visibility of planet (if applicable)
    coh       coherence
    sigcoh    uncertainty of coherence
    csnr      continuum SNR of planet (if applicable)
    vflux     visibility flux of planet (if applicable)
    cnoise    continuum noise
    avedhrs   offset from reference time
    ampave    average wide band amplitude
    phaave    average wide band phase
    tpvar     total power stability
    blsid     baseline id (a1*256 + a2)
    itel1     antenna 1 code
    itel2     antenna 2 code
    iblcd     baseline code
    ble       baseline east vector (meters)
    bln       baseline north vector (meters)
    blu       baseline up vector (meters)
    soid      baseline solution id                                      
