Home > matutils > interf > astack_scale.m

astack_scale

PURPOSE ^

imgsc=astack_scale(img,sfs)

SYNOPSIS ^

function imgsc=astack_scale(img,sfs)

DESCRIPTION ^

 imgsc=astack_scale(img,sfs)

 Scale a stack of images according to a list of scale factors

 Used to convert from uK to Jy/Sr in which case
 sfs=1e-6*1e26*2*k*nu^2/c^2

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function imgsc=astack_scale(img,sfs)
0002 % imgsc=astack_scale(img,sfs)
0003 %
0004 % Scale a stack of images according to a list of scale factors
0005 %
0006 % Used to convert from uK to Jy/Sr in which case
0007 % sfs=1e-6*1e26*2*k*nu^2/c^2
0008 
0009 if(size(img,3)==1)
0010   img=repmat(img,[1,1,prod(size(sfs))]);
0011 end
0012 
0013 for i=1:size(img,3)
0014   imgsc(:,:,i)=img(:,:,i)*sfs(i);
0015 end

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