mos=mosaic_map(ad,ads,p,beam,uvcut) Make mosaic map by linear addition of individual dirty maps Called linear mosaicing. e.g. eqn 9&10 in astro-ph/0205388 or eqn 20-2 in SIIRA. ad is big grid ads is per point grid beam is stack of primary beams one per band uvcut is uvr cut range
0001 function mos=mosaic_map(ad,ads,p,beam,uvcut) 0002 % mos=mosaic_map(ad,ads,p,beam,uvcut) 0003 % 0004 % Make mosaic map by linear addition of individual dirty maps 0005 % Called linear mosaicing. e.g. eqn 9&10 in astro-ph/0205388 0006 % or eqn 20-2 in SIIRA. 0007 % 0008 % ad is big grid 0009 % ads is per point grid 0010 % beam is stack of primary beams one per band 0011 % uvcut is uvr cut range 0012 0013 if(~exist('uvcut')) 0014 uvcut=[0,Inf]; 0015 end 0016 0017 % Take the mean beam to unfold with - in principle one could 0018 % make a dmap for each band separately and unfold band by band... 0019 beam=mean(beam,3); 0020 0021 % Generate individual maps 0022 a=zeros(ad.N_pix); b=a; 0023 for i=1:length(p.px) 0024 i 0025 % Filter vis 0026 uvr=pyth(p.u{i},p.v{i}); 0027 ind=uvr>uvcut(1)&uvr<uvcut(2); 0028 0029 % Make dirty map 0030 tic 0031 [dmap,s]=difmap(ads,p.u{i}(ind),p.v{i}(ind),p.vis{i}(ind),p.var{i}(ind)); 0032 toc 0033 0034 % Shift dmap and beam to pointing center 0035 x=ads.x+p.px(i); y=ads.y+p.py(i); 0036 tic 0037 sdmap=interp2(x,y,dmap,ad.x,ad.y); sdmap(isnan(sdmap))=0; 0038 sbeam=interp2(x,y,beam,ad.x,ad.y); sbeam(isnan(sbeam))=0; 0039 toc 0040 0041 % Acculmulate arrays to make mosaic map 0042 a=a+sbeam.^2./s; 0043 b=b+sbeam.*sdmap./s; 0044 end 0045 0046 % Calculate noise and signal maps 0047 mos.noise=sqrt(1./a); 0048 mos.signal=b./a; 0049 0050 % calc "significance image" 0051 mos.sigma=mos.signal./mos.noise; 0052 0053 return