pro model_vis,map,u,v,mvis,xyint,help=help if keyword_set(help) then begin print,'PURPOSE: ' print,' Compute model visibility arrays from MEM maps generated by MEM_NJIT' print,'HELP: ' print,' pro model_vis,map,u,v,mvis,xyint' print,' inputs: map (map/array produced by MEM_NJIT, i.e. image.map)' print,' u,v (u and v arrays, outputs from mem_map.pro)' print,' xyint (spatial scale, arcsec/pixel used in MEM_NJIT)' print,' outputs:mvis (model visibility complex array)' print,'AUTHOR:' print,' Rick Pernak, Goddard Space Flight Center' return endif ;map=shift(map,4,0) dim = size(map,/dimensions) n = dim[0] ;number of pixels, assumed to be a square map, so dim[0]=dim[1] i = complex(0,1) u_new = u/206265. ;converted to inverse radians in mem_map v_new = v/206265. ;converting back to inverse arcsec half = n/2 ;half of the map, for centering purposes flux_arr = dblarr(128,128) for ctrx = 0,(n-1) do begin ;'counter x', moving in x direction x = (ctrx+1)-(half+1) for ctry = 0,(n-1) do begin; 'counter y', moving in y direction y = (ctry+1)-(half+1) flux = map[ctrx,ctry] if (ctrx eq 0) and (ctry eq 0) then begin mvis = flux * exp(2*!pi*i*(u_new*(xyint*x)+v_new*(xyint*x))) endif else begin mvis = mvis + (flux * exp(2*!pi*i*(u_new*(xyint*x)+v_new*(xyint*y)))) endelse endfor endfor return end