next up previous contents
Next: OASSP: 2-D Waveguide Reverberation Up: Output Files Previous: Output Files

   
Covariance Matrices

The covariance matrix is written to a binary, direct access file with a fixed record length of 8 bytes, identical to the format generated by OASN. The covariance matrices for the total field may be obtained by adding the ones generated for OASN and OASS using the utility addcov. The file will have the name input.xsm . The file is opened with the following statements:

C        *****  OPEN XSM FILE...Note that the logical unit 16 must 
C        be assigned a filename external to the program, 
C        in Unix: setenv FOR016 input.xsm
         LUN=16
         call getenv('FOR016',XSMFILE)
         OPEN  ( UNIT       = LUN
     -,          FILE       = XSMFILE
     -,          STATUS     = 'UNKNOWN'
     -,          FORM       = 'UNFORMATTED'
     -,          ACCESS     = 'DIRECT'
     -,          RECL       = 8         )

Note: This OPEN statement is used for machines where the fixed record length for unformatted files is given in bytes (e.g. Alliant FX-40). Some machines (e.g. DEC 5000 workstations) require the record lenth in words; in that case specify RECL = 2 .

The first 10 records of the xsm file contains the header, identifying the file in terms of title, number of sensors and frequency sampling. The header has been written with the following statements, with the parameters defined in Table 9:

C *** WRITE HEADER
         WRITE (LUN,REC=1) TITLE(1:8)
         WRITE (LUN,REC=2) TITLE(9:16)
         WRITE (LUN,REC=3) TITLE(17:24)
         WRITE (LUN,REC=4) TITLE(25:32)
         WRITE (LUN,REC=5) NRCV, NFREQ
c >>> Dummy integers IZERO
         WRITE (LUN,REC=6) IZERO, IZERO
         WRITE (LUN,REC=7) FREQ1, FREQ2
c >>> DELFRQ is the frequency increment (FREQ2 - FREQ1)/(NFREQ-1)
         WRITE (LUN,REC=8) DELFRQ, ZERO
c >>> The surface and white noise levels for info
         WRITE (LUN,REC=9) SSLEV,WNLEV
c >>> BLANK FILL NEXT RECORD FOR FUTURE USE
         WRITE (LUN,REC=10) ZERO,ZERO

OASS writes the covariance matrix columnwise using the following loop structure

         :
      COMPLEX COVMAT(NRCV,NRCV,NFREQ)
         :
         :
C >>> WRITE XSM
      DO 20 IFREQ=1,NFREQ
       DO 20 JRCV=1,NRCV
        DO 20 IRCV=1,NRCV
         IREC = 10 + IRCV + (JRCV-1)*NRCV + (IFREQ-1)*NRCV*NRCV
         WRITE (LUN,REC=IREC) COVMAT(IRCV,JRCV,IFREQ)
20    CONTINUE



henrik schmidt
1999-08-25