PRO MMRD,IUN,IREC,F,G,DAS,time,GS ;Apr 30,86 KES ; Disk records are INTARR(1265) containing (Hdr,F,G) ;; edited Jul 13,2000 for error in Amanda's translation- kes ; ;Input IUN is input disk file unit number (ASSUME FILE IS OPEN) ;Input IREC is desried (ASSOC) record number ;Output DAS is a F.P. time value (Data Automation Subsystem) ;Output GS is an INTARR(4) set of values for the Gain State ; of the F-channel (from Fid. posns 65,66,67,68 - base 0) ; Gain state conversion (derived by CAB, post insertion): ; use the following Mult. factor for the GS value shown ; GS DN Mult.Factor ; 30 2154. ; 56 624.35 ; 81 185.25 ; 107 59.19 ; 137 20.48 ; 162 7.64 ; 187 2.81 ; 215 1.04 ; ;Output F is a BYTARR(600) containing the F-channel Fid & Data ;Output G is a BYTARR(600) containing the G-Channel Fid & Data ; Note: there are 5 spare words at the end of the data ; ; Records must be read from tape sequencially; each call to ; MMRD reads the next record on tape ; AA=ASSOC(IUN,INTARR(1265)) ;input file Associate A=AA(IREC) ;get desired record G=BYTARR(600) & F=G ;the output arrays IF EOF(IUN) LT 0 THEN GOTO,EOF ;return on EOF DAS=A(8)*4096.+A(9) ;DAS time ; print,das,format='(f12.2)' ; print,a(14:19) ; print,a(24:29) ; GS=EXTRACT(A,725,4) ;four GS values gs=a(725:728) ;9/21/99 Karen says use these ;& compare 726 with table value, ;making sure it is within 10. time=a(14:19) ; INSERT,G,EXTRACT(A,55,600),0 ;G-channel fid & data ; INSERT,F,EXTRACT(A,660,600),0 ;F-channel fid & data ;;7/00 g=a(128:655) ;;these are off by one ;;7/00 f=a(733:1260) ;; " g=a(127:654) ;; Jul,2000 - kes f=a(732:1259) ;; Jul,2000 - kes RETURN EOF: PRINT,' Desired rec is past EOF' RETURN END ; PRO MRD,IREC,F,G ;short Entry: assume OPEN on iun=1 MMRD,1,IREC,F,G,DAS,GS RETURN END