;+ ; NAME: ; ulysses_passage ; CALLING SEQUENCE: PRO ulysses_passage, module, rot, latitude=latitude, density=density ; INCLUDE: @compile_opt.pro ; On error, return to caller ;- InitVar, module, 2 IF !d.name EQ 'PS' THEN BEGIN !p.font = 1 device, set_font='times' ENDIF CASE module OF 0: BEGIN dir = filepath( root=getenv('TUB'), '') files = file_search(dir+'*.ul',count=nfiles) nn = 21 mean_diff = replicate( !values.f_nan, nn,nn) mean_diff2 = replicate( !values.f_nan, nn,nn) FOR pwr=0,nn-1 DO BEGIN FOR pwn=0,nn-1 DO BEGIN file = dir+string(pwn,format='(I2.2)')+string(pwr,format='(I2.2)')+'.ul' IF (where(file EQ files))[0] NE -1 THEN BEGIN IF readearthfile(file, tt_tomo, dd_tomo) THEN BEGIN ; The swoops data need to be read only once IF n_elements(tt_situ) EQ 0 THEN IF NOT $ InSituTimeseries('vel', tt_tomo, tt_situ, dd_situ, $ delt=0.75, from=instrument(/swoops)) THEN $ message, 'error reading swoops data' dd_tomo = dd_tomo[*,1] ; dd_tomo is the velocity from the tomography; dd_situ is the swoops velocity diff = dd_tomo-dd_situ mean_diff [pwn,pwr] = mean(diff , /nan) mean_diff2[pwn,pwr] = mean(diff*diff, /nan) ENDIF ENDIF ENDFOR ENDFOR whatis, mean_diff, sqrt(mean_diff2) bin_write, dir+'mean_diff.pph' , mean_diff bin_write, dir+'mean_diff2.pph', sqrt(mean_diff2) END 1: BEGIN dir = filepath( root=getenv('TUB'), '') stat = bin_read(dir+'mean_diff2.pph',a) stat = bin_read(dir+'mean_diff.pph' ,b) x = -1.0+0.1*indgen(n_elements(a[0,*])) pwn = 5 charsize = 2.25 tmp = min(a[pwn,*],pwrmin) plot, x, b[pwn,*], $ xtitle='!7b!X!Dr!N', ytitle='Velocity difference (km/s)', $ charsize=charsize oplot,x, a[pwn,*], linestyle=2 oplot, !x.crange,[0,0] oplot, x[pwrmin]*[1,1], !y.crange, linestyle=2 xl = 0.25+[0,0.1] yl = 0.85*[1,1] dx = 0.025 dy = 0.05 plots , /normal, xl, yl xyouts, /normal, xl[1]+dx, yl[0], 'mean difference',chars=charsize*0.9 yl = yl-dy plots , /normal, xl, yl, linestyle=2 xyouts, /normal, xl[1]+dx, yl[0], 'sqrt( mean square difference )', chars=charsize*0.9 END 2: BEGIN InitVar, latitude, /key InitVar, density , /key file = filepath( root=getenv('TUB'),'0315.ul1' ) stat = flt_read(file,a) n = 200 a = a[*,n:(size(a))[2]-1-n] yr = reform(a[0,*]) doy = reform(a[1,*]) hour = reform(a[2,*]) T = TimeSet(yr=yr,doy=doy,hour=hour) IF density THEN $ yy = 4.0*reform(a[7,*]) $ ELSE $ yy = reform(a[8,*]) bad = where( yy lt 0 ) IF bad[0] NE -1 THEN yy[bad] = BadValue(yy) delt = 3;.75 status = InSituTimeseries( ['vel','den','lat'], T, t_out, out, delt=delt, from=Instrument(/swoops)) help, out charsize = 2.5;1.75 ilat = 2 iyy = density yrange = ([[200,1000], [0,2]])[*,density] ytitle = (['velocity (km/s)','density'])[density] IF latitude THEN BEGIN xlat = reform(out[*,ilat]) plotcurve, xlat, reform(out[*,iyy]), $ xstyle=1, $ yrange=yrange, $ linestyle=2, charsize=charsize, $ ytitle=ytitle, $ xtitle='heliographic latitude (degrees)' plotcurve, xlat, yy, /oplot ENDIF ELSE BEGIN timeaxis , T, charsize=charsize*0.7 plotcurve, T, reform(out[*,iyy]), /oplot, /newyaxis, $ yrange=yrange, $ linestyle=2, charsize=charsize*0.9, ytitle=ytitle plotcurve, T, yy, /oplot ENDELSE END ENDCASE RETURN & END