def dust_model(DUST_I=50, DUST_Q=10 / 1.41, DUST_U=10 / 1.41, DUST_BETA=1.6, DUST_T=20.): dust_model = models.DustMBB(amp_I=rj2cmb(353e9, DUST_I), amp_Q=rj2cmb(353e9, DUST_Q), amp_U=rj2cmb(353e9, DUST_U), dust_beta=DUST_BETA, dust_T=DUST_T) return dust_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
import models from utils import rj2cmb DUST_I = 50. DUST_P = 5. / 1.41 # Define input models and their amplitudes/parameters dust_model = models.DustMBB( amp_I=rj2cmb(353e9, DUST_I), amp_Q=rj2cmb(353e9, DUST_P), amp_U=rj2cmb(353e9, DUST_P), dust_beta=1.6, dust_T=20. ) prob1mbb_model = models.ProbSingleMBB( amp_I=rj2cmb(353e9, DUST_I), amp_Q=rj2cmb(353e9, DUST_P), amp_U=rj2cmb(353e9, DUST_P), dust_beta=1.6, dust_T=20., sigma_beta=.2, sigma_temp=4. ) simple_dust_model = models.DustSimpleMBB( amp_I=rj2cmb(353e9, DUST_I), amp_Q=rj2cmb(353e9, DUST_P), amp_U=rj2cmb(353e9, DUST_P), dust_beta=1.6, dust_T=20. ) simple_dust_model_shifted = models.DustSimpleMBB( amp_I=rj2cmb(353e9, DUST_I), amp_Q=rj2cmb(353e9, DUST_P), amp_U=rj2cmb(353e9, DUST_P), dust_beta=1.7, dust_T=20. ) ame_model = models.AMEModel( amp_I=rj2cmb(30e9, 30.),
numin_vals = [15., 20., 25., 30., 35., 40.] numax_vals = [300., 400., 500., 600., 700., 800.] #numin_vals = [5., 10., 20., 30., 40., 50., 60., 70.] #numax_vals = [200., 300., 400., 500., 600., 700.] #numin_vals = [5., ] #10., 20., 30., 40., 50., 60., 70.] #numax_vals = [700.,] # 300., 400., 500., 600., 700.] # Temperature/polarisation noise rms for all bands, as a fraction of T_cmb fsigma_T = 1. #0.01 fsigma_P = 2. #0.01 # Define input models and their amplitudes/parameters #dust_model = models.DustMBB(amp_I=150., amp_Q=10., amp_U=10., dust_beta=1.6, dust_T=20.) dust_model = models.DustMBB( amp_I=rj2cmb(353e9, 150.), amp_Q=rj2cmb(353e9, 10.), amp_U=rj2cmb(353e9, 10.), dust_beta=1.6, dust_T=20. ) sync_model = models.SyncPow( amp_I=30., amp_Q=10., amp_U=10., sync_beta=-3.2 ) cmb_model = models.CMB( amp_I=50., amp_Q=0.6, amp_U=0.6 ) name_in = "MBBSync" #name_in = "SimpleMBBSync" mods_in = [cmb_model, dust_model, sync_model] #mods_in = [sync_model, cmb_model] amps_in = np.array([m.amps() for m in mods_in]) params_in = np.array([m.params() for m in mods_in]) # Define models to use for the fitting name_fit = "MBBSync" #name_fit = "SimpleMBBSync" mods_fit = [cmb_model, dust_model, sync_model]