;------------------------------------------------------------------ ;+ ; NAME: ; MEPOSRD ; PURPOSE: ; ; This program reads a file containing positions for ; magnetic field elemets measured from two BBSO polar ; VMG rectangular maps. ; CATEGORY: ; POLAR ; CALLING SEQUENCE: ; MEPOSRD,filnam,feanum,x1pos,y1pos,x2pos,y2pos ; CMAP,imname ; INPUTS: ; filnam = text file containing positions to read. This file ; contains four lines of header information (which ; is ignored) followed by data lines. Each data line ; consists of 5 integers (feature number, x pos in map 1, ; y pos in map1, x pos in map 2, y pos in map2) and ; a character string (which is ignored). ; KEYWORD PARAMETERS: ; OUTPUTS: ; feanum = 200 position vector with feature numbers ; x1pos = 200 position vector for the x position in map 1 ; y1pos = 200 position vector for the y position in map 1 ; x2pos = 200 position vector for the x position in map 2 ; y2pos = 200 position vector for the y position in map 2 ; COMMON BLOCKS: ; NOTES: ; MODIFICATION HISTORY: ; J. Varsik, 10 Jan. 1996 ;- ;------------------------------------------------------------------- pro meposrd,filnam,feanum,x1pos,y1pos,x2pos,y2pos ; make output vectors feanum = intarr(200) x1pos = feanum & x2pos = feanum & y1pos = feanum & y2pos = feanum openr,1,filnam ; read and skip header lines A = ' ' readf,1,A readf,1,A readf,1,A readf,1,A readf,1,A readf,1,A i = 0 & fn = 0 & x1p = 0 & y1p = 0 & x2p = 0 & y2p = 0 while (not EOF(1)) do begin readf,1,fn,x1p,y1p,x2p,y2p if x2p ne -999 then begin feanum(i) = fn x1pos(i) = x1p y1pos(i) = y1p x2pos(i) = x2p y2pos(i) = y2p if i lt 199 then i = i + 1 else stop,'file too big' endif endwhile feanum = feanum(0:i-1) x1pos = x1pos(0:i-1) y1pos = y1pos(0:i-1) x2pos = x2pos(0:i-1) y2pos = y2pos(0:i-1) return end