;- ;NAME: ;imgdisplay1: display gridded image of dish ;SYNTAX: imgid=imgdisplay1(img,xout,you,meters=meters) ; display the image ;ARGS: ; img[n,n]: float image ; xout[n] : float xcoord ; yout[n[ : float ycoord ; ;KEYWORDS: ; meters: if set then data is in meters ; title: str if supplied then title to use ; dmainc: if set then drawmain cables ; lmainc: if set then label main cables (requires dmainc) ;RETURNS: ; imgI : {} struct holding img info to be used in modifying it. ; { imgId : '', $ ; use to update ;DESCRIPTION: ; display the gridded data set img[n,n] of the dish. ;this is the first step, colorbar and labeling comes at the next step ;- function displayimg1,img,xout,yout,title=title,font_size=font_size ,dmainc=dmainc useMeters=keyword_set(meters) if n_elements(title) eq 0 then begin title='11mar20: radial errors (measured - fit) 3 param fit. Keep points < 5 cm error.' endif if n_elements(dmainc) eq 0 then dmainc=0 if n_elements(lmainc) eq 0 then lmainc=0 ftom=.3048d scl=1d if useMeters then scale=ftom current_zoom=.5 ; for title font_size=24 font_style=1 ; bold insert_colorbar=1 ; if [2] then bottom left corner of color bar (normalize coord). rgb_table=33; blue-red .. could be a 3,256 vector dlim=500*scl xrange=[-dlim,dlim] yrange=[-dlim,dlim] xtickunits='' tickunits='' xtickvalues=0 ytickvalues=0 xticklayout=0 yticklayout=0 el='West' eR='East' zoom_on_resize=1 view_zoom=.25 ; start low so we can see iimage,img,xout,yout,$ ; current_zoom=current_zoom,$ /zoom_on_resize,$ font_size=font_size,$ font_style=font_style,$ insert_colorbar=insert_colorbar,$ rgb_table=rgb_table,$ identifier=img4id,$ title=title,$ view_zoom=view_zoom,$ xrange=xrange,yrange=yrange,$ xtickvalues=xtickvalues,ytickvalues=ytickvalues,$ xtickunits=xtickunits,ytickunits=ytickunits,$ xticklayout=xticklayout,yticklayout=yticklayout imgid=igetid('image') val=igetcurrent(tool=imgref) imgI={imgId:imgId,$ imgref:imgref,$ cbId :igetid('colorbar') ,$ axisId:igetid("axes"),$ axIdAr:strarr(4),$ axOrder:"bltr",$ ; bottom top left right axConfig: 0,$ ; no config yet cbConfig: 0,$ ; colorbar not yet configed extraTxt: 0,$ ; extra text not yet written tit:title,$ dmainc:dmainc,$; 1 if drew main cables lmainc:lmainc,$; 1 if we labeled the main cables meters:useMeters} ; ; causes the tick marks to be drawn ; isetproperty,imgI.axisId,style=2 ; ; nm order: 0 : bottom ; 1 : top ; 2 : left ; 3 : right ; reorder to ; bottom,left,top ,right .. in our array indOrd=[0,2,1,3] for i=0,3 do begin nm=string(format='("Axis ",i1)',indOrd[i]) &$ imgI.axIdAr[i]=igetid(nm) &$ endfor ; ; draw the main cables ; if dmainc ne 0 then begin radius=500.*scl transparency=60 ls=0 ; solid line ; bombs using imgid oplotid=1 major=-1 xr=[-475,475.]*scl xstep=25*scl for ix=xr[0],xr[1],xstep do begin &$ thT=acos(ix/radius) &$ ymax=abs(sin(thT)*radius) &$ xx=[ix,ix] &$ yy=[-ymax,ymax] &$ iplot,xx,yy,overplot=oplotid,xmajor=major,ymajor=major,xgrid=6,ygrid=6,$ transparency=transparency,linestyle=ls &$ endfor endif return,imgI end