;- ;NAME: ;imgdisplay2: update the display from displayimg1 ;SYNTAX: istat=imgdisplay1(imgI,) ; display the image ;ARGS: ; imgI: {} returned from displayim1 ; ;KEYWORDS: ; verb : if set print what we are doing ; lmainc : if set label the main cables ; caxis : if set config axis ; laxis : if set label the axis ; ccolorb: if set config color bar ; lextra : if set label extra strings on the right side ; center[3]:dbl center used for fit.. always in meters ; ; cbtit : string color bar title. def: "radial errors [cm]" ;RETURNS: ; istat : 0 - ok ; -1 - error ;DESCRIPTION: ; Update the display generated by displayimg1 ;- function displayimg2,imgI,lmainc=lmainc,caxis=caxis,laxis=laxis,ccolorb=ccolorb,lextra=lextra,$ cbtit=cbtit,lmaxerr=lmaxerr,center=center,verb=verb istat=0 (imgI.imgRef)->RefreshCurrentWindow if n_elements(lmainc) eq 0 then lmainc=0 if n_elements(caxis) eq 0 then caxis=0 if n_elements(laxis) eq 0 then laxis=0 if n_elements(lextra) eq 0 then lextra=0 if n_elements(ccolorb) eq 0 then ccolorb=0 if n_elements(cbtit) eq 0 then cbtit='radial errors [cm]' if n_elements(lmaxerr) eq 0 then lmaxerr='5cm' if n_elements(center) ne 3 then center=[0.0213d,0.0202d,264.4778d] ftom=.3048d scl=1d if imgI.meters then scl=ftom ; for title font_size=24 font_style=1 ; bold el='West' eR='East' radius=500.*scl ; ; configure the axis ; if caxis then begin (imgI.imgRef)->RefreshCurrentWindow if keyword_set(verb) then print,"Start axis config" tickdir=1 ; out ; for x,y ticklen=.03 for i=0,3 do begin &$ if i lt 2 then begin &$ isetproperty,imgI.axIdAr[i],font_size=font_size &$ isetproperty,imgI.axIdAr[i],font_style=font_style &$ isetproperty,imgI.axIdAr[i],tickdir=tickdir &$ endif else begin &$ isetproperty,imgI.axIdAr[i],tickdir=0 &$ endelse &$ isetproperty,imgI.axidar[i],ticklen=ticklen &$ ; isetproperty,axidar[i],major=majorticks &$ endfor imgI.axconfig=1 (imgI.imgRef)->RefreshCurrentWindow endif ; ; config the color bar ; if (ccolorb ne 0) then begin (imgI.imgRef)->RefreshCurrentWindow if keyword_set(verb) then print,"Start colorbar config" border=1 tickdir=1 ticklen=.2 subticklen=.4 orientation=1 ; verticaal textpos=1 ; right above isetproperty,imgI.cbId,orientation=orientation isetproperty,imgI.cbid,textpos=textpos isetproperty,imgI.cbId,font_size=font_size isetproperty,imgI.cbId,font_style=font_style isetproperty,imgI.cbId,border_on=1 isetproperty,imgI.cbId,tickdir=tickdir isetproperty,imgI.cbId,ticklen=ticklen isetproperty,imgI.cbId,subticklen=subticklen isetproperty,imgI.cbId,axis_title=cbtit imgI.cbconfig=1 (imgI.imgRef)->RefreshCurrentWindow ; ; label edges of final destination of color bar ; frac=.04*radius x= radius + 3.5*frac y=263.*scl text='below dish' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size y=-500*scl text='above dish' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size (imgI.imgRef)->RefreshCurrentWindow endif ; ; label the axis ; if (laxis ne 0) then begin (imgI.imgRef)->RefreshCurrentWindow if keyword_set(verb) then print,"Start label axis" frac=.04*radius text='East' x=radius + frac y=0 itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size text='Y [feet]' x=-radius - 6*frac y=0 itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size x= 0 - 3*frac y=-(radius + 4*frac) text='(West) X [feet] (East)' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size x=-1*frac y=radius + 1*frac text='North' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size (imgI.imgRef)->RefreshCurrentWindow endif ; ; lextra: ; if (lextra ne 0) then begin (imgI.imgRef)->RefreshCurrentWindow if keyword_set(verb) then print,"Start extra labels on right" frac=.04*radius yeps=(30/500.)*radius x=radius + frac y0=radius*.94 text='Radius Used: 265.176 [m]' itext,text,x,y0,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size ; y=y0-yeps ; cent set in doit center used text=string(format='("Center:[",f6.4,",",f6.4,",",f8.4,"m]")',center) itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size ; y=y0-2*yeps text='Keep points with error < ' + lmaxerr itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size ; y=y0-3*yeps text='Dark blue is no data' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size ; y=y0-4*yeps text='grid 2000x2000' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size ; y=y0-5*yeps text='inverseDistance with 40pnts' itext,text,x,y,target_identifier=imgI.imgid,/data,/visualization,identifier=txtid,font_style=font_style,font_size=font_size imgI.extratxt=1 (imgI.imgRef)->RefreshCurrentWindow endif ; ; label the main cables ; if (lmainc ne 0) then begin (imgI.imgRef)->RefreshCurrentWindow if keyword_set(verb) then print,"Start label main cables" nmain=dishtarmain(cblI,/tdonly) ok=intarr(nmain) for i=0,nmain-1 do ok[i]=strmid(cblI[i].nm,1,1) eq '0' ii=where( ok eq 1,cnt) ; ;now add the labels ; ctmp=cblI[ii] jj=sort(ctmp.xth) ctmp=ctmp[jj] y0=-240*scl yeps=15*scl fs=16 for i=0,cnt-1 do begin &$ x=ctmp[i].xth*scl &$ y=y0 - (i mod 2)*yeps &$ itext,ctmp[i].nm,x,y,target_identifier=imgI.imgid,/data,/visualization,font_style=font_style,font_size=fs &$ endfor (imgI.imgRef)->RefreshCurrentWindow endif return,istat end