pro mem_map,hsi,vis_out,u_out,v_out,image_struct,mem_struct ; PURPOSE ; Ingests a RHESSI structure containing visibility, u, and v arrays. ; Creates new u, v, and visibility arrays based on the number of ; collimators the user wants to use. The program also automatically ; calls MEM_NJIT, which creates a map. Finally, another program is ; called to form a plot suitable for presentation. ; ; INPUTS ; hsi = RHESSI structure, courtesy of Ed Schmahl ; ; OUTPUTS ; u_out, v_out = coordinates in Fourier plane ; vis_out = complex visibilities at the above coordinates ; image_struct = structure produced by MEM NJIT ; mem_struct = structure of MEM NJIT parameters ; ; CALLING EXAMPLE ; From IDL command line, restore .sav file from newvis_test1 (creates the vis ; structure). set vis = out.vis ; mem_map,vis,vis1,u,v,image,params ; ; Rick Pernak, Goddard Space Flight Center ;isc: index of subcollimator read,isc_start,prompt='Please enter starting collimator (0-8): ' read,isc_end,prompt='Please enter ending collimator (0-8): ' ;make u,v, and vis arrays for isc_ctr = isc_start,isc_end do begin good = where((hsi.isc) eq isc_ctr,n) if (isc_ctr eq isc_start) then begin u_out = hsi(good).u * 206265. v_out = hsi(good).v * 206265. vis_out = hsi(good).obsvis good2 = where(u_out gt 0,n2) u_out = u_out[good2] v_out = v_out[good2] vis_out = vis_out[good2] endif else begin u_out = [u_out,hsi(good).u * 206265.] v_out = [v_out,hsi(good).v * 206265.] vis_out = [vis_out,hsi(good).obsvis] good2 = where(u_out gt 0,n2) u_out = u_out[good2] v_out = v_out[good2] vis_out = vis_out[good2] endelse endfor xyoff = hsi[0].xyoffset help,u_out,v_out,vis_out window,0 !p.multi = [0,2,2,0,0] plot,u_out,v_out,psym=3,title='u vs. v' plot,vis_out,title='visibilities' plot,abs(vis_out),title='abs(vis)' plot,float(vis_out),title='real vs. imag. part of visibility' oplot,imaginary(vis_out),psym=-5 !p.multi = 0 flux = max(abs(vis_out)) print,'Flux = ',flux read,my_xyint,prompt='What is the value for xyint?: ' xyint = double(my_xyint) ;call MEM NJIT to make visibility map image_struct = mem_njit(vis_out,u_out,v_out,flux=flux,svis=.5*abs(vis_out),imsiz=128,pixel_size=xyint) ;make contour maps make_vis_plot,image_struct.map,isc_start,isc_end,flux,xyint,xyoff,mem_struct return end