rvalues = np.concatenate((np.zeros(1),np.logspace(np.log10(rmin),np.log10(rmax),nb)))
camblib = ic.rcamblib(rvalues, lmaxcamb)
FitsArray(camblib[0], copy=False).save('camblib600_ell.fits')
FitsArray(camblib[1], copy=False).save('camblib600_r.fits')
FitsArray(camblib[2], copy=False).save('camblib600_cl.fits')
### Restore it
ellcamblib = FitsArray('camblib600_ell.fits')
rcamblib = FitsArray('camblib600_r.fits')
clcamblib = FitsArray('camblib600_cl.fits')
camblib = [ellcamblib, rcamblib, clcamblib]


###### Nice plots
lmax = 600
lll = linspace(0,lmax,lmax+1)
cl150x150 = db.get_ClBB_cross_th(lll, 150, freqGHz2=150, dustParams = None, rvalue=0.05, camblib=camblib)
cl150x220 = db.get_ClBB_cross_th(lll, 150, freqGHz2=220, dustParams = None, rvalue=0.05, camblib=camblib)
cl150x353 = db.get_ClBB_cross_th(lll, 150, freqGHz2=353, dustParams = None, rvalue=0.05, camblib=camblib)
cl220x220 = db.get_ClBB_cross_th(lll, 220, freqGHz2=220, dustParams = None, rvalue=0.05, camblib=camblib)
cl220x353 = db.get_ClBB_cross_th(lll, 220, freqGHz2=353, dustParams = None, rvalue=0.05, camblib=camblib)
cl353x353 = db.get_ClBB_cross_th(lll, 353, freqGHz2=353, dustParams = None, rvalue=0.05, camblib=camblib)

fact = lll*(lll+1)/(2*np.pi)

clf()
yscale('log')
xscale('log')
xlim(10,lmax)
ylim(0.001,100)
xlabel('$\ell$')
ylabel('$\ell(\ell+1)C_\ell / 2\pi \,\,[\mu K^2]$')
Beispiel #2
0
ncross = np.int(len(freqs) + len(freqs)*(len(freqs)-1)/2)
col = get_cmap('jet')(np.linspace(0, 1.0, ncross)[::-1])

r=0.05
dldust_80_353 = 13.4
alphadust = -2.42
betadust = 1.59
Tdust = 19.6
params = [dldust_80_353, alphadust, betadust, Tdust]
allspec = []
allfreqs = []
for i in np.arange(len(freqs)):
	for j in np.arange(i, len(freqs)):
		thecross = np.str(freqs[i])+'x'+np.str(freqs[j])
		print('Doing '+thecross)
		spec = db.get_ClBB_cross_th(ell, freqs[i], freqGHz2=freqs[j], rvalue=r, dustParams=params)
		allspec.append(spec)
		allfreqs.append(thecross)

clf()
yscale('log')
xscale('log')
xlim(10,500)
ylim(1e-4,100)
title('r = {0:3.2f}'.format(r))
xlabel('$\ell$')
ylabel(r'$\frac{\ell(\ell+1)}{2\pi}\,C_\ell$'+'    '+'$[\mu K^2]$ ')
for i in np.arange(len(allspec)):
	plot(ell, allspec[i][0] * fact, label = allfreqs[i], color=col[i])
	plot(ell, allspec[i][1] * fact, '--', color=col[i])
	plot(ell, allspec[i][2] * fact, ':', color=col[i])