Home > matutils > interf > mosaic_map2.m

mosaic_map2

PURPOSE ^

mos=mosaic_map2(ad,ads,p,beam,uvcut)

SYNOPSIS ^

function mos=mosaic_map2(ad,ads,p,beam,uvcut)

DESCRIPTION ^

 mos=mosaic_map2(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.

 Alternate version doing dmap shift by
 manipulating visibility phase.

 ad is big grid
 ads is per point grid
 beam is stack of primary beams one per band
 uvcut is uvr cut range

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mos=mosaic_map2(ad,ads,p,beam,uvcut)
0002 % mos=mosaic_map2(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 % Alternate version doing dmap shift by
0009 % manipulating visibility phase.
0010 %
0011 % ad is big grid
0012 % ads is per point grid
0013 % beam is stack of primary beams one per band
0014 % uvcut is uvr cut range
0015 
0016 if(~exist('uvcut'))
0017   uvcut=[0,Inf];
0018 end
0019 
0020 % Take the mean beam to unfold with - in principle one could
0021 % make a dmap for each band separately and unfold band by band...
0022 beam=mean(beam,3);
0023 
0024 % Generate individual maps
0025 a=zeros(ad.N_pix); b=a;
0026 for i=1:length(p.px)
0027   i
0028   % Filter vis
0029   uvr=pyth(p.u{i},p.v{i});
0030   ind=uvr>uvcut(1)&uvr<uvcut(2);
0031   
0032   tic
0033   % Shift phase center
0034   % Cross product of phase center position and baseline vectors
0035   x=2*pi*(p.u{i}(ind)*p.px(i)*pi/180+p.v{i}(ind)*p.py(i)*pi/180);
0036   svis=p.vis{i}(ind).*complex(cos(x),sin(x));
0037   
0038   % Make dirty map
0039   [dmap,s]=difmap(ad,p.u{i}(ind),p.v{i}(ind),svis,p.var{i}(ind));
0040   toc
0041   
0042   % Shift beam only to pointing center - dmap already shifted
0043   x=ads.x+p.px(i); y=ads.y+p.py(i);
0044   tic
0045   sbeam=interp2(x,y,beam,ad.x,ad.y); sbeam(isnan(sbeam))=0;
0046   toc
0047   
0048   % Acculmulate arrays to make mosaic map
0049   a=a+sbeam.^2./s;
0050   b=b+sbeam.*dmap./s;
0051 end
0052 
0053 % Calculate noise and signal maps
0054 mos.noise=sqrt(1./a);
0055 mos.signal=b./a;
0056 
0057 % calc "significance image"
0058 mos.sigma=mos.signal./mos.noise;
0059 
0060 return

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005