;+ ; NAME: ; Plot_velocity ; ; PURPOSE: ; To plot the g-level of each radio source observed and modeled ; ; USAGE: ; run ~soft/jackson/idl/Plot_velocity.pro ; ; NOTE: ; Put the following file in the temp directory Helios ; ; MODIFICATION HISTORY: ; Coded by B. Jackson (January 28, 2003) ;- ; ; Read data as string ; and separate into individual source time series. ; pro Plot_velocity, bmp24 if n_elements(bmp24) eq 0 then bmp24 =0 if bmp24 eq 1 then bmpdir = filepath(root=getenv('TUB'),'') ii = intarr(130,1400) ikey = intarr(130,1400) indata = strarr(130,1400) doy = fltarr(130,1400) obs = fltarr(130,1400) modv = fltarr(130,1400) title = strarr(130) ii = intarr(130) scrv = '0' file = 'D:/temp/vts1965_18.txt' j=-1 n=5 i=0 il=0 status = txt_read(file,data,nrec=nrec) print, 'nrec =',nrec whatis, data ;while n lt 200 and j lt 130 and i lt 300 do begin while n lt nrec-3 and j lt 130 and i lt 1399 do begin n = n+1 scrvL = scrv scrv=strmid(data(n),7,8) if i gt 1398 then print, 'Number of data point limit reached',scrv if scrv ne scrvL then begin j=j+1 i = -1 title(j) = scrv endif i = i+1 ii(j) = i indata(j,i) = strmid(data(n),0,89) doy(j,i) = float(strmid(data(n),17,7)) obs(j,i) = float(strmid(data(n),33,10)) modv(j,i) = float(strmid(data(n),43,10)) ikey(j,i) = fix(strmid(data(n),86,1)) print, j,i,' ',doy(j,i),obs(j,i),modv(j,i),ikey(j,i),indata(j,i) endwhile jj = j j = 0 while j le jj do begin minobs = min(obs(j,0:ii(j))) maxobs = max(obs(j,0:ii(j))) print, 'j = ', j for i=0,ii(j) do begin if ikey(j,i) eq 0 then modv(j,i) = 0 if ikey(j,i) eq 0 then print, i, ii(j), modv(j,i) if modv(j,i) gt maxobs then modv(j,i) = maxobs if modv(j,i) lt minobs then modv(j,i) = minobs endfor plot,doy(j,0:ii(j)),obs(j,0:ii(j)),chars=1.5,$ ;xrange=[fix(min(doy(j,0:ii(j)))/10.)*10.,fix(max(doy(j,0:ii(j)))/10.+1)*10.], $ xrange=[170,230], $ yrange=[fix(min(obs(j,0:ii(j)))/100.)*100.,fix(max(obs(j,0:ii(j)))/100.+1)*100.], $ yst=1,xst=1,$ xtitle='DOY (Radio Source: '+title(j)+')',$ ytitle='Velocity (km/s)' oplot,doy(j,0:ii(j)),modv(j,0:ii(j)), psym=4 if bmp24 eq 1 then begin image = tvrd() write_bmp, bmpdir+'source_comp000.bmp', 255-image if not do_file(/move, bmpdir+'source_comp000.bmp', $ bmpdir+'source_compare\'+strcompress(title(j),/rem)+'.bmp') $ then message,'error moving file' endif else begin Stop endelse j = j+1 endwhile end