mock data in all_l_exact data format
Posted: July 15 2008
I have created all_l exact mock data, using the sample code I found in this forum.
I keep getting the following errors, when I use the mock data:
cmbdata.f90::ReadAllExact: wrong number of columns
When I checked the variablen ncols of cmbdata.F90. it says 1, while it is supposed to be 7 (l Cl_TT Cl_TE Cl_EE N_T N_P f_sky).
The num_cls in cmbtypes.f90 is set to 3.
I used the sample code found in the threads 'all_l exact data format' without change and added the following header.
name = Planck
has_pol = T
all_l_exact=T
all_l_file = data/Planck.dat
all_l_lmax=3000
The code I copied is as follows:
Jaiseung
I keep getting the following errors, when I use the mock data:
cmbdata.f90::ReadAllExact: wrong number of columns
When I checked the variablen ncols of cmbdata.F90. it says 1, while it is supposed to be 7 (l Cl_TT Cl_TE Cl_EE N_T N_P f_sky).
The num_cls in cmbtypes.f90 is set to 3.
I used the sample code found in the threads 'all_l exact data format' without change and added the following header.
name = Planck
has_pol = T
all_l_exact=T
all_l_file = data/Planck.dat
all_l_lmax=3000
The code I copied is as follows:
thanks,Antony Lewis wrote: Should be
Code: Select all
!Simulate CMB C_l data !Simple version assuming isotropic noise and full sky !no lensing, no tensors (check input Cl file has only 4 columns!) !all parameters hard wired in code !Data points are max likelihood values !AL: Sept 2004 program CMB_cl_sim use AMLutils implicit none !parameters character(LEN=*), parameter :: cl_infile = 'MAPcls.dat' character(LEN=*), parameter :: out_name = 'planck.dat' logical :: DoPol = .true., DoTemp = .true. real :: NoiseVar = 3d-4 !Pessimistic Planck !in MicroK^2 real, parameter :: fwhm_arcmin = 7. ! 13. !WMAP ~ 13 (0.22 deg min) real, parameter :: ENoiseFac = 2 !factor more noise on the polarization integer, parameter :: lmax = 2250 !Other stuff integer, parameter :: C_T = 1, C_E = 2, C_B = 3, C_C = 4 real :: fwhm_deg = fwhm_arcmin/60 real :: Cl(lmax,4), NoiseCl(lmax) real amp, xlc, sigma2 integer l,ll real T, E, TE,B, scal print *,'lmax = ',lmax print *,'fwhm_arcmin = ', fwhm_arcmin print *,'Noise = ',NoiseVar xlc= 180*sqrt(8.*log(2.))/3.14159 sigma2 = (fwhm_deg/xlc)**2 do l=2, lmax NoiseCl(l) = NoiseVar*exp(l*(l+1)*sigma2) end do Cl=0 B=0 open(unit=1,file=Cl_infile,form='formatted',status='old') do ll=2,lmax read (1,*) l, T, E, TE if (l/=ll) stop 'cl must start at l=2' scal=twopi/(l*(l+1)) Cl(l,1) = T*scal Cl(l,2) = E*scal Cl(l,3) = B*scal Cl(l,4) = TE*scal end do close(1) call CreateTxtFile(out_name,34) do l=2, lmax write (34,'(1I5,6E15.5)') l,(Cl(l,1)+NoiseCl(l)) , & (Cl(l,C_C)), & (Cl(l,C_E)+ENoiseFac*NoiseCl(l)), & ! (Cl(l,C_B)+ENoiseFac*NoiseCl(l)), & NoiseCl(l),ENoiseFac*NoiseCl(l), 1. end do close(34) end program CMB_cl_sim
Jaiseung