Home > src > main > matlab > s2let_hpx_read_real_spin_maps.m

s2let_hpx_read_real_spin_maps

PURPOSE ^

s2let_hpx_read_real_spin_maps

SYNOPSIS ^

function [fQ, fU, nside]= s2let_hpx_read_real_spin_maps(file)

DESCRIPTION ^

 s2let_hpx_read_real_spin_maps 
 Read an MW real map from a FITS file
 Default usage :

   [fQ, fU, nside]= s2let_hpx_read_real_spin_maps(file)

 file the name of the input FITS file,
 healpixmap the output signal read from the file,
 nside its resolution.

 S2LET package to perform Wavelets transform on the Sphere.
 Copyright (C) 2012-2015  Boris Leistedt & Jason McEwen
 See LICENSE.txt for license details

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [fQ, fU, nside]= s2let_hpx_read_real_spin_maps(file)
0002 
0003 % s2let_hpx_read_real_spin_maps
0004 % Read an MW real map from a FITS file
0005 % Default usage :
0006 %
0007 %   [fQ, fU, nside]= s2let_hpx_read_real_spin_maps(file)
0008 %
0009 % file the name of the input FITS file,
0010 % healpixmap the output signal read from the file,
0011 % nside its resolution.
0012 %
0013 % S2LET package to perform Wavelets transform on the Sphere.
0014 % Copyright (C) 2012-2015  Boris Leistedt & Jason McEwen
0015 % See LICENSE.txt for license details
0016 
0017 
0018 datacell = fitsread(file,'binarytable');
0019 
0020 data = datacell{1};
0021 sz = size(data);
0022 fQ = [];
0023 for col = 1:sz(1)
0024     fQ = [fQ data(col,:)];
0025 end
0026 data = datacell{2};
0027 sz = size(data);
0028 fU = [];
0029 for col = 1:sz(1)
0030     fU = [fU data(col,:)];
0031 end
0032 
0033 nside = sqrt((sz(1) * sz(2)) / 12);
0034 
0035 end

Generated on Fri 11-Nov-2016 11:50:36 by m2html © 2005