Home > example_scripts > pipelined.m

pipelined

PURPOSE ^

function for use with the healpixing maps

SYNOPSIS ^

function d = pipelind(d,nside)

DESCRIPTION ^

function for use with the healpixing maps
d is the standard C-BASS data structure
nside is the Healpix nside resolution parameter
 CJC 1 June 2010
This function presents an example of how the data pipeline could be implemented:

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function d = pipelind(d,nside)
0002 %function for use with the healpixing maps
0003 %d is the standard C-BASS data structure
0004 %nside is the Healpix nside resolution parameter
0005 % CJC 1 June 2010
0006 %This function presents an example of how the data pipeline could be implemented:
0007     h = gov.fnal.eag.healpix.PixTools;
0008     
0009     npix= h.Nside2Npix(nside);
0010     
0011 
0012      [ta,A,G]=calculateAlpha(d);
0013      d=applyAlpha(d,ta,A,G)
0014      [r,A]=rFactorCorrection(d,1)
0015      d=calculateStokes(d,r);
0016      d = opacity(d);
0017      
0018      disp('Pixellating the data')
0019      %Change this to go between the C healpixing or the java healpixing
0020      %pixdatC for C implementation (FAST) and pixdat for the java
0021      %implementation (SLOW)
0022      d=pixdatC(d,nside);
0023      d=aveHealpix(d,nside);
0024     
0025    
0026     I  = d.antenna0.healpixDat(:,2);
0027     Q1 = d.antenna0.healpixDat(:,3);
0028     Q2 = d.antenna0.healpixDat(:,5);
0029     U1 = d.antenna0.healpixDat(:,4);
0030     U2 = d.antenna0.healpixDat(:,6);
0031     N_OBS = d.antenna0.healpixDat(:,14);
0032     sig_I = d.antenna0.healpixDat(:,8);
0033     sig_Q1 = d.antenna0.healpixDat(:,9);
0034     sig_Q2 = d.antenna0.healpixDat(:,11);
0035     sig_U1 =  d.antenna0.healpixDat(:,10);
0036     sig_U2 = d.antenna0.healpixDat(:,12);
0037     d.antenna0.writeHealpixDat= [I Q1 Q2 U1 U2 N_OBS sig_I sig_Q1 sig_Q1 sig_U1 sig_U2];
0038      %unix('rm filename.fits');
0039     %cbass_write_image('filename.fits',[I Q1 Q2 U1 U2 N_OBS],nside,npix,'start','stop');
0040     
0041 return

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