'tensor_index':-rvalue/8} rvalues = [0.01,0.05, 0.1, 0.2] allder = [] allbasic_spec = [] for rr in rvalues: ################# satellites pars = {'tensor_ratio':rr, 'tensor_index':-0.025, 'lensing_residual':1, 'scalar_index':0.9624} varnames = {'tensor_ratio':'$r$', 'tensor_index':'$n_T$', 'lensing_residual':'$a_L$', 'scalar_index':'$n_S$'} fsky=0.01 mukarcminT=1 fwhmdeg=0.1 fm, basic_spec, der, lcenter, data, error = CMBspectra.fisher_analysis(pars, fsky, mukarcminT, fwhmdeg, deltal=25) nbins=len(data)/4 noT=False noE=False noTE=False allder.append(der) allbasic_spec.append(basic_spec) fm_nsr_lrs = [] fm_nsr_stage4 = [] fm_nsr_lrs_stage4 = [] fm_nsr_hrs = [] fm_nsr_hrsplus = []
Omegac = omegac/h2 rvalue = 0.1 print 'Omegab = ',omegab/h2,'Omegam = ',(omegac+omegab)/h2,'Omegav = ',omegav/h2 params = {'H0':H0,'omegab':Omegab,'omegac':Omegac,'omegak':0,'scalar_index':0.9624, 'reion__use_optical_depth':True,'reion__optical_depth':0.0925, 'tensor_ratio':rvalue,'WantTensors':True,'scalar_amp':scalar_amp,'DoLensing':False, 'tensor_index':-rvalue/8} ################## First run to calculate derivatives fsky = 384/41000 mukarcminT = 87/1000*60 fwhmdeg = 0.52 pars = {'tensor_ratio':0.2, 'tensor_index':-0.025, 'lensing_residual':1, 'scalar_index':0.9624} varnames = {'tensor_ratio':'$r$', 'tensor_index':'$n_T$', 'lensing_residual':'$a_L$', 'scalar_index':'$n_S$'} fm, basic_spec, der, lcenter, data, error = CMBspectra.fisher_analysis(pars, fsky, mukarcminT, fwhmdeg, deltal=25) clf() nbins = len(data)/4 yscale('log') ylim(1e-4,1e4) #xlim(0,np.max(lmax[mask])) plot(basic_spec[0], basic_spec[1],'k', lw=2) plot(basic_spec[0], basic_spec[2],'g', lw=2) plot(basic_spec[0], np.abs(basic_spec[3]),'b', lw=2) plot(basic_spec[0], basic_spec[4],'m', lw=2) plot(basic_spec[0], basic_spec[5],'y', lw=2) plot(basic_spec[0], basic_spec[4]+pars['lensing_residual']*basic_spec[5],'r', lw=2) errorbar(lcenter, data[0*nbins:1*nbins], yerr=error[0*nbins:1*nbins], fmt='ko', alpha=0.6) errorbar(lcenter, data[1*nbins:2*nbins], yerr=error[1*nbins:2*nbins], fmt='go', alpha=0.6) errorbar(lcenter, np.abs(data[2*nbins:3*nbins]), yerr=error[2*nbins:3*nbins], fmt='bo', alpha=0.6)