ame_model = models.AMEModel( amp_I=rj2cmb(30e9, 30.), amp_Q=rj2cmb(30e9, 0.), amp_U=rj2cmb(30e9, 0.), nu_peak=25. ) ff_model = models.FreeFreeUnpol( amp_I=rj2cmb(30e9, 30.), amp_Q=rj2cmb(30e9, 0.), amp_U=rj2cmb(30e9, 0.), ff_beta=-0.118 ) sync_model = models.SyncPow( amp_I=rj2cmb(30e9, 30.), amp_Q=rj2cmb(30e9, 10.), amp_U=rj2cmb(30e9, 10.), sync_beta=-1.2 ) cmb_model = models.CMB( amp_I=50., amp_Q=0.6, amp_U=0.6 ) # Silicate + Carbonaceous grains as 2 MBBs two_comp_silcar_model = models.DustGen( amp_I=rj2cmb(353e9, DUST_I/1.25), amp_Q=rj2cmb(353e9, DUST_P), amp_U=rj2cmb(353e9, DUST_P), beta = 1.6, dbeta = 0.2, Td1 = 15., Td2 = 24., fI = 0.25, fQ = 0., fU = 0. )
def cmb_model(CMB_I=50, CMB_Q=0.6, CMB_U=0.6): cmb_model = models.CMB(amp_I=CMB_I, amp_Q=CMB_Q, amp_U=CMB_U) return cmb_model
# Band parameter definitions nbands = 5 NPROC = 1 #4 #32 filename = "bands_log_%d.dat" % nbands numin_vals = [5., ] #10., 20., 30., 40., 50., 60., 70.] numax_vals = [200.,] # 300., 400., 500., 600., 700.] models_fit = np.array(['mbb', 'pow']) fsigma_T = 0.01 fsigma_P = 0.01 # Define input models and their amplitudes/parameters dust_model = models.DustMBB(amp_I=10., amp_Q=1., amp_U=1.2, dust_beta=1.6, dust_T=20.) sync_model = models.SyncPow(amp_I=10., amp_Q=2., amp_U=1.5, sync_beta=-3.) cmb_model = models.CMB(amp_I=100., amp_Q=10., amp_U=20.) mods = [dust_model, sync_model, cmb_model] models_in = [dust_model.model, sync_model.model] amps_in = np.array([m.amps() for m in mods]) params_in = np.array([m.params() for m in mods]) def bands_log(nu_min, nu_max, nbands): """ Logarithmic set of bands. """ freq_vec = np.arange(nbands) return nu_min * (nu_max/nu_min)**(freq_vec/(nbands-1.)) * 1e9 # in Hz def bands_3groups(nu_low, nu_mid, nu_high, sep_low, sep_mid, sep_high, nbands):