pro obj_O_plot,state,opstart,oModel=oModel tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) otfile = tdir + 'o_tra_'+strmid(tfile,tpos+3,16)+'.dat' unito = 3 ON_IOERROR, bad_num1 openr,unito,otfile ;,/get_lun dum = ' ' readf,unito,dum readf,unito,dum timen = fltarr(6) readf,unito,timen readf,unito,dum readf,unito,dum freqo=fltarr(1000) virto=freqo i = 0 while (not eof(unito)) do begin readf,unito,val1,val2 freqo(i) = val1 virto(i) = val2 i = i + 1 endwhile close,unito freqo=freqo(0:i-1) virto=virto(0:i-1) tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) fmax=max(freqo) x2=10. if fmax gt 10.0 then x2=20. if opstart eq 0 then WIDGET_CONTROL,state.objtra.opfield(3),SET_VALUE=x2 widget_control,state.objtra.opfield(2),get_value=x1 widget_control,state.objtra.opfield(3),get_value=x2 widget_control,state.objtra.opfield(4),get_value=yy2 widget_control,state.objtra.opfield(5),get_value=yy1 ;--------------------------------------------------------------------------- xrange =[x1,x2] y1 = -yy2 y2 = -yy1 yrange = [y1,y2] virto= -virto oPlot_line = obj_new('IDLgrPlot',freqo,virto, $ xrange=[x1,x2],yrange=[y1,y2], $ color=[255,0,0],/hide ) oModel -> add, oPlot_line oPlot_line -> getproperty, xrange=xs, yrange=ys xs = norm_coord(xrange) ys = norm_coord(yrange) xs[0]=xs[0]-0.5 ys[0]=ys[0]-0.5 oPlot_line -> setproperty, xcoord_conv=xs, ycoord_conv=ys nx=n_elements(freqo) oTextxyo = objarr(nx) for n=0,nx-1 do begin if (freqo[n] ge x1) and (freqo[n] le x2) and $ (-virto[n] ge yy1) and (-virto[n] le yy2) then begin oTextxyo(n) = obj_new('IDLgrText','O', $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5,vertical_alignment=0.5, $ ; color=[255,0,0], $ color=[0,0,0], $ location=[freqo[n],virto[n]]) oModel -> add,oTextxyo(n) endif endfor xTitle = obj_new('IDLgrText','Frequency (MHz)', $ font=state.obj.oFont) xticklen = abs(xrange[1]-xrange[0])*0.025 yticklen = abs(yrange[1]-yrange[0])*0.05 oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=xrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, ticklen=yticklen, $ title=xTitle) oModel -> add,oxaxis oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=xrange,location=[xrange[0],yrange[1]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen= -yticklen) oModel -> add,oxaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen=xticklen ) oModel -> add,oyaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[1],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext ,ticklen = -xticklen) oModel -> add,oyaxis ; apparange = [ 3000, 2500, 2000, 1500, 1000, 500, 0 ] oyaxis -> getproperty, all=getyaxis yticks = getyaxis.major apparange = abs(getyaxis.tickvalues) labely1 = objarr(yticks) xleft1 = xrange[0] - (xrange[1]-xrange[0]) * 0.01 for i=0,yticks-1 do begin y=apparange[i] ylabel = string(format='(i4)',apparange[i]) labely1(i) = obj_new('IDLgrText', $ ylabel, $ location=[xleft1,-y], $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ font=state.obj.oFont, $ color=[0,0,0] ) endfor oModel -> Add,labely1 oYModel = obj_new('IDLgrModel') oYModel -> Rotate,[0,0,1],90 xleft2 = xrange[1] + (xrange[1]-xrange[0]) * 0.1 ycenter = yrange[1] + (yrange[0]-yrange[1]) * 0.5 Col1Text = obj_new('IDLgrText', $ 'Virtual Range (km)', $ location=[ycenter,xleft2], $ xcoord_conv=ys,ycoord_conv=xs, $ alignment=0.5, $ font=state.obj.oFont, $ color=[0,0,0]) oYModel -> Add,Col1Text oModel -> Add, oYModel ;---------------------------------------------------------------- tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) osfile = tdir + 'o_scal_'+strmid(tfile,tpos+3,16)+'.dat' unito = 3 openr,unito,osfile ;,/get_lun dum = ' ' readf,unito,dum readf,unito,dum timen = fltarr(6) readf,unito,timen readf,unito,dum readf,unito,dum freqo=fltarr(1000) virto=freqo i = 0 while (not eof(unito)) do begin readf,unito,val1,val2,val3,val4,val5 freqo(i) = val2 virto(i) = val1 i = i + 1 endwhile close,unito freqo=freqo(0:i-1) virto=virto(0:i-1) virto = -virto nx=n_elements(freqo) oTextxyq = objarr(nx) for n=0,nx-1 do begin if (freqo[n] ge x1) and (freqo[n] le x2) and $ (-virto[n] ge yy1) and (-virto[n] le yy2) then begin ; oTextxyq(n) = obj_new('IDLgrText','O', $ oTextxyq(n) = obj_new('IDLgrText','*', $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5,vertical_alignment=0.5, $ ; color=[0,0,255], $ color=[0,0,0], $ location=[freqo[n],virto[n]]) oModel -> add,oTextxyq(n) endif endfor xtraces = state.tra.tracex xcount = state.tra.ntracex xxt1=xtraces[0:xcount,1] xxt2=xtraces[0:xcount,0] xxt2 = -xxt2 nx=n_elements(xxt1) oTextxyx = objarr(nx) for n=0,nx-1 do begin if (xxt1[n] ge x1) and (xxt1[n] le x2) and $ (-xxt2[n] ge yy1) and (-xxt2[n] le yy2) then begin oTextxyx(n) = obj_new('IDLgrText','X', $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5,vertical_alignment=0.5, $ color=[0,0,0], $ location=[xxt1[n],xxt2[n]]) oModel -> add,oTextxyx(n) endif endfor tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) oFont = obj_new('IDLgrFont', $ 'Helvetica*Bold', $ size=12 ) wmapfile = tdir + 'wmap_'+strmid(tfile,tpos+3,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap wmapline = state.worldmap.line1 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 ybelow0 = yrange[0] - (yrange[1]-yrange[0]) * 0.2 ybelow1 = yrange[0] - (yrange[1]-yrange[0]) * 0.3 ybelow2 = yrange[0] - (yrange[1]-yrange[0]) * 0.36 ytop = yrange[1] + (yrange[1]-yrange[0]) * 0.01 oTextmap = obj_new('IDLgrText',wmapline, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow1]) oModel -> add,oTextmap sun=' ' readf,unitw,format= $ '(i3,i4,i3,i2,1x,i2,i5,f7.2,2f8.2,i5,f7.2,f8.2,f7.2,f6.3,2i4,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l wmapvalue = string(format= $ '(i3,i4,i3,i2,":",i2,i6,f8.2,2f9.2,i6,3f10.2,f8.3,2i5,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l) oTextmap = obj_new('IDLgrText',wmapvalue, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow2]) oModel -> add,oTextmap close,unitw ; xcalx1 = 'O = O-SCALED' xcalx1 = '* = O-SCALED' xcalx2 = 'O = O-CALC' xcalx3 = 'X = X-SCALED' xcent1 = xrange[0] + (xrange[1]-xrange[0]) * 0.20 oTextmap = obj_new('IDLgrText',xcalx1, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ ; color=[0,0,255], $ color=[0,0,0], $ location=[xcent1,ybelow0]) oModel -> add,oTextmap xcent2 = xrange[0] + (xrange[1]-xrange[0]) * 0.5 oTextmap = obj_new('IDLgrText',xcalx2, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ ; color=[255,0,0], $ color=[0,0,0], $ location=[xcent2,ybelow0]) oModel -> add,oTextmap xcent3 = xrange[0] + (xrange[1]-xrange[0]) * 0.80 oTextmap = obj_new('IDLgrText',xcalx3, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent3,ybelow0]) oModel -> add,oTextmap xleft = xrange[0] + (xrange[1]-xrange[0]) * 0.01 ttra1 = strupcase(strmid(ttra,0,2))+'_' + $ strupcase(strmid(ttra,2,3))+'_' + $ strmid(ttra,5,2)+'_' + strmid(ttra,7,3)+'_' + $ strmid(ttra,10,6)+'_'+strmid(ttra,16,2) oTextmap = obj_new('IDLgrText',ttra1, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.0, $ color=[0,0,0], $ location=[xleft,ytop]) oModel -> add,oTextmap iicode = state.tra.iicode ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin oTextmap = obj_new('IDLgrText',tcode, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ color=[0,0,0], $ location=[xrange[1],ytop]) oModel -> add,oTextmap endif ; xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num1: close,unito return end pro obj_Ne_plot,state,nestart,oModel=oModel tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) nefile = tdir + 'ne_prof_'+strmid(tfile,tpos+3,16)+'.dat' unitn = 3 ON_IOERROR, bad_num2 openr,unitn,nefile ;,/get_lun dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn nep=nep(0:i-1) altn=altn(0:i-1) tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) widget_control,state.objtra.nefield(2),get_value=x1 widget_control,state.objtra.nefield(3),get_value=x2 widget_control,state.objtra.nefield(4),get_value=y1 widget_control,state.objtra.nefield(5),get_value=y2 ;--------------------------------------------------------------------------- alogxrange = [x1,x2] x1=alog10(x1) x2=alog10(x2) nep = alog10(nep) xrange = [x1,x2] yrange = [y1,y2] oPlot_line = obj_new('IDLgrPlot',nep,altn, $ xrange=[x1,x2],yrange=[y1,y2], $ color=[255,0,0] ) oModel -> add, oPlot_line oPlot_line -> getproperty, xrange=xs, yrange=ys xs = norm_coord(xrange) ys = norm_coord(yrange) xs[0]=xs[0]-0.5 ys[0]=ys[0]-0.5 oPlot_line -> setproperty, xcoord_conv=xs, ycoord_conv=ys xTitle = obj_new('IDLgrText','Ne', $ font=state.obj.oFont) xticklen = abs(xrange[1]-xrange[0])*0.025 yticklen = abs(yrange[1]-yrange[0])*0.05 oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=alogxrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, ticklen=yticklen, /log, $ title=xTitle) oModel -> add,oxaxis oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=alogxrange,location=[xrange[0],yrange[1]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen= -yticklen , /log) oModel -> add,oxaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen=xticklen ) oModel -> add,oyaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[1],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext ,ticklen = -xticklen) oModel -> add,oyaxis oyaxis -> getproperty, all=getyaxis yticks = getyaxis.major apparange = abs(getyaxis.tickvalues) labely1 = objarr(yticks) xleft1 = xrange[0] - (xrange[1]-xrange[0]) * 0.01 for i=0,yticks-1 do begin y=apparange[i] ylabel = string(format='(i4)',apparange[i]) labely1(i) = obj_new('IDLgrText', $ ylabel, $ location=[xleft1,y], $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ font=state.obj.oFont, $ color=[0,0,0] ) endfor oModel -> Add,labely1 oYModel = obj_new('IDLgrModel') oYModel -> Rotate,[0,0,1],90 xleft2 = xrange[1] + (xrange[1]-xrange[0]) * 0.1 ycenter = yrange[0] + (yrange[1]-yrange[0]) * 0.5 Col1Text = obj_new('IDLgrText', $ 'Altitude (km)', $ location=[ycenter,xleft2], $ xcoord_conv=ys,ycoord_conv=xs, $ alignment=0.5, $ font=state.obj.oFont, $ color=[0,0,0]) oYModel -> Add,Col1Text oModel -> Add, oYModel ;---------------------------------------------------------------- tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) oFont = obj_new('IDLgrFont', $ 'Helvetica*Bold', $ size=12 ) wmapfile = tdir + 'wmap_'+strmid(tfile,tpos+3,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap wmapline = state.worldmap.line1 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 ybelow0 = yrange[0] - (yrange[1]-yrange[0]) * 0.2 ybelow1 = yrange[0] - (yrange[1]-yrange[0]) * 0.3 ybelow2 = yrange[0] - (yrange[1]-yrange[0]) * 0.36 ytop = yrange[1] + (yrange[1]-yrange[0]) * 0.01 oTextmap = obj_new('IDLgrText',wmapline, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow1]) oModel -> add,oTextmap sun=' ' readf,unitw,format= $ '(i3,i4,i3,i2,1x,i2,i5,f7.2,2f8.2,i5,f7.2,f8.2,f7.2,f6.3,2i4,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l wmapvalue = string(format= $ '(i3,i4,i3,i2,":",i2,i6,f8.2,2f9.2,i6,3f10.2,f8.3,2i5,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l) oTextmap = obj_new('IDLgrText',wmapvalue, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow2]) oModel -> add,oTextmap close,unitw xleft = xrange[0] + (xrange[1]-xrange[0]) * 0.01 ttra1 = strupcase(strmid(ttra,0,2))+'_' + $ strupcase(strmid(ttra,2,3))+'_' + $ strmid(ttra,5,2)+'_' + strmid(ttra,7,3)+'_' + $ strmid(ttra,10,6)+'_'+strmid(ttra,16,2) oTextmap = obj_new('IDLgrText',ttra1, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.0, $ color=[0,0,0], $ location=[xleft,ytop]) oModel -> add,oTextmap ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. iicode = state.tra.iicode tcode='tcode' if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin ; xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 oTextmap = obj_new('IDLgrText',tcode, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ color=[0,0,0], $ location=[xrange[1],ytop]) oModel -> add,oTextmap endif ; xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num2: close,unitn return end pro obj_Fn_plot,state,fnstart,oModel=oModel tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) fnfile = tdir + 'plas_fr_'+strmid(tfile,tpos+3,16)+'.dat' unitn = 3 ON_IOERROR,bad_num3 openr,unitn,fnfile ;,/get_lun dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum mhzn=fltarr(1000) altn=mhzn i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 mhzn(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn mhzn=mhzn(0:i-1) altn=altn(0:i-1) tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) x2=10.0 if max(mhzn) gt 10.0 then x2=20.0 if fnstart eq 0 then WIDGET_CONTROL,state.objtra.fnfield(3),SET_VALUE=x2 widget_control,state.objtra.fnfield(2),get_value=x1 widget_control,state.objtra.fnfield(3),get_value=x2 widget_control,state.objtra.fnfield(4),get_value=y1 widget_control,state.objtra.fnfield(5),get_value=y2 ;--------------------------------------------------------------------------- xrange = [x1,x2] yrange = [y1,y2] oPlot_line = obj_new('IDLgrPlot',mhzn,altn, $ xrange=[x1,x2],yrange=[y1,y2], $ color=[255,0,0] ) oModel -> add, oPlot_line oPlot_line -> getproperty, xrange=xs, yrange=ys xs = norm_coord(xrange) ys = norm_coord(yrange) xs[0]=xs[0]-0.5 ys[0]=ys[0]-0.5 oPlot_line -> setproperty, xcoord_conv=xs, ycoord_conv=ys xTitle = obj_new('IDLgrText','Plasma Frequency (MHz)', $ font=state.obj.oFont) xticklen = abs(xrange[1]-xrange[0])*0.025 yticklen = abs(yrange[1]-yrange[0])*0.05 oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=xrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, ticklen=yticklen, $ title=xTitle) oModel -> add,oxaxis oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=xrange,location=[xrange[0],yrange[1]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen= -yticklen ) oModel -> add,oxaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen=xticklen ) oModel -> add,oyaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[1],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext ,ticklen = -xticklen) oModel -> add,oyaxis oyaxis -> getproperty, all=getyaxis yticks = getyaxis.major apparange = abs(getyaxis.tickvalues) labely1 = objarr(yticks) xleft1 = xrange[0] - (xrange[1]-xrange[0]) * 0.01 for i=0,yticks-1 do begin y=apparange[i] ylabel = string(format='(i4)',apparange[i]) labely1(i) = obj_new('IDLgrText', $ ylabel, $ location=[xleft1,y], $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ font=state.obj.oFont, $ color=[0,0,0] ) endfor oModel -> Add,labely1 oYModel = obj_new('IDLgrModel') oYModel -> Rotate,[0,0,1],90 xleft2 = xrange[1] + (xrange[1]-xrange[0]) * 0.1 ycenter = yrange[0] + (yrange[1]-yrange[0]) * 0.5 Col1Text = obj_new('IDLgrText', $ 'Altitude (km)', $ location=[ycenter,xleft2], $ xcoord_conv=ys,ycoord_conv=xs, $ alignment=0.5, $ font=state.obj.oFont, $ color=[0,0,0]) oYModel -> Add,Col1Text oModel -> Add, oYModel ;---------------------------------------------------------------- tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) oFont = obj_new('IDLgrFont', $ 'Helvetica*Bold', $ size=12 ) wmapfile = tdir + 'wmap_'+strmid(tfile,tpos+3,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap wmapline = state.worldmap.line1 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 ybelow0 = yrange[0] - (yrange[1]-yrange[0]) * 0.2 ybelow1 = yrange[0] - (yrange[1]-yrange[0]) * 0.3 ybelow2 = yrange[0] - (yrange[1]-yrange[0]) * 0.36 ytop = yrange[1] + (yrange[1]-yrange[0]) * 0.01 oTextmap = obj_new('IDLgrText',wmapline, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow1]) oModel -> add,oTextmap sun=' ' readf,unitw,format= $ '(i3,i4,i3,i2,1x,i2,i5,f7.2,2f8.2,i5,f7.2,f8.2,f7.2,f6.3,2i4,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l wmapvalue = string(format= $ '(i3,i4,i3,i2,":",i2,i6,f8.2,2f9.2,i6,3f10.2,f8.3,2i5,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l) oTextmap = obj_new('IDLgrText',wmapvalue, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow2]) oModel -> add,oTextmap close,unitw xleft = xrange[0] + (xrange[1]-xrange[0]) * 0.01 ttra1 = strupcase(strmid(ttra,0,2))+'_' + $ strupcase(strmid(ttra,2,3))+'_' + $ strmid(ttra,5,2)+'_' + strmid(ttra,7,3)+'_' + $ strmid(ttra,10,6)+'_'+strmid(ttra,16,2) oTextmap = obj_new('IDLgrText',ttra1, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.0, $ color=[0,0,0], $ location=[xleft,ytop]) oModel -> add,oTextmap ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. iicode = state.tra.iicode tcode='tcode' if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin ; xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 oTextmap = obj_new('IDLgrText',tcode, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ color=[0,0,0], $ location=[xrange[1],ytop]) oModel -> add,oTextmap endif ; xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num3: close,unitn return end pro obj_Ne3_plot,state,nestart,oModel=oModel infile_ne = state.objtra.infile_ne widget_control,state.objtra.ne3field(2),get_value=x1 widget_control,state.objtra.ne3field(3),get_value=x2 widget_control,state.objtra.ne3field(4),get_value=y1 widget_control,state.objtra.ne3field(5),get_value=y2 alogxrange = [x1,x2] x1=alog10(x1) x2=alog10(x2) xrange = [x1,x2] yrange = [y1,y2] oPlot_line=objarr(3) ;--------------------------------------------------------------------------- for m =0,2 do begin unitn = 3 ON_IOERROR, bad_num4 openr,unitn,infile_ne(m) ;,/get_lun dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn nep=nep(0:i-1) altn=altn(0:i-1) nep = alog10(nep) oPlot_line(m) = obj_new('IDLgrPlot',nep,altn, $ xrange=[x1,x2],yrange=[y1,y2] ) if m eq 0 then oPlot_line(m) -> setproperty,color=[255,0,0] if m eq 1 then oPlot_line(m) -> setproperty,color=[0,125,125] if m eq 2 then oPlot_line(m) -> setproperty,color=[0,0,255] oModel -> add, oPlot_line(m) oPlot_line(m) -> getproperty, xrange=xs, yrange=ys xs = norm_coord(xrange) ys = norm_coord(yrange) xs[0]=xs[0]-0.5 ys[0]=ys[0]-0.5 oPlot_line(m) -> setproperty, xcoord_conv=xs, ycoord_conv=ys endfor ;--------------------------------------------------------------------------- xTitle = obj_new('IDLgrText','Ne', $ font=state.obj.oFont) xticklen = abs(xrange[1]-xrange[0])*0.025 yticklen = abs(yrange[1]-yrange[0])*0.05 oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=alogxrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, ticklen=yticklen, /log, $ title=xTitle) oModel -> add,oxaxis oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=alogxrange,location=[xrange[0],yrange[1]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen= -yticklen , /log) oModel -> add,oxaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen=xticklen ) oModel -> add,oyaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[1],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext ,ticklen = -xticklen) oModel -> add,oyaxis oyaxis -> getproperty, all=getyaxis yticks = getyaxis.major apparange = abs(getyaxis.tickvalues) labely1 = objarr(yticks) xleft1 = xrange[0] - (xrange[1]-xrange[0]) * 0.01 for i=0,yticks-1 do begin y=apparange[i] ylabel = string(format='(i4)',apparange[i]) labely1(i) = obj_new('IDLgrText', $ ylabel, $ location=[xleft1,y], $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ font=state.obj.oFont, $ color=[0,0,0] ) endfor oModel -> Add,labely1 oYModel = obj_new('IDLgrModel') oYModel -> Rotate,[0,0,1],90 xleft2 = xrange[1] + (xrange[1]-xrange[0]) * 0.1 ycenter = yrange[0] + (yrange[1]-yrange[0]) * 0.5 Col1Text = obj_new('IDLgrText', $ 'Altitude (km)', $ location=[ycenter,xleft2], $ xcoord_conv=ys,ycoord_conv=xs, $ alignment=0.5, $ font=state.obj.oFont, $ color=[0,0,0]) oYModel -> Add,Col1Text oModel -> Add, oYModel ;---------------------------------------------------------------- tpos=rstrpos(infile_ne(1),'/') tdir=strmid(infile_ne(1),0,tpos+1) oFont = obj_new('IDLgrFont', $ 'Helvetica*Bold', $ size=12 ) wmapfile = tdir + 'wmap_'+strmid(infile_ne(1),tpos+9,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap wmapline = state.worldmap.line1 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 ybelow0 = yrange[0] - (yrange[1]-yrange[0]) * 0.2 ybelow1 = yrange[0] - (yrange[1]-yrange[0]) * 0.3 ybelow2 = yrange[0] - (yrange[1]-yrange[0]) * 0.36 ytop = yrange[1] + (yrange[1]-yrange[0]) * 0.01 oTextmap = obj_new('IDLgrText',wmapline, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow1]) oModel -> add,oTextmap sun=' ' readf,unitw,format= $ '(i3,i4,i3,i2,1x,i2,i5,f7.2,2f8.2,i5,f7.2,f8.2,f7.2,f6.3,2i4,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l wmapvalue = string(format= $ '(i3,i4,i3,i2,":",i2,i6,f8.2,2f9.2,i6,3f10.2,f8.3,2i5,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l) oTextmap = obj_new('IDLgrText',wmapvalue, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow2]) oModel -> add,oTextmap close,unitw xleft = xrange[0] + (xrange[1]-xrange[0]) * 0.2 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 xright = xrange[0] + (xrange[1]-xrange[0]) * 0.8 ttra = strmid(infile_ne(0),tpos+9,16) oTextmap = obj_new('IDLgrText',ttra, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[255,0,0], $ location=[xleft,ybelow0]) oModel -> add,oTextmap ttra = strmid(infile_ne(1),tpos+9,16) oTextmap = obj_new('IDLgrText',ttra, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,125,125], $ location=[xcent,ybelow0]) oModel -> add,oTextmap ttra = strmid(infile_ne(2),tpos+9,16) oTextmap = obj_new('IDLgrText',ttra, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,255], $ location=[xright,ybelow0]) oModel -> add,oTextmap ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. iicode = state.tra.iicode tcode='tcode' if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin ; xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 oTextmap = obj_new('IDLgrText',tcode, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ color=[0,0,0], $ location=[xrange[1],ytop]) oModel -> add,oTextmap endif ; xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num4: close,unitn return end ;---------------------------------------------------------------------- pro obj_Nem_plot,state,nestart,oModel=oModel infile_nem = state.objtra.infile_nem widget_control,state.objtra.nemfield(2),get_value=x1 widget_control,state.objtra.nemfield(3),get_value=x2 widget_control,state.objtra.nemfield(4),get_value=y1 widget_control,state.objtra.nemfield(5),get_value=y2 alogxrange = [x1,x2] x1=alog10(x1) x2=alog10(x2) xrange = [x1,x2] yrange = [y1,y2] ;------------------------------------ nemfiles = state.objtra.nemfiles oPlot_line=objarr(nemfiles) for m =0,nemfiles-1 do begin unitn = 3 ON_IOERROR,bad_num5 openr,unitn,infile_nem(m) ;,/get_lun dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn nep=nep(0:i-1) altn=altn(0:i-1) nep = alog10(nep) oPlot_line(m) = obj_new('IDLgrPlot',nep,altn, $ xrange=[x1,x2],yrange=[y1,y2] ) oPlot_line(m) -> setproperty,color=[255,0,0] ; if m eq 0 then oPlot_line(m) -> setproperty,color=[255,0,0] ; if m eq 1 then oPlot_line(m) -> setproperty,color=[0,125,125] ; if m eq 2 then oPlot_line(m) -> setproperty,color=[0,0,255] oModel -> add, oPlot_line(m) oPlot_line(m) -> getproperty, xrange=xs, yrange=ys xs = norm_coord(xrange) ys = norm_coord(yrange) xs[0]=xs[0]-0.5 ys[0]=ys[0]-0.5 oPlot_line(m) -> setproperty, xcoord_conv=xs, ycoord_conv=ys endfor ;----------------------------------------- xTitle = obj_new('IDLgrText','Ne', $ font=state.obj.oFont) xticklen = abs(xrange[1]-xrange[0])*0.025 yticklen = abs(yrange[1]-yrange[0])*0.05 oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=alogxrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, ticklen=yticklen, /log, $ title=xTitle) oModel -> add,oxaxis oxaxis = obj_new('IDLgrAxis', direction=0, color=[0,0,0], $ range=alogxrange,location=[xrange[0],yrange[1]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen= -yticklen , /log) oModel -> add,oxaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[0],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext, ticklen=xticklen ) oModel -> add,oyaxis oyaxis = obj_new('IDLgrAxis', direction=1, color=[0,0,0], $ range=yrange,location=[xrange[1],yrange[0]], $ xcoord_conv=xs,ycoord_conv=ys, $ /exact, /notext ,ticklen = -xticklen) oModel -> add,oyaxis oyaxis -> getproperty, all=getyaxis yticks = getyaxis.major apparange = abs(getyaxis.tickvalues) labely1 = objarr(yticks) xleft1 = xrange[0] - (xrange[1]-xrange[0]) * 0.01 for i=0,yticks-1 do begin y=apparange[i] ylabel = string(format='(i4)',apparange[i]) labely1(i) = obj_new('IDLgrText', $ ylabel, $ location=[xleft1,y], $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ font=state.obj.oFont, $ color=[0,0,0] ) endfor oModel -> Add,labely1 oYModel = obj_new('IDLgrModel') oYModel -> Rotate,[0,0,1],90 xleft2 = xrange[1] + (xrange[1]-xrange[0]) * 0.1 ycenter = yrange[0] + (yrange[1]-yrange[0]) * 0.5 Col1Text = obj_new('IDLgrText', $ 'Altitude (km)', $ location=[ycenter,xleft2], $ xcoord_conv=ys,ycoord_conv=xs, $ alignment=0.5, $ font=state.obj.oFont, $ color=[0,0,0]) oYModel -> Add,Col1Text oModel -> Add, oYModel ;---------------------------------------------------------------- tpos=rstrpos(infile_nem(0),'/') tdir=strmid(infile_nem(0),0,tpos+1) oFont = obj_new('IDLgrFont', $ 'Helvetica*Bold', $ size=12 ) wmapfile = tdir + 'wmap_'+strmid(infile_nem(0),tpos+9,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap wmapline = state.worldmap.line1 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 ybelow0 = yrange[0] - (yrange[1]-yrange[0]) * 0.2 ybelow1 = yrange[0] - (yrange[1]-yrange[0]) * 0.3 ybelow2 = yrange[0] - (yrange[1]-yrange[0]) * 0.36 ytop = yrange[1] + (yrange[1]-yrange[0]) * 0.01 oTextmap = obj_new('IDLgrText',wmapline, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow1]) oModel -> add,oTextmap sun=' ' readf,unitw,format= $ '(i3,i4,i3,i2,1x,i2,i5,f7.2,2f8.2,i5,f7.2,f8.2,f7.2,f6.3,2i4,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l wmapvalue = string(format= $ '(i3,i4,i3,i2,":",i2,i6,f8.2,2f9.2,i6,3f10.2,f8.3,2i5,a4,f8.2)', $ year,day,hour,minu,sec,lmt,lat,long,hgt,gmltm,gmlat,gmlong, $ invlat,fh,dip,chi,sun,l) oTextmap = obj_new('IDLgrText',wmapvalue, $ font=oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[0,0,0], $ location=[xcent,ybelow2]) oModel -> add,oTextmap close,unitw xleft = xrange[0] + (xrange[1]-xrange[0]) * 0.2 xcent = xrange[0] + (xrange[1]-xrange[0]) * 0.5 xright = xrange[0] + (xrange[1]-xrange[0]) * 0.8 ttra = strmid(infile_nem(0),tpos+9,16) + ' ->' oTextmap = obj_new('IDLgrText',ttra, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[255,0,0], $ location=[xleft,ybelow0]) oModel -> add,oTextmap ttra = strmid(infile_nem(nemfiles-1),tpos+9,16) oTextmap = obj_new('IDLgrText',ttra, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=0.5, $ color=[255,0,0], $ location=[xcent,ybelow0]) oModel -> add,oTextmap ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. iicode = state.tra.iicode tcode='tcode' if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin ; xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 oTextmap = obj_new('IDLgrText',tcode, $ font=state.obj.oFont, $ xcoord_conv=xs,ycoord_conv=ys, $ alignment=1.0, $ color=[0,0,0], $ location=[xrange[1],ytop]) oModel -> add,oTextmap endif ; xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num5: close,unitn return end pro print_O_plot,psfile,state,status print,'print o_plot' print,psfile orig_device = !d.name set_plot,'ps' ;device,/inches,xoffset=0.5,yoffset=0.0, $ ; xsize=8.5,ysize=11.0,filename=psfile device,/inches,xoffset=1.0,yoffset=10.25, $ xsize=11.0,ysize=7.0, /landscape, $ filename=psfile if status eq 0 then O_plot,state,1 if status eq 1 then O_plot,state,2 device,/close set_plot,orig_device return end pro print_Ne_plot,psfile,state,status print,'print ne_plot' print,psfile orig_device = !d.name set_plot,'ps' ; device,/inches,xoffset=0.5,yoffset=0.0, $ ; xsize=8.5,ysize=11.0,filename=psfile device,/inches,xoffset=1.0,yoffset=10.25, $ xsize=11.0,ysize=7.0, /landscape, $ filename=psfile if status eq 0 then Ne_plot,state,1 if status eq 1 then Ne_plot,state,2 device,/close set_plot,orig_device return end pro print_Ne3_plot,psfile,state,status print,'print ne3_plot' print,psfile orig_device = !d.name set_plot,'ps' device,/inches,xoffset=0.0,yoffset=0.0, $ xsize=8.5,ysize=11.0, $ scale_factor=0.8, $ filename=psfile ; device,/inches,xoffset=1.0,yoffset=10.25, $ ; xsize=11.0,ysize=7.0, /landscape, $ ; scale_factor=0.6, $ ; filename=psfile if status eq 0 then Ne3_plot,state,1 if status eq 1 then Ne3_plot,state,2 device,/close set_plot,orig_device return end pro print_Nem_plot,psfile,state,status print,'print mult-ne_plot' print,psfile orig_device = !d.name set_plot,'ps' device,/inches,xoffset=0.0,yoffset=0.0, $ xsize=8.5,ysize=11.0, $ scale_factor=0.8, $ filename=psfile ; device,/inches,xoffset=1.0,yoffset=10.25, $ ; xsize=11.0,ysize=7.0, /landscape, $ ; scale_factor=0.6, $ ; filename=psfile if status eq 0 then Nem_plot,state,1 if status eq 1 then Nem_plot,state,2 device,/close set_plot,orig_device return end pro print_Fn_plot,psfile,state,status print,'print fn_plot' print,psfile orig_device = !d.name set_plot,'ps' ; device,/inches,xoffset=0.5,yoffset=0.0, $ ; xsize=8.5,ysize=11.0,filename=psfile device,/inches,xoffset=1.0,yoffset=10.25, $ xsize=11.0,ysize=7.0, /landscape, $ filename=psfile if status eq 0 then Fn_plot,state,1 if status eq 1 then Fn_plot,state,2 device,/close set_plot,orig_device return end pro oplot_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'OPCLOSE': begin ; print,'oplot close' widget_control,event.top,/destroy endcase 'OPPRINTPS' : begin WIDGET_CONTROL,state.tra.opfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.tra.opfield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_O_plot,psfile,state,0 endcase 'OPPRINTGIF' : begin WIDGET_CONTROL,state.tra.opfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.tra.opfield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile WIDGET_CONTROL,state.tra.oplotdraw(1), GET_VALUE=windw wset,windw write_gif,gifile,tvrd() endcase 'OPRESIZE' : begin WIDGET_CONTROL,state.tra.oplotdraw(1), GET_VALUE=windw wset,windw O_plot,state,1 endcase else: endcase end pro neplt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'NECLOSE': begin ;print,'ne-plot close' widget_control,event.top,/destroy endcase 'NEPRINTPS' : begin WIDGET_CONTROL,state.tra.nefield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.tra.nefield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Ne_plot,psfile,state,0 endcase 'NEPRINTGIF' : begin WIDGET_CONTROL,state.tra.nefield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.tra.nefield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile WIDGET_CONTROL,state.tra.nepltdraw(1), GET_VALUE=windw wset,windw write_gif,gifile,tvrd() endcase 'NERESIZE' : begin WIDGET_CONTROL,state.tra.nepltdraw(1), GET_VALUE=windw wset,windw Ne_plot,state,1 endcase else: endcase end pro fnplt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'FNCLOSE' : begin ;print,'fn-plot close' widget_control,event.top,/destroy endcase 'FNPRINTPS' : begin WIDGET_CONTROL,state.tra.fnfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.tra.fnfield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Fn_plot,psfile,state,0 endcase 'FNPRINTGIF' : begin WIDGET_CONTROL,state.tra.fnfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.tra.fnfield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile WIDGET_CONTROL,state.tra.fnpltdraw(1), GET_VALUE=windw wset,windw write_gif,gifile,tvrd() endcase 'FNRESIZE' : begin WIDGET_CONTROL,state.tra.fnpltdraw(1), GET_VALUE=windw wset,windw Fn_plot,state,1 endcase else: endcase end pro ne3plt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'NE3CLOSE' : begin ;print,'3-ne plot close' widget_control,event.top,/destroy endcase 'NE3PRINTPS' : begin WIDGET_CONTROL,state.tra.ne3field(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.tra.ne3field(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Ne3_plot,psfile,state,0 endcase 'NE3PRINTGIF' : begin WIDGET_CONTROL,state.tra.ne3field(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.tra.ne3field(1),set_value=gifile widget_control,state.lasttext,set_value=gifile WIDGET_CONTROL,state.tra.ne3pltdraw(1), GET_VALUE=windw wset,windw write_gif,gifile,tvrd() endcase 'NE3RESIZE' : begin WIDGET_CONTROL,state.tra.ne3pltdraw(1), GET_VALUE=windw wset,windw Ne3_plot,state,0 endcase else: endcase end pro nemplt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'NEmCLOSE' : begin ;print,'mult-ne plot close' widget_control,event.top,/destroy endcase 'NEmPRINTPS' : begin WIDGET_CONTROL,state.tra.nemfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.tra.nemfield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Nem_plot,psfile,state endcase 'NEmPRINTGIF' : begin WIDGET_CONTROL,state.tra.nemfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.tra.nemfield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile WIDGET_CONTROL,state.tra.nempltdraw(1), GET_VALUE=windw wset,windw write_gif,gifile,tvrd() endcase 'NEmRESIZE' : begin WIDGET_CONTROL, state.tra.nempltdraw(1), GET_VALUE=windw wset,windw Nem_plot,state,0 endcase else: endcase end pro obj_oplot_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'OPCLOSE': begin ;print,'oplot close' widget_control,event.top,/destroy endcase 'OPPRINTPS' : begin WIDGET_CONTROL,state.objtra.opfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.objtra.opfield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_O_plot,psfile,state,1 endcase 'OPPRINTGIF' : begin WIDGET_CONTROL,state.objtra.opfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.objtra.opfield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile ; create a buffer object to render the image in true color oBuffer = obj_new('IDLgrBuffer', dim=[1000,500]) ; render the graphics to the buffer object oBuffer -> draw, state.objtra.oViewTrace ; get a screen shot from the buffer object oScreenImage = oBuffer -> read() ; grab the data from the image object oScreenImage -> getproperty, data=img inf = size(img) ; destroy the buffer object obj_destroy, oBuffer if inf[0] eq 2 then begin write_gif, gifile, img endif else if inf[0] eq 3 then begin img = color_quan(img,1,r,g,b,color=256) write_gif, gifile, img, r,g,b endif endcase 'OPRESIZE' : begin ; retrieve the object window ID from the draw area ID widget_control,state.objtra.oplotdraw(1), $ get_value=oWindow state.objtra.oViewTrace-> remove,state.objtra.oModelTrace state.objtra.oModelTrace = obj_new('IDLgrModel') state.objtra.oViewTrace -> add,state.objtra.oModelTrace obj_O_plot,state,1,oModel=state.objtra.oModelTrace oWindow -> Draw,state.objtra.oViewTrace iicode = state.tra.iicode widget_control,state.objtra.oplotbase(iicode), $ set_uvalue = state endcase else: endcase end pro obj_neplt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'NECLOSE': begin ;print,'ne_plot close' widget_control,event.top,/destroy endcase 'NEPRINTPS' : begin WIDGET_CONTROL,state.objtra.nefield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.objtra.nefield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Ne_plot,psfile,state,1 endcase 'NEPRINTGIF' : begin WIDGET_CONTROL,state.objtra.nefield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.objtra.nefield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile ; create a buffer object to render the image in true color oBuffer = obj_new('IDLgrBuffer', dim=[1000,500]) ; render the graphics to the buffer object oBuffer -> draw, state.objtra.oViewNe ; get a screen shot from the buffer object oScreenImage = oBuffer -> read() ; grab the data from the image object oScreenImage -> getproperty, data=img inf = size(img) ; destroy the buffer object obj_destroy, oBuffer if inf[0] eq 2 then begin write_gif, gifile, img endif else if inf[0] eq 3 then begin img = color_quan(img,1,r,g,b,color=256) write_gif, gifile, img, r,g,b endif endcase 'NERESIZE' : begin ; retrieve the object window ID from the draw area ID widget_control,state.objtra.nepltdraw(1), $ get_value=oWindow state.objtra.oViewNe-> remove,state.objtra.oModelNe state.objtra.oModelNe = obj_new('IDLgrModel') state.objtra.oViewNe -> add,state.objtra.oModelNe obj_Ne_plot,state,1,oModel=state.objtra.oModelNe oWindow -> Draw,state.objtra.oViewNe iicode = state.tra.iicode widget_control,state.objtra.nepltbase(iicode), $ set_uvalue = state endcase else: endcase end pro obj_fnplt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'FNCLOSE': begin ;print,'ne_plot close' widget_control,event.top,/destroy endcase 'FNPRINTPS' : begin WIDGET_CONTROL,state.objtra.fnfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.objtra.fnfield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Fn_plot,psfile,state,1 endcase 'FNPRINTGIF' : begin WIDGET_CONTROL,state.objtra.fnfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.objtra.fnfield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile ; create a buffer object to render the image in true color oBuffer = obj_new('IDLgrBuffer', dim=[1000,500]) ; render the graphics to the buffer object oBuffer -> draw, state.objtra.oViewFn ; get a screen shot from the buffer object oScreenImage = oBuffer -> read() ; grab the data from the image object oScreenImage -> getproperty, data=img inf = size(img) ; destroy the buffer object obj_destroy, oBuffer if inf[0] eq 2 then begin write_gif, gifile, img endif else if inf[0] eq 3 then begin img = color_quan(img,1,r,g,b,color=256) write_gif, gifile, img, r,g,b endif endcase 'FNRESIZE' : begin ; retrieve the object window ID from the draw area ID widget_control,state.objtra.fnpltdraw(1), $ get_value=oWindow state.objtra.oViewFn-> remove,state.objtra.oModelFn state.objtra.oModelFn = obj_new('IDLgrModel') state.objtra.oViewFn -> add,state.objtra.oModelFn obj_Fn_plot,state,1,oModel=state.objtra.oModelFn oWindow -> Draw,state.objtra.oViewFn iicode = state.tra.iicode widget_control,state.objtra.fnpltbase(iicode), $ set_uvalue = state endcase else: endcase end pro obj_ne3plt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'NE3CLOSE': begin ;print,'3-ne plot close' widget_control,event.top,/destroy endcase 'NE3PRINTPS' : begin WIDGET_CONTROL,state.objtra.ne3field(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.objtra.ne3field(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Ne3_plot,psfile,state,1 endcase 'NE3PRINTGIF' : begin WIDGET_CONTROL,state.objtra.ne3field(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.objtra.ne3field(1),set_value=gifile widget_control,state.lasttext,set_value=gifile ; create a buffer object to render the image in true color oBuffer = obj_new('IDLgrBuffer', dim=[1000,500]) ; render the graphics to the buffer object oBuffer -> draw, state.objtra.oViewNe3 ; get a screen shot from the buffer object oScreenImage = oBuffer -> read() ; grab the data from the image object oScreenImage -> getproperty, data=img inf = size(img) ; destroy the buffer object obj_destroy, oBuffer if inf[0] eq 2 then begin write_gif, gifile, img endif else if inf[0] eq 3 then begin img = color_quan(img,1,r,g,b,color=256) write_gif, gifile, img, r,g,b endif endcase 'NE3RESIZE' : begin ; retrieve the object window ID from the draw area ID widget_control,state.objtra.ne3pltdraw(1), $ get_value=oWindow state.objtra.oViewNe3-> remove,state.objtra.oModelNe3 state.objtra.oModelNe3 = obj_new('IDLgrModel') state.objtra.oViewNe3 -> add,state.objtra.oModelNe3 obj_Ne3_plot,state,1,oModel=state.objtra.oModelNe3 oWindow -> Draw,state.objtra.oViewNe3 iicode = state.tra.iicode widget_control,state.objtra.ne3pltbase(iicode), $ set_uvalue = state endcase else: endcase end pro obj_nemplt_eh,event widget_control,event.id, get_value=buttonvalue,get_uvalue=uvalue widget_control,event.top,get_uvalue=state case uvalue of 'NEmCLOSE': begin ;print,'Mult-ne plot close' widget_control,event.top,/destroy endcase 'NEmPRINTPS' : begin WIDGET_CONTROL,state.objtra.nemfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) psfile = psfile + '.ps' ;print,psfile WIDGET_CONTROL,state.objtra.nemfield(1),set_value=psfile widget_control,state.lasttext,set_value=psfile print_Nem_plot,psfile,state,1 endcase 'NEmPRINTGIF' : begin WIDGET_CONTROL,state.objtra.nemfield(1),get_value=val psfile=val[0] pos=rstrpos(psfile,'.') psfile=strmid(psfile,0,pos) gifile = psfile + '.gif' print,gifile WIDGET_CONTROL,state.objtra.nemfield(1),set_value=gifile widget_control,state.lasttext,set_value=gifile ; create a buffer object to render the image in true color oBuffer = obj_new('IDLgrBuffer', dim=[1000,500]) ; render the graphics to the buffer object oBuffer -> draw, state.objtra.oViewNem ; get a screen shot from the buffer object oScreenImage = oBuffer -> read() ; grab the data from the image object oScreenImage -> getproperty, data=img inf = size(img) ; destroy the buffer object obj_destroy, oBuffer if inf[0] eq 2 then begin write_gif, gifile, img endif else if inf[0] eq 3 then begin img = color_quan(img,1,r,g,b,color=256) write_gif, gifile, img, r,g,b endif endcase 'NEmRESIZE' : begin ; retrieve the object window ID from the draw area ID widget_control,state.objtra.nempltdraw(1), $ get_value=oWindow state.objtra.oViewNem-> remove,state.objtra.oModelNem state.objtra.oModelNem = obj_new('IDLgrModel') state.objtra.oViewNem -> add,state.objtra.oModelNem obj_Nem_plot,state,1,oModel=state.objtra.oModelNem oWindow -> Draw,state.objtra.oViewNem iicode = state.tra.iicode widget_control,state.objtra.nempltbase(iicode), $ set_uvalue = state endcase else: endcase end pro O_plot,state,opstart erase tfile = state.tra.trafile ;get_lun,unito unito = 3 ;openr,unito,'o_trace' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) otfile = tdir + 'o_tra_'+strmid(tfile,tpos+3,16)+'.dat' ON_IOERROR, bad_num10 openr,unito,otfile dum = ' ' readf,unito,dum readf,unito,dum timen = fltarr(6) readf,unito,timen readf,unito,dum readf,unito,dum freqo=fltarr(1000) virto=freqo i = 0 while (not eof(unito)) do begin readf,unito,val1,val2 freqo(i) = val1 virto(i) = val2 i = i + 1 endwhile close,unito freqo=freqo(0:i-1) virto=virto(0:i-1) tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) a=findgen(16)*(!PI*2/16.) usersym,cos(a),sin(a) fmax=max(freqo) x2=10. if fmax gt 10.0 then x2=20. if opstart eq 0 then WIDGET_CONTROL,state.tra.opfield(3),SET_VALUE=x2 y1 = 4500.0 if state.iono.satellite eq 'I2' then y1 = 3000.0 y2 = 0.0 if opstart le 1 then begin widget_control,state.tra.opfield(2),get_value=x1 widget_control,state.tra.opfield(3),get_value=x2 widget_control,state.tra.opfield(4),get_value=y1 widget_control,state.tra.opfield(5),get_value=y2 endif if opstart eq 2 then begin widget_control,state.objtra.opfield(2),get_value=x1 widget_control,state.objtra.opfield(3),get_value=x2 widget_control,state.objtra.opfield(4),get_value=y1 widget_control,state.objtra.opfield(5),get_value=y2 endif ;loadct,0 px1=0.15 px2=0.85 py1=0.2 py2=0.9 plot,freqo,virto, PSYM = 8, title=ttra, $ position=[px1,py1,px2,py2], $ xrange=[x1,x2], xstyle=1, $ yrange=[y1,y2], ystyle=1, $ xtitle='Frequency (MHz)', xcharsize=1.25, $ ytitle='Apparent Range (km)', ycharsize=1.25 tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) osfile = tdir + 'o_scal_'+strmid(tfile,tpos+3,16)+'.dat' unito = 3 openr,unito,osfile ;,/get_lun dum = ' ' readf,unito,dum readf,unito,dum timen = fltarr(6) readf,unito,timen readf,unito,dum readf,unito,dum freqo=fltarr(1000) virto=freqo i = 0 while (not eof(unito)) do begin readf,unito,val1,val2,val3,val4,val5 freqo(i) = val2 virto(i) = val1 i = i + 1 endwhile close,unito freqo=freqo(0:i-1) virto=virto(0:i-1) usersym,cos(a),sin(a),/fill oplot,freqo,virto, PSYM = 8 xtraces = state.tra.tracex xcount = state.tra.ntracex xxt1=xtraces[0:xcount,1] xxt2=xtraces[0:xcount,0] oplot,xxt1,xxt2,psym=7 tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) wmapfile = tdir + 'wmap_'+strmid(tfile,tpos+3,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap wmapline = state.worldmap.line1 xyouts,0.15,0.07,wmapline,/normal readf,unitw,wmap xyouts,0.15,0.05,wmap,/normal close,unitw xyouts, 0.3, 0.01, '!20B!M = O-SCALED O = O-CALC X = X-SCALED', $ size=1.2, /normal iicode = state.tra.iicode ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin xyouts,px2,py2+0.01,tcode,/normal,alignment=1.0,size=1.2 endif xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num10: close,unito return end pro Ne_plot,state,nestart erase tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) nefile = tdir + 'ne_prof_'+strmid(tfile,tpos+3,16)+'.dat' unitn = 3 ON_IOERROR, bad_num11 openr,unitn,nefile ;,/get_lun dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn nep=nep(0:i-1) altn=altn(0:i-1) tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) x1 = 1.0e2 x2 = 1.0e7 y1 = 0.0 y2 = 1500.0 altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 y2 = altval if nestart le 1 then begin widget_control,state.tra.nefield(2),get_value=x1 widget_control,state.tra.nefield(3),get_value=x2 widget_control,state.tra.nefield(4),get_value=y1 widget_control,state.tra.nefield(5),get_value=y2 endif if nestart eq 2 then begin widget_control,state.objtra.nefield(2),get_value=x1 widget_control,state.objtra.nefield(3),get_value=x2 widget_control,state.objtra.nefield(4),get_value=y1 widget_control,state.objtra.nefield(5),get_value=y2 endif px1=0.2 px2=0.7 py1=0.2 py2=0.9 plot,nep,altn,/ynoz, title=ttra, $ position=[px1,py1,px2,py2], $ xrange=[x1,x2],/xlog, xstyle=1, $ yrange=[y1,y2], ystyle=1, $ xtitle='Ne', xcharsize=1.25, $ ytitle='Altitude (km)', ycharsize=1.25 tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) wmapfile = tdir + 'wmap_'+strmid(tfile,tpos+3,16)+'.dat' unitw = 3 openr,unitw,wmapfile ;,/get_lun wmap=' ' readf,unitw,wmap ;xyouts,0.15,0.07,wmap,/normal wmapline = state.worldmap.line1 xyouts,0.15,0.07,wmapline,/normal readf,unitw,wmap xyouts,0.15,0.05,wmap,/normal close,unitw ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. iicode = state.tra.iicode tcode='tcode' if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 endif xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num11: close,unitn return end pro Fn_plot,state,fnstart erase tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) fnfile = tdir + 'plas_fr_'+strmid(tfile,tpos+3,16)+'.dat' unitn = 3 ON_IOERROR,bad_num12 openr,unitn,fnfile ;,/get_lun dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum mhzn=fltarr(1000) altn=mhzn i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 mhzn(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn mhzn=mhzn(0:i-1) altn=altn(0:i-1) tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) fx2=10.0 if max(mhzn) gt 10.0 then fx2=20.0 if fnstart eq 0 then WIDGET_CONTROL,state.tra.fnfield(3),SET_VALUE=fx2 y1 = 0.0 y2 = 1500.0 altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 y2 = altval if fnstart le 1 then begin widget_control,state.tra.fnfield(2),get_value=fx1 widget_control,state.tra.fnfield(3),get_value=fx2 widget_control,state.tra.fnfield(4),get_value=y1 widget_control,state.tra.fnfield(5),get_value=y2 endif if fnstart eq 2 then begin widget_control,state.objtra.fnfield(2),get_value=fx1 widget_control,state.objtra.fnfield(3),get_value=fx2 widget_control,state.objtra.fnfield(4),get_value=y1 widget_control,state.objtra.fnfield(5),get_value=y2 endif px1=0.2 px2=0.7 py1=0.2 py2=0.9 plot,mhzn,altn,/ynoz, title=ttra, $ position=[px1,py1,px2,py2], $ xrange=[fx1,fx2], xstyle=1, $ yrange=[y1,y2], ystyle=1, $ xtitle='Plasma Frequency (MHz)', xcharsize=1.25, $ ytitle='Altitude (km)',ycharsize=1.25 tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) wmapfile = tdir + 'wmap_'+strmid(tfile,tpos+3,16)+'.dat' ;get_lun,unitw unitw = 3 openr,unitw,wmapfile wmap=' ' readf,unitw,wmap ;xyouts,0.15,0.07,wmap,/normal wmapline = state.worldmap.line1 xyouts,0.15,0.07,wmapline,/normal readf,unitw,wmap xyouts,0.15,0.05,wmap,/normal close,unitw ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. iicode = state.tra.iicode if iicode eq 1 then tcode='Fixed VS, known fxS' if iicode eq 2 then tcode='Fixed VS, unknown fxS' if iicode eq 3 then tcode='Variable VS, known fxS' if iicode eq 4 then tcode='Variable VS, unknown fxS' if (iicode ge 1) and (iicode le 4) then begin xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 endif xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num12: close,unitn return end pro Ne3_plot,state,arg1 erase if arg1 le 1 then infile_ne = state.tra.infile_ne if arg1 eq 2 then infile_ne = state.objtra.infile_ne cthick=1 if arg1 ge 1 then cthick=4 ;get_lun,unitn ;openr,unitn,'ne.dat' unitn = 3 ON_IOERROR, bad_num13 openr,unitn,infile_ne(0) dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn nep=nep(0:i-1) altn=altn(0:i-1) ; tlen=strlen(tfile) ; tstart=tlen-22 ; ttra=strmid(tfile,tstart,22-4) if arg1 eq 0 then begin ; for portrait px1=0.2 px2=0.7 py1=0.23 py2=0.9 endif if arg1 ge 1 then begin ; for landscope px1=0.2 px2=0.9 py1=0.2 py2=0.7 endif if arg1 le 1 then begin widget_control,state.tra.ne3field(2),get_value=x1 widget_control,state.tra.ne3field(3),get_value=x2 widget_control,state.tra.ne3field(4),get_value=y1 widget_control,state.tra.ne3field(5),get_value=y2 endif if arg1 eq 2 then begin widget_control,state.objtra.ne3field(2),get_value=x1 widget_control,state.objtra.ne3field(3),get_value=x2 widget_control,state.objtra.ne3field(4),get_value=y1 widget_control,state.objtra.ne3field(5),get_value=y2 endif ;loadct,0 plot,nep,altn,/ynoz, $ position=[px1,py1,px2,py2], $ xrange=[x1,x2],/xlog, xstyle=1, $ yrange=[y1,y2],ystyle=1, $ xtitle='N!Le!N(cm)', xcharsize=1.5, $ ytitle='ALTITUDE (km)', ycharsize=1.5, $ charthick=cthick, thick=cthick tpos=rstrpos(infile_ne(0),'/') nefile=strmid(infile_ne(0),tpos+9,16) + ' (solid line)' xyouts,px1,py2+0.01,nefile,/normal,size=1.2,charthick=cthick close,unitn for k=1,2 do begin openr,unitn,infile_ne(k) dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile free_lun,unitn nep=nep(0:i-1) altn=altn(0:i-1) oplot,nep,altn,linestyle=k,thick=cthick tpos=rstrpos(infile_ne(k),'/') nefile=strmid(infile_ne(k),tpos+9,16) if k eq 1 then nefile=nefile+' (dotted line)' if k eq 2 then nefile=nefile+' (dashed line)' if k eq 1 then pyy=py2+0.03 if k eq 2 then pyy=py2+0.05 xyouts,px1,pyy,nefile,/normal,size=1.2,charthick=cthick close,unitn endfor pyy1=0.07 pyy2=0.04 if arg1 eq 1 then begin pyy1=0.11 pyy2=0.09 endif tpos=rstrpos(infile_ne(1),'/') tdir=strmid(infile_ne(1),0,tpos+1) wmapfile = tdir + 'wmap_'+strmid(infile_ne(1),tpos+9,16)+'.dat' ;get_lun,unitw unitw = 3 openr,unitw,wmapfile wmap=' ' readf,unitw,wmap ;xyouts,0.15,0.07,wmap,/normal ;wmapline = wmap wmapline = state.worldmap.line1 xyouts,0.1,pyy1,wmapline,/normal,size=1.0,charthick=cthick readf,unitw,wmap xyouts,0.1,pyy2,wmap,/normal,size=1.0,charthick=cthick close,unitw ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. ; if iicode eq 1 then tcode='Fixed VS, known fxS' ; if iicode eq 2 then tcode='Fixed VS, unknown fxS' ; if iicode eq 3 then tcode='Variable VS, known fxS' ; if iicode eq 4 then tcode='Variable VS, unknown fxS' ; if (iicode ge 1) and (iicode le 4) then begin ; xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 ; endif xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 bad_num13: close,unitn return end pro Nem_plot,state,arg1 erase if arg1 le 1 then begin infile_nem = state.tra.infile_nem nemfiles = state.tra.nemfiles endif if arg1 eq 2 then begin infile_nem = state.objtra.infile_nem nemfiles = state.objtra.nemfiles endif cthick=1 if arg1 ge 1 then cthick=4 ;get_lun,unitn unitn = 3 openr,unitn,infile_nem(0) dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile close,unitn nep=nep(0:i-1) altn=altn(0:i-1) ;loadct,0 if arg1 eq 0 then begin ; for portrait px1=0.2 px2=0.7 py1=0.23 py2=0.9 endif if arg1 ge 1 then begin ; for landscope px1=0.2 px2=0.9 py1=0.2 py2=0.7 endif if arg1 le 1 then begin widget_control,state.tra.nemfield(2),get_value=x1 widget_control,state.tra.nemfield(3),get_value=x2 widget_control,state.tra.nemfield(4),get_value=y1 widget_control,state.tra.nemfield(5),get_value=y2 endif if arg1 eq 2 then begin widget_control,state.objtra.nemfield(2),get_value=x1 widget_control,state.objtra.nemfield(3),get_value=x2 widget_control,state.objtra.nemfield(4),get_value=y1 widget_control,state.objtra.nemfield(5),get_value=y2 endif plot,nep,altn,/ynoz, $ position=[px1,py1,px2,py2], $ xrange=[x1,x2],/xlog, xstyle=1, $ yrange=[y1,y2],ystyle=1, $ xtitle='N!Le!N(cm)', xcharsize=1.5, $ ytitle='ALTITUDE (km)', ycharsize=1.5, $ charthick=cthick, thick=cthick ; kfile = n_elements(infile_nem) - 1 kfile = nemfiles - 1 tpos1=rstrpos(infile_nem(0),'/') tpos2=rstrpos(infile_nem(kfile),'/') nefile=strmid(infile_nem(0),tpos1+9,16) + ' - ' + $ strmid(infile_nem(kfile),tpos1+9,16) xyouts,px1,py2+0.01,nefile,/normal,size=1.2,charthick=cthick close,unitn for k=1,kfile do begin openr,unitn,infile_nem(k) dum = ' ' readf,unitn,dum readf,unitn,dum timen = fltarr(6) readf,unitn,timen readf,unitn,dum readf,unitn,dum nep=fltarr(1000) altn=nep i = 0 while (not eof(unitn)) do begin readf,unitn,val1,val2 nep(i) = val1 altn(i) = val2 i = i + 1 endwhile free_lun,unitn nep=nep(0:i-1) altn=altn(0:i-1) ;oplot,nep,altn,linestyle=k,thick=cthick oplot,nep,altn,thick=cthick close,unitn endfor pyy1=0.07 pyy2=0.04 if arg1 eq 1 then begin pyy1=0.11 pyy2=0.09 endif tpos=rstrpos(infile_nem(0),'/') tdir=strmid(infile_nem(0),0,tpos+1) wmapfile= tdir + 'wmap_'+strmid(infile_nem(0),tpos+9,16)+'.dat' ; get_lun,unitw unitw = 3 openr,unitw,wmapfile wmap=' ' ;readf,unitw,wmap readf,unitw,wmap ;xyouts,0.15,0.07,wmap,/normal wmapline = wmap xyouts,0.1,pyy1,wmapline,/normal,size=1.0,charthick=cthick readf,unitw,wmap xyouts,0.1,pyy2,wmap,/normal,size=1.0,charthick=cthick close,unitw ; 1 = FIXED SATELLITE POSITION AND KNOWN FXS; ; 2 = FIXED SATELLITE POSITION AND UNKNOWN FXS; ; 3 = VARIABLE SATELLITE POSITION AND KNOWN FXS; ; 4 = VARIABLE SATELLITE POSITION AND UNKNOWN FXS. ; if iicode eq 1 then tcode='Fixed VS, known fxS' ; if iicode eq 2 then tcode='Fixed VS, unknown fxS' ; if iicode eq 3 then tcode='Variable VS, known fxS' ; if iicode eq 4 then tcode='Variable VS, unknown fxS' ; if (iicode ge 1) and (iicode le 4) then begin ; xyouts,px2,py2+0.05,tcode,/normal,alignment=1.0,size=1.2 ; endif xyouts,px2,py2+0.12,systime(0),/normal,alignment=1.0 return end pro call_trace,state,select infile_tra=' ' infile_tra=PICKFILE(/read, filter='*.tra') if infile_tra eq '' then goto,skiptra infile_tra=strtrim(infile_tra,2) print,infile_tra tpos=rstrpos(infile_tra,'/') tdir=strmid(infile_tra,0,tpos+1) tdate=strmid(infile_tra,tpos+6,11) ; if tdir ne mdir then begin ;stop ; looking for cdf file on other dir?? if select eq 0 then mfile = tdir + '*.cdf' if select eq 1 then mfile = tdir + '*_avg_isis2tops_24s.os2bin' if select eq 2 then mfile = tdir + '*_ful_isis2tops_24s.os2bin' if select eq 3 then mfile = tdir + '*.bin' if select eq 4 then mfile = tdir + '*.bin' files = FINDFILE(mfile,count=nfiles) files = strtrim(files,2) ; mdir = tdir ; endif tmatch = -1 for n=0,nfiles-1 do begin tmatch = strpos(files(n),tdate) if tmatch ne -1 then goto,skipmatch endfor ;stop ; this tra file can't find cdf file in same dir(no match date)... goto, skiptra skipmatch: state.load = 0 if select eq 1 or select eq 2 then state.load = 1 if select eq 3 or select eq 4 then state.load = 2 widget_control,state.tra.outfile,set_value=infile_tra state.tra.iicode = 0 state.iono.findex = n state.iono.file_cdf=files(n) state.iono.files = files state.iono.nfiles = nfiles state.tra.trafile = infile_tra filecdf = state.iono.file_cdf if select eq 0 then read_cdf,filecdf,state if select eq 1 or select eq 2 then read_os2bin,filecdf,state if select eq 3 or select eq 4 then read_bin2,filecdf,state gofile,state if select eq 0 then outfile_text,filecdf,state,1 if select eq 1 or select eq 2 then outfile_bintext,filecdf,state,1 if select eq 3 or select eq 4 then outfile_bin2text,filecdf,state,1 state.tra.itracex = 0 state.tra.ntracex = -1 state.tra.itraceo = 0 state.tra.ntraceo = -1 tskip = 0 textisis=' ' ;get_lun,tunit tunit = 3 openr,tunit,infile_tra readf,tunit,format='(a4)',textisis close,tunit if textisis eq ' YR ' then tskip = 1 ;get_lun,tunit tunit = 3 openr,tunit,infile_tra dum=' ' if tskip eq 1 then begin readf,tunit,dum readf,tunit,dum endif timetra=fltarr(6) readf,tunit,format='(14x,3i4,4x,2i4,f8.3)',t1,t2,t3,t4,t5,t6 timetra(0)=t1 timetra(1)=t2 timetra(2)=t3 timetra(3)=t4 timetra(4)=t5 timetra(5)=t6 xcount = -1 readf,tunit,xcount readf,tunit,dum xtraces=dblarr(xcount,7) xtamp=intarr(xcount) state.obj.oView -> remove,state.obj.oXOModel state.obj.oXOModel = obj_new('IDLgrModel') state.obj.oView -> add,state.obj.oXOModel state.tra.ntracex = xcount - 1 xmax = state.data.xmax ymax = state.data.ymax dataxy = fltarr(2) for i=0,xcount-1 do begin ;readf,tunit,t1,t2,t3,t4,t5,t6,t7 readf,tunit,format='(1x,f8.1,f8.4,f12.2,f11.3,i6,f8.4,f10.3)', $ t1,t2,t3,t4,t5,t6,t7 ;print,t1,t2,t3,t4,t5,t6,t7 state.tra.tracex(i,0) = t1 state.tra.tracex(i,1) = t2 state.tra.tracex(i,2) = t3 state.tra.tracex(i,3) = t4 state.tra.ampx(i) = t5 state.tra.tracex(i,4) = t6 state.tra.tracex(i,5) = t7 xmotion = (t4 - state.data.time_iono_data[0]) / $ (state.data.time_iono_data[xmax-1]-state.data.time_iono_data[0]) ymotion = (t3 - state.data.time_range_data[0]) / $ (state.data.time_range_data[ymax-1]-state.data.time_range_data[0]) xmotion = xmotion * xmax ymotion = ymotion * ymax dataxy[0] = xmotion dataxy[1] = ymotion xmotion = long(xmotion) ymotion = long(ymotion) colorx = state.tra.ColorX oFontXO = obj_new('IDLgrFont','Helvetica*Bold',size=12) state.tra.oTracesX[i] = obj_new('IDLgrText', $ 'X', $ alignment=0.5, $ vertical_alignment=0.5, $ font=oFontXO, $ location=[dataxy[0],dataxy[1]], $ color=[colorx[0],colorx[1],colorx[2]]) state.obj.oXOModel -> add,state.tra.oTracesX[i] ;state.obj.oWindow -> draw,state.obj.oView endfor ncount = -1 if not eof(tunit) then begin readf,tunit,ncount readf,tunit,dum traces=dblarr(ncount,9) tamp = fltarr(ncount) state.tra.ntraceo = ncount - 1 for i=0,ncount-1 do begin ;readf,tunit,t1,t2,t3,t4,t5,t6,t7 readf,tunit,format='(1x,f8.1,f8.4,f12.2,f11.3,i6,f8.4,f10.3)', $ t1,t2,t3,t4,t5,t6,t7 ;print,t1,t2,t3,t4,t5,t6,t7 state.tra.traceo(i,0) = t1 state.tra.traceo(i,1) = t2 state.tra.traceo(i,2) = t3 state.tra.traceo(i,3) = t4 state.tra.ampo(i) = t5 state.tra.traceo(i,4) = t6 state.tra.traceo(i,5) = t7 xmotion = (t4 - state.data.time_iono_data[0]) / $ (state.data.time_iono_data[xmax-1]-state.data.time_iono_data[0]) ymotion = (t3 - state.data.time_range_data[0]) / $ (state.data.time_range_data[ymax-1]-state.data.time_range_data[0]) xmotion = xmotion * xmax ymotion = ymotion * ymax xmotion = long(xmotion) ymotion = long(ymotion) dataxy[0] = xmotion dataxy[1] = ymotion coloro = state.tra.ColorO oFontXO = obj_new('IDLgrFont','Helvetica*Bold',size=12) state.tra.oTracesO[i] = obj_new('IDLgrText', $ 'O', $ alignment=0.5, $ vertical_alignment=0.5, $ font=oFontXO, $ location=[dataxy[0],dataxy[1]], $ color=[coloro[0],coloro[1],coloro[2]]) state.obj.oXOModel -> add,state.tra.oTracesO[i] ;state.obj.oWindow -> draw,state.obj.oView endfor endif state.obj.oWindow -> draw,state.obj.oView close,tunit skiptra: return end pro tracexo_eh,event widget_control,event.id,get_uvalue=uval widget_control,event.top,get_uvalue=state @catch_error case uval of 'tracex' : begin if state.data.filecdf ne '' then begin if state.tra.itracex eq 0 and state.tra.itraceo eq 0 then begin print,'Enter TRACE X' state.tra.itracex = 1 state.tra.itraceo = 0 state.tra.ntracex = -1 state.tra.tracexo = 0 endif endif end 'traceo' : begin if state.data.filecdf ne '' then begin if state.tra.itraceo eq 0 and state.tra.itracex eq 1 then begin print,'Enter TRACE O' state.tra.itracex = 0 state.tra.itraceo = 1 state.tra.ntraceo = -1 state.tra.tracexo = 0 endif endif end 'tclean' : begin if state.tra.ntracex gt -1 then begin state.obj.oView -> remove,state.obj.oXOModel state.obj.oWindow -> draw,state.obj.oView state.tra.itracex = 0 state.tra.ntracex = -1 state.tra.itraceo = 0 state.tra.ntraceo = -1 state.tra.tracexo = 0 endif end 'trasav' : begin if state.data.filecdf ne '' then begin ; print,'Enter - Save Traces File' state.tra.warn = 0 warn_file,state if state.tra.warn eq 1 then save_traces,state endif end 'jackvk' : begin if state.tra.ntracex gt 0 and state.tra.ntraceo gt 0 then begin state.tra.iicode=3 calljackson,3,state endif end 'jackvuk' : begin if state.tra.ntracex gt 0 and state.tra.ntraceo gt 0 then begin state.tra.iicode=4 calljackson,4,state endif end 'jackfk' : begin if state.tra.ntracex gt 0 and state.tra.ntraceo gt 0 then begin state.tra.iicode=1 calljackson,1,state endif end 'jackfuk' : begin if state.tra.ntracex gt 0 and state.tra.ntraceo gt 0 then begin state.tra.iicode=2 calljackson,2,state endif end 'reloadcdf' : begin ;print,'RE-LOAD' call_trace,state,0 end 'reloadavg' : begin ;print,'RE-LOAD' call_trace,state,1 end 'reloadful' : begin ;print,'RE-LOAD' call_trace,state,2 end 'reloadavg2' : begin ;print,'RE-LOAD' call_trace,state,3 end 'reloadful2' : begin ;print,'RE-LOAD' call_trace,state,4 end 'ADDX' : begin if state.tra.trafile ne '' then begin print,'Add X' state.tra.tracexo = 1 endif endcase 'REMOVEX' : begin if state.tra.trafile ne '' then begin print,'Remove X' state.tra.tracexo = 2 endif endcase 'ADDO' : begin if state.tra.trafile ne '' then begin print,'Add O' state.tra.tracexo = 3 endif endcase 'REMOVEO' : begin if state.tra.trafile ne '' then begin print,'Remove O' state.tra.tracexo = 4 endif endcase 'PlotO' : begin if state.tra.trafile ne '' then begin iicode = state.tra.iicode for i=1,4 do begin bbadid = state.tra.oplotbadid(i) bbase = state.tra.oplotbase(i) if state.tra.oplotstatus(i) eq 1 then $ widget_control,bad_id=bbadid,bbase if state.tra.oplotstatus(i) eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.tra.oplotbadid(i)=bbadid endfor state.tra.oplotbadid(iicode) = bbadid opbase = widget_base(/col,title='O PLOT',EVENT_PRO='oplot_eh') state.tra.oplotbase(iicode) = opbase opbase1 = widget_base(state.tra.oplotbase(iicode),row=1) wprint = widget_button(opbase1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='OPPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='OPPRINTGIF') oplotclose = widget_button(opbase1, $ value='Close',uvalue='OPCLOSE') tfile = state.tra.trafile tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) psfile = 'o_' + ttra + '.ps' if iicode eq 1 then psfile = 'o_' + ttra + '_fk.ps' if iicode eq 2 then psfile = 'o_' + ttra + '_fuk.ps' if iicode eq 3 then psfile = 'o_' + ttra + '_vk.ps' if iicode eq 4 then psfile = 'o_' + ttra + '_vuk.ps' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) psfile = tdir + psfile ; print,psfile widget_control,state.lasttext,set_value=psfile opfield=lonarr(6) opfield(1) = cw_field(opbase1,title=' outfile:', $ value=psfile, xsize=70, /string) opbase2 = widget_base(state.tra.oplotbase(iicode),row=1) opfield(2) = cw_field(opbase2,title='f(min):', $ value=0.0, xsize=6, /float) opfield(3) = cw_field(opbase2,title='f(max):', $ value=20.0, xsize=6, /float) opfield(4) = cw_field(opbase2,title='VR(max):', $ value=3000.0, xsize=6, /float) opfield(5) = cw_field(opbase2,title='VR(min):', $ value=0.0, xsize=6, /float) oplotclose = widget_button(opbase2, $ value='Re-size',uvalue='OPRESIZE') opbase3 = widget_base(state.tra.oplotbase(iicode),row=1) oplotdraw = lonarr(2) oplotdraw(1) = WIDGET_DRAW(opbase3, $ RETAIN = 2, $ XSIZE = 800, YSIZE = 400) widget_control,state.tra.oplotbase(iicode),/realize state.tra.oplotstatus(iicode) = 1 state.tra.opfield = opfield state.tra.oplotdraw = oplotdraw O_plot,state,0 widget_control,opbase, set_uvalue = state endif endcase 'PlotNe' : begin if state.tra.trafile ne '' then begin iicode = state.tra.iicode for i=1,4 do begin bbadid = state.tra.nepltbadid(i) bbase = state.tra.nepltbase(i) if state.tra.nepltstatus(i) eq 1 then $ widget_control,bad_id=bbadid,bbase if state.tra.nepltstatus(i) eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.tra.nepltbadid(i)=bbadid endfor state.tra.nepltbadid(iicode) = bbadid nebase = widget_base(/col,title='NE PLOT',EVENT_PRO='neplt_eh') state.tra.nepltbase(iicode) = nebase nebase1 = widget_base(state.tra.nepltbase(iicode),row=1) wprint = widget_button(nebase1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='NEPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='NEPRINTGIF') nepltprint = widget_button(nebase1, $ value='Close',uvalue='NECLOSE') tfile = state.tra.trafile tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) psfile = 'ne_' + ttra + '.ps' if iicode eq 1 then psfile = 'ne_' + ttra + '_fk.ps' if iicode eq 2 then psfile = 'ne_' + ttra + '_fuk.ps' if iicode eq 3 then psfile = 'ne_' + ttra + '_vk.ps' if iicode eq 4 then psfile = 'ne_' + ttra + '_vuk.ps' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) psfile = tdir + psfile ; print,psfile widget_control,state.lasttext,set_value=psfile nefield=lonarr(6) nefield(1) = cw_field(nebase1,title=' outfile:', $ value=psfile, xsize=70, /string) nebase2 = widget_base(state.tra.nepltbase(iicode),row=1) nefield(2) = cw_field(nebase2,title='Ne(min):', $ value=1.0e2, xsize=12, /float) nefield(3) = cw_field(nebase2,title='Ne(max):', $ value=1.0e7, xsize=12, /float) nefield(4) = cw_field(nebase2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 nefield(5) = cw_field(nebase2,title='Alt(max):', $ value=altval, xsize=6, /float) nepltclose = widget_button(nebase2, $ value='Re-size',uvalue='NERESIZE') nebase3 = widget_base(state.tra.nepltbase(iicode),row=1) nepltdraw=lonarr(2) nepltdraw(1) = WIDGET_DRAW(nebase3, $ RETAIN = 2, $ XSIZE = 800, YSIZE = 400) widget_control,state.tra.nepltbase(iicode),/realize state.tra.nepltstatus(iicode) = 1 state.tra.nefield = nefield state.tra.nepltdraw = nepltdraw Ne_plot,state,0 widget_control,nebase, set_uvalue = state endif endcase 'PlotFn' : begin if state.tra.trafile ne '' then begin iicode = state.tra.iicode for i=1,4 do begin bbadid = state.tra.fnpltbadid(i) bbase = state.tra.fnpltbase(i) if state.tra.fnpltstatus(i) eq 1 then $ widget_control,bad_id=bbadid,bbase if state.tra.fnpltstatus(i) eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.tra.fnpltbadid(i)=bbadid endfor state.tra.fnpltbadid(iicode) = bbadid fnbase = widget_base(/col,title='Fn PLOT',EVENT_PRO='fnplt_eh') state.tra.fnpltbase(iicode) = fnbase fnbase1 = widget_base(state.tra.fnpltbase(iicode),row=1) wprint = widget_button(fnbase1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='FNPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='FNPRINTGIF') fnpltprint = widget_button(fnbase1, $ value='Close',uvalue='FNCLOSE') tfile = state.tra.trafile tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) psfile = 'fn_' + ttra + '.ps' if iicode eq 1 then psfile = 'fn_' + ttra + '_fk.ps' if iicode eq 2 then psfile = 'fn_' + ttra + '_fuk.ps' if iicode eq 3 then psfile = 'fn_' + ttra + '_vk.ps' if iicode eq 4 then psfile = 'fn_' + ttra + '_vuk.ps' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) psfile = tdir + psfile ; print,psfile widget_control,state.lasttext,set_value=psfile fnfield=lonarr(6) fnfield(1) = cw_field(fnbase1,title=' outfile:', $ value=psfile, xsize=70, /string) fnbase2 = widget_base(state.tra.fnpltbase(iicode),row=1) fnfield(2) = cw_field(fnbase2,title='PF(min):', $ value=0.0, xsize=6, /float) fnfield(3) = cw_field(fnbase2,title='PF(max):', $ value=20.0, xsize=6, /float) fnfield(4) = cw_field(fnbase2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 fnfield(5) = cw_field(fnbase2,title='Alt(max):', $ value=altval, xsize=6, /float) fnpltclose = widget_button(fnbase2, $ value='Re-size',uvalue='FNRESIZE') fnbase3 = widget_base(state.tra.fnpltbase(iicode),row=1) fnpltdraw=lonarr(2) fnpltdraw(1) = WIDGET_DRAW(fnbase3, $ RETAIN = 2, $ XSIZE = 800, YSIZE = 400) widget_control,state.tra.fnpltbase(iicode),/realize state.tra.fnpltstatus(iicode) = 1 state.tra.fnfield = fnfield state.tra.fnpltdraw = fnpltdraw Fn_plot,state,0 widget_control,fnbase, set_uvalue = state endif endcase 'NE3PLOT' : begin tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) bbadid = state.tra.ne3pltbadid bbase = state.tra.ne3pltbase if state.tra.ne3pltstatus eq 1 then $ widget_control,bad_id=bbadid,bbase if state.tra.ne3pltstatus eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.tra.ne3pltbadid = bbadid ne3base = widget_base(/col,title=' 3-Ne PLOT ',EVENT_PRO='ne3plt_eh') state.tra.ne3pltbase = ne3base ne3base1 = widget_base(ne3base,row=1) wprint = widget_button(ne3base1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='NE3PRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='NE3PRINTGIF') ne3pltprint = widget_button(ne3base1, $ value='Close',uvalue='NE3CLOSE') infile_ne=strarr(3) infile_ne(0)=' ' infile_ne(0)=PICKFILE(/read, filter = 'ne_prof*.dat', $ title='Entry in the first file') if infile_ne(0) eq '' then goto, skipne3plot infile_ne(0)=strtrim(infile_ne(0),2) print,infile_ne(0) tpos=rstrpos(infile_ne(0),'/') tdir=strmid(infile_ne(0),0,tpos+1) infile_ne(1)=' ' infile_ne(1)=PICKFILE(/read, filter=tdir+'ne_prof*.dat', $ title='Entry in the second file') if infile_ne(1) eq '' then goto, skipne3plot infile_ne(1)=strtrim(infile_ne(1),2) print,infile_ne(1) tpos=rstrpos(infile_ne(1),'/') tdir=strmid(infile_ne(1),0,tpos+1) infile_ne(2)=' ' infile_ne(2)=PICKFILE(/read, filter=tdir+'ne_prof*.dat', $ title='Entry in the third file') if infile_ne(2) eq '' then goto, skipne3plot infile_ne(2)=strtrim(infile_ne(2),2) print,infile_ne(2) pos = rstrpos(infile_ne(0),'/') psfile='ne3_prof_' + strmid(infile_ne(0),pos+9,16)+'.ps' psfile = tdir + psfile widget_control,state.lasttext,set_value=psfile ne3field=lonarr(6) ne3field(1) = cw_field(ne3base1,title=' outfile:', $ value=psfile, xsize=70, /string) ne3base2 = widget_base(ne3base,row=1) ne3field(2) = cw_field(ne3base2,title='Ne(min):', $ value=1.0e2, xsize=12, /float) ne3field(3) = cw_field(ne3base2,title='Ne(max):', $ value=1.0e7, xsize=12, /float) ne3field(4) = cw_field(ne3base2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 ne3field(5) = cw_field(ne3base2,title='Alt(max):', $ value=altval, xsize=6, /float) ne3pltclose = widget_button(ne3base2, $ value='Re-size',uvalue='NE3RESIZE') ne3base3 = widget_base(ne3base,row=1) ne3pltdraw=lonarr(2) ne3pltdraw(1) = WIDGET_DRAW(ne3base3, $ RETAIN = 2, $ XSIZE = 800, YSIZE = 400) widget_control,ne3base,/realize state.tra.ne3pltstatus = 1 state.tra.ne3field = ne3field state.tra.ne3pltdraw = ne3pltdraw state.tra.infile_ne = infile_ne Ne3_plot,state,0 widget_control,ne3base, set_uvalue = state skipne3plot : endcase 'NEmPLOT' : begin bbadid = state.tra.nempltbadid bbase = state.tra.nempltbase if state.tra.nempltstatus eq 1 then $ widget_control,bad_id=bbadid,bbase if state.tra.nempltstatus eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.tra.nempltbadid = bbadid nembase = widget_base(/col, $ title=' mult-NE PLOT ',EVENT_PRO='nemplt_eh') state.tra.nempltbase = nembase nembase1 = widget_base(nembase,row=1) wprint = widget_button(nembase1, $ value='Print',uvalue='NEmPRINT',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='NEmPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='NEmPRINTGIF') nempltprint = widget_button(nembase1, $ value='Close',uvalue='NEmCLOSE') infile_nem=strarr(100) checkfile = 'hello' fcount = -1 tdir = '' while checkfile ne '' do begin fcount=fcount+1 if fcount eq 1 then begin tpos=rstrpos(infile_nem(0),'/') tdir=strmid(infile_nem(0),0,tpos+1) endif if fcount lt 100 then begin infile_nem(fcount)=' ' infile_nem(fcount)=PICKFILE(/read, filter=tdir+'ne_prof*.dat', $ title='Entry in file') infile_nem(fcount)=strtrim(infile_nem(fcount),2) print,infile_nem(fcount) checkfile=infile_nem(fcount) endif else checkfile = '' endwhile if fcount le 0 then goto, skipnemplot infile_nem=infile_nem[0:fcount-1] pos = rstrpos(infile_nem(0),'/') psfile='nem_prof_' + strmid(infile_nem(0),pos+9,16)+'.ps' psfile = tdir + psfile nemfield=lonarr(6) nemfield(1) = cw_field(nembase1,title=' outfile:', $ value=psfile, xsize=70, /string) nembase2 = widget_base(nembase,row=1) nemfield(2) = cw_field(nembase2,title='Ne(min):', $ value=1.0e2, xsize=12, /float) nemfield(3) = cw_field(nembase2,title='Ne(max):', $ value=1.0e7, xsize=12, /float) nemfield(4) = cw_field(nembase2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 nemfield(5) = cw_field(nembase2,title='Alt(max):', $ value=altval, xsize=6, /float) nempltclose = widget_button(nembase2, $ value='Re-size',uvalue='NEmRESIZE') nembase3 = widget_base(nembase,row=1) nempltdraw=lonarr(2) nempltdraw(1) = WIDGET_DRAW(nembase3, $ RETAIN = 2, $ XSIZE = 800, YSIZE = 400) widget_control,nembase,/realize state.tra.nempltstatus = 1 state.tra.nemfield = nemfield state.tra.nempltdraw = nempltdraw state.tra.infile_nem = infile_nem state.tra.nemfiles = fcount Nem_plot,state,0 widget_control,nembase, set_uvalue = state skipnemplot: endcase ;========================================================================== 'oPlotO' : begin ;print,'Object Plot O' if state.tra.trafile ne '' then begin iicode = state.tra.iicode for i=0,4 do begin bbadid = state.objtra.oplotbadid(i) bbase = state.objtra.oplotbase(i) if state.objtra.oplotstatus(i) eq 1 then $ widget_control,bad_id=bbadid,bbase if state.objtra.oplotstatus(i) eq 1 and bbadid eq 0 then begin $ widget_control,bbase,/destroy endif state.objtra.oplotbadid(i)=bbadid endfor state.objtra.oplotbadid(iicode) = bbadid opbase = widget_base(/col,title='O PLOT',EVENT_PRO='obj_oplot_eh') state.objtra.oplotbase(iicode) = opbase opbase1 = widget_base(state.objtra.oplotbase(iicode),row=1) wprint = widget_button(opbase1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='OPPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='OPPRINTGIF') oplotclose = widget_button(opbase1, $ value='Close',uvalue='OPCLOSE') tfile = state.tra.trafile tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) psfile = 'o_' + ttra + '.ps' if iicode eq 1 then psfile = 'o_' + ttra + '_fk.ps' if iicode eq 2 then psfile = 'o_' + ttra + '_fuk.ps' if iicode eq 3 then psfile = 'o_' + ttra + '_vk.ps' if iicode eq 4 then psfile = 'o_' + ttra + '_vuk.ps' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) psfile = tdir + psfile ; print,psfile widget_control,state.lasttext,set_value=psfile opfield=lonarr(6) opfield(1) = cw_field(opbase1,title=' outfile:', $ value=psfile, xsize=70, /string) opbase2 = widget_base(state.objtra.oplotbase(iicode),row=1) opfield(2) = cw_field(opbase2,title='f(min):', $ value=0.0, xsize=6, /float) opfield(3) = cw_field(opbase2,title='f(max):', $ value=20.0, xsize=6, /float) vrmax = 4500.0 if state.iono.satellite eq 'I2' then vrmax = 3000.0 opfield(4) = cw_field(opbase2,title='VR(max):', $ value=vrmax, xsize=6, /float) opfield(5) = cw_field(opbase2,title='VR(min):', $ value=0.0, xsize=6, /float) oplotclose = widget_button(opbase2, $ value='Re-size',uvalue='OPRESIZE') opbase3 = widget_base(state.objtra.oplotbase(iicode),row=1) oplotdraw = lonarr(2) oplotdraw(1) = WIDGET_DRAW(opbase3, $ graphics_level = 2, $ uvalue='odraw', $ /expose_events, $ XSIZE = 800, YSIZE = 400) widget_control,opbase,/realize ;---------------------------------------------------------------------- ; retrieve the object window ID from the draw area ID widget_control,oplotdraw(1), get_value=oWindow ; render the graphics in the draw widget state.objtra.oplotstatus(iicode) = 1 state.objtra.opfield = opfield state.objtra.oplotdraw = oplotdraw ; state.objtra.oViewTrace -> remove,state.objtra.oModelTrace obj_destroy,state.objtra.oViewTrace state.objtra.oViewTrace = obj_new('IDLgrView', $ location = [0,0], $ dimension = [0,0], $ viewplane_rect = [-0.75,-0.90,1.5,1.5], $ zclip=[1,-1], $ units=0, $ color=[255,255,255]) state.objtra.oModelTrace = obj_new('IDLgrModel') state.objtra.oViewTrace -> add,state.objtra.oModelTrace obj_O_plot,state,0,oModel=state.objtra.oModelTrace oWindow -> Draw,state.objtra.oViewTrace widget_control,opbase, set_uvalue = state ;---------------------------------------------------------------------- endif endcase 'oPlotNe' : begin if state.tra.trafile ne '' then begin iicode = state.tra.iicode for i=0,4 do begin bbadid = state.objtra.nepltbadid(i) bbase = state.objtra.nepltbase(i) if state.objtra.nepltstatus(i) eq 1 then $ widget_control,bad_id=bbadid,bbase if state.objtra.nepltstatus(i) eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.objtra.nepltbadid(i)=bbadid endfor state.objtra.nepltbadid(iicode) = bbadid nebase = widget_base(/col,title='NE PLOT',EVENT_PRO='obj_neplt_eh') state.objtra.nepltbase(iicode) = nebase nebase1 = widget_base(state.objtra.nepltbase(iicode),row=1) wprint = widget_button(nebase1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='NEPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='NEPRINTGIF') nepltprint = widget_button(nebase1, $ value='Close',uvalue='NECLOSE') tfile = state.tra.trafile tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) psfile = 'ne_' + ttra + '.ps' if iicode eq 1 then psfile = 'ne_' + ttra + '_fk.ps' if iicode eq 2 then psfile = 'ne_' + ttra + '_fuk.ps' if iicode eq 3 then psfile = 'ne_' + ttra + '_vk.ps' if iicode eq 4 then psfile = 'ne_' + ttra + '_vuk.ps' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) psfile = tdir + psfile ; print,psfile widget_control,state.lasttext,set_value=psfile nefield=lonarr(6) nefield(1) = cw_field(nebase1,title=' outfile:', $ value=psfile, xsize=70, /string) nebase2 = widget_base(state.objtra.nepltbase(iicode),row=1) nefield(2) = cw_field(nebase2,title='Ne(min):', $ value=1.0e2, xsize=12, /float) nefield(3) = cw_field(nebase2,title='Ne(max):', $ value=1.0e7, xsize=12, /float) nefield(4) = cw_field(nebase2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 nefield(5) = cw_field(nebase2,title='Alt(max):', $ value=altval, xsize=6, /float) nepltclose = widget_button(nebase2, $ value='Re-size',uvalue='NERESIZE') nebase3 = widget_base(state.objtra.nepltbase(iicode),row=1) nepltdraw=lonarr(2) nepltdraw(1) = WIDGET_DRAW(nebase3, $ graphics_level = 2, $ uvalue='odraw', $ /expose_events, $ XSIZE = 800, YSIZE = 400) widget_control,nebase,/realize ;---------------------------------------------------------------------- ; retrieve the object window ID from the draw area ID widget_control,nepltdraw(1), get_value=oWindow ; render the graphics in the draw widget state.objtra.nepltstatus(iicode) = 1 state.objtra.nefield = nefield state.objtra.nepltdraw = nepltdraw ; state.objtra.oViewNe -> remove,state.objtra.oModelNe obj_destroy,state.objtra.oViewNe state.objtra.oViewNe = obj_new('IDLgrView', $ location = [0,0], $ dimension = [0,0], $ viewplane_rect = [-0.75,-0.90,1.5,1.5], $ zclip=[1,-1], $ units=0, $ color=[255,255,255]) state.objtra.oModelNe = obj_new('IDLgrModel') state.objtra.oViewNe -> add,state.objtra.oModelNe obj_Ne_plot,state,0,oModel=state.objtra.oModelNe oWindow -> Draw,state.objtra.oViewNe widget_control,nebase, set_uvalue = state ;---------------------------------------------------------------------- endif endcase 'oPlotFn' : begin if state.tra.trafile ne '' then begin iicode = state.tra.iicode for i=0,4 do begin bbadid = state.objtra.fnpltbadid(i) bbase = state.objtra.fnpltbase(i) if state.objtra.fnpltstatus(i) eq 1 then $ widget_control,bad_id=bbadid,bbase if state.objtra.fnpltstatus(i) eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.objtra.fnpltbadid(i)=bbadid endfor state.objtra.fnpltbadid(iicode) = bbadid fnbase = widget_base(/col,title='FN PLOT',EVENT_PRO='obj_fnplt_eh') state.objtra.fnpltbase(iicode) = fnbase fnbase1 = widget_base(state.objtra.fnpltbase(iicode),row=1) wprint = widget_button(fnbase1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='FNPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='FNPRINTGIF') fnpltprint = widget_button(fnbase1, $ value='Close',uvalue='FNCLOSE') tfile = state.tra.trafile tlen=strlen(tfile) tstart=tlen-22 ttra=strmid(tfile,tstart,22-4) psfile = 'fn_' + ttra + '.ps' if iicode eq 1 then psfile = 'fn_' + ttra + '_fk.ps' if iicode eq 2 then psfile = 'fn_' + ttra + '_fuk.ps' if iicode eq 3 then psfile = 'fn_' + ttra + '_vk.ps' if iicode eq 4 then psfile = 'fn_' + ttra + '_vuk.ps' tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) psfile = tdir + psfile ; print,psfile widget_control,state.lasttext,set_value=psfile fnfield=lonarr(6) fnfield(1) = cw_field(fnbase1,title=' outfile:', $ value=psfile, xsize=70, /string) fnbase2 = widget_base(state.objtra.fnpltbase(iicode),row=1) fnfield(2) = cw_field(fnbase2,title='PF(min):', $ value=0.0, xsize=6.0, /float) fnfield(3) = cw_field(fnbase2,title='PF(max):', $ value=20.0, xsize=6.0, /float) fnfield(4) = cw_field(fnbase2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 fnfield(5) = cw_field(fnbase2,title='Alt(max):', $ value=altval, xsize=6, /float) fnpltclose = widget_button(fnbase2, $ value='Re-size',uvalue='FNRESIZE') fnbase3 = widget_base(state.objtra.fnpltbase(iicode),row=1) fnpltdraw=lonarr(2) fnpltdraw(1) = WIDGET_DRAW(fnbase3, $ graphics_level = 2, $ uvalue='fndraw', $ /expose_events, $ XSIZE = 800, YSIZE = 400) widget_control,fnbase,/realize ;---------------------------------------------------------------------- ; retrieve the object window ID from the draw area ID widget_control,fnpltdraw(1), get_value=oWindow ; render the graphics in the draw widget ;oWindow -> Draw, state.objtra.oViewFn state.objtra.fnpltstatus(iicode) = 1 state.objtra.fnfield = fnfield state.objtra.fnpltdraw = fnpltdraw ;state.objtra.oViewFn-> remove,state.objtra.oModelFn obj_destroy,state.objtra.oViewFn state.objtra.oViewFn = obj_new('IDLgrView', $ location = [0,0], $ dimension = [0,0], $ viewplane_rect = [-0.75,-0.90,1.5,1.5], $ zclip=[1,-1], $ units=0, $ color=[255,255,255]) state.objtra.oModelFn = obj_new('IDLgrModel') state.objtra.oViewFn -> add,state.objtra.oModelFn obj_Fn_plot,state,0,oModel=state.objtra.oModelFn oWindow -> Draw,state.objtra.oViewFn widget_control,fnbase, set_uvalue = state ;---------------------------------------------------------------------- endif endcase 'oNE3PLOT' : begin tfile = state.tra.trafile tpos=rstrpos(tfile,'/') tdir=strmid(tfile,0,tpos+1) bbadid = state.objtra.ne3pltbadid bbase = state.objtra.ne3pltbase if state.objtra.ne3pltstatus eq 1 then $ widget_control,bad_id=bbadid,bbase if state.objtra.ne3pltstatus eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.objtra.ne3pltbadid = bbadid ne3base = widget_base(/col,title=' 3-Ne PLOT ', $ EVENT_PRO='obj_ne3plt_eh') state.objtra.ne3pltbase = ne3base ne3base1 = widget_base(ne3base,row=1) wprint = widget_button(ne3base1, value='Print',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='NE3PRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='NE3PRINTGIF') ne3pltprint = widget_button(ne3base1, $ value='Close',uvalue='NE3CLOSE') infile_ne=strarr(3) infile_ne(0)=' ' infile_ne(0)=PICKFILE(/read, filter = 'ne_prof*.dat', $ title='Entry in the first file') if infile_ne(0) eq '' then goto, oskipne3plot infile_ne(0)=strtrim(infile_ne(0),2) print,infile_ne(0) tpos=rstrpos(infile_ne(0),'/') tdir=strmid(infile_ne(0),0,tpos+1) infile_ne(1)=' ' infile_ne(1)=PICKFILE(/read, filter=tdir+'ne_prof*.dat', $ title='Entry in the second file') if infile_ne(1) eq '' then goto, oskipne3plot infile_ne(1)=strtrim(infile_ne(1),2) print,infile_ne(1) tpos=rstrpos(infile_ne(1),'/') tdir=strmid(infile_ne(1),0,tpos+1) infile_ne(2)=' ' infile_ne(2)=PICKFILE(/read, filter=tdir+'ne_prof*.dat', $ title='Entry in the third file') if infile_ne(2) eq '' then goto, oskipne3plot infile_ne(2)=strtrim(infile_ne(2),2) print,infile_ne(2) pos = rstrpos(infile_ne(0),'/') psfile='ne3_prof_' + strmid(infile_ne(0),pos+9,16)+'.ps' psfile = tdir + psfile widget_control,state.lasttext,set_value=psfile ne3field=lonarr(6) ne3field(1) = cw_field(ne3base1,title=' outfile:', $ value=psfile, xsize=70, /string) ne3base2 = widget_base(ne3base,row=1) ne3field(2) = cw_field(ne3base2,title='Ne(min):', $ value=1.0e2, xsize=12, /float) ne3field(3) = cw_field(ne3base2,title='Ne(max):', $ value=1.0e7, xsize=12, /float) ne3field(4) = cw_field(ne3base2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 ne3field(5) = cw_field(ne3base2,title='Alt(max):', $ value=altval, xsize=6, /float) ne3pltclose = widget_button(ne3base2, $ value='Re-size',uvalue='NE3RESIZE') ne3base3 = widget_base(ne3base,row=1) ne3pltdraw=lonarr(2) ne3pltdraw(1) = WIDGET_DRAW(ne3base3, $ graphics_level = 2, $ uvalue='ne3draw', $ /expose_events, $ XSIZE = 800, YSIZE = 400) widget_control,ne3base,/realize ;---------------------------------------------------------------------- ; retrieve the object window ID from the draw area ID widget_control,ne3pltdraw(1), get_value=oWindow ; render the graphics in the draw widget ;oWindow -> Draw, state.objtra.oViewNe3 state.objtra.ne3pltstatus = 1 state.objtra.ne3field = ne3field state.objtra.ne3pltdraw = ne3pltdraw state.objtra.infile_ne = infile_ne ; state.objtra.oViewNe3-> remove,state.objtra.oModelNe3 obj_destroy,state.objtra.oViewNe3 state.objtra.oViewNe3 = obj_new('IDLgrView', $ location = [0,0], $ dimension = [0,0], $ viewplane_rect = [-0.75,-0.90,1.5,1.5], $ zclip=[1,-1], $ units=0, $ color=[255,255,255]) state.objtra.oModelNe3 = obj_new('IDLgrModel') state.objtra.oViewNe3 -> add,state.objtra.oModelNe3 obj_Ne3_plot,state,0,oModel=state.objtra.oModelNe3 oWindow -> Draw,state.objtra.oViewNe3 widget_control,ne3base, set_uvalue = state oskipne3plot : endcase 'oNEmPLOT' : begin bbadid = state.objtra.nempltbadid bbase = state.objtra.nempltbase if state.objtra.nempltstatus eq 1 then $ widget_control,bad_id=bbadid,bbase if state.objtra.nempltstatus eq 1 and bbadid eq 0 then $ widget_control,bbase,/destroy state.objtra.nempltbadid = bbadid nembase = widget_base(/col, $ title=' mult-NE PLOT ',EVENT_PRO='obj_nemplt_eh') state.objtra.nempltbase = nembase nembase1 = widget_base(nembase,row=1) wprint = widget_button(nembase1, $ value='Print',uvalue='NEmPRINT',/menu) wprint1 = widget_button(wprint, $ value='Print PostScript (.ps)',uvalue='NEmPRINTPS') wprint2 = widget_button(wprint, $ value='Print GIF (.gif)',uvalue='NEmPRINTGIF') nempltprint = widget_button(nembase1, $ value='Close',uvalue='NEmCLOSE') infile_nem=strarr(100) checkfile = 'hello' fcount = -1 tdir = '' while checkfile ne '' do begin fcount=fcount+1 if fcount eq 1 then begin tpos=rstrpos(infile_nem(0),'/') tdir=strmid(infile_nem(0),0,tpos+1) endif if fcount lt 100 then begin infile_nem(fcount)=' ' infile_nem(fcount)=PICKFILE(/read, filter=tdir+'ne_prof*.dat', $ title='Entry in file') infile_nem(fcount)=strtrim(infile_nem(fcount),2) print,infile_nem(fcount) checkfile=infile_nem(fcount) endif else checkfile = '' endwhile if fcount le 0 then goto, oskipnemplot infile_nem=infile_nem[0:fcount-1] pos = rstrpos(infile_nem(0),'/') psfile='nem_prof_' + strmid(infile_nem(0),pos+9,16)+'.ps' psfile = tdir + psfile nemfield=lonarr(6) nemfield(1) = cw_field(nembase1,title=' outfile:', $ value=psfile, xsize=70, /string) nembase2 = widget_base(nembase,row=1) nemfield(2) = cw_field(nembase2,title='Ne(min):', $ value=1.0e2, xsize=12, /float) nemfield(3) = cw_field(nembase2,title='Ne(max):', $ value=1.0e7, xsize=12, /float) nemfield(4) = cw_field(nembase2,title='Alt(min):', $ value=0.0, xsize=6, /float) altval = 3500.0 if state.iono.satellite eq 'I2' then altval = 1500.0 nemfield(5) = cw_field(nembase2,title='Alt(max):', $ value=altval, xsize=6, /float) nempltclose = widget_button(nembase2, $ value='Re-size',uvalue='NEmRESIZE') nembase3 = widget_base(nembase,row=1) nempltdraw=lonarr(2) nempltdraw(1) = WIDGET_DRAW(nembase3, $ graphics_level = 2, $ uvalue='nemdraw', $ /expose_events, $ XSIZE = 800, YSIZE = 400) widget_control,nembase,/realize ;---------------------------------------------------------------------- ; retrieve the object window ID from the draw area ID widget_control,nempltdraw(1), get_value=oWindow ; render the graphics in the draw widget ;oWindow -> Draw, state.objtra.oViewNem state.objtra.nempltstatus = 1 state.objtra.nemfield = nemfield state.objtra.nempltdraw = nempltdraw state.objtra.infile_nem = infile_nem state.objtra.nemfiles = fcount ;state.objtra.oViewNem-> remove,state.objtra.oModelNem obj_destroy,state.objtra.oViewNem state.objtra.oViewNem = obj_new('IDLgrView', $ location = [0,0], $ dimension = [0,0], $ viewplane_rect = [-0.75,-0.90,1.5,1.5], $ zclip=[1,-1], $ units=0, $ color=[255,255,255]) state.objtra.oModelNem = obj_new('IDLgrModel') state.objtra.oViewNem -> add,state.objtra.oModelNem obj_Nem_plot,state,0,oModel=state.objtra.oModelNem oWindow -> Draw,state.objtra.oViewNem widget_control,nembase, set_uvalue = state oskipnemplot: endcase ;======================================================================== else : endcase if(widget_info(event.top,/valid)) then $ widget_control,event.top,set_uvalue=state return end