Example #1
0
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
Example #2
0
def hd_fe_model(DUST_I=50,
                DUST_Q=10 / 1.41,
                DUST_U=10 / 1.41,
                FCAR_IN=1.e3,
                FSILFE_IN=1.e3,
                UVAL_IN=0.0):
    hd_fe_model = models.DustHD(amp_I=rj2cmb(353e9, DUST_I),
                                amp_Q=rj2cmb(353e9, DUST_Q),
                                amp_U=rj2cmb(353e9, DUST_U),
                                fcar=FCAR_IN,
                                fsilfe=FSILFE_IN,
                                uval=UVAL_IN)
    return hd_fe_model
Example #3
0
def two_comp_silcar_model(DUST_I=50,
                          DUST_Q=10 / 1.41,
                          DUST_U=10 / 1.41,
                          DUST_BETA=1.6,
                          DUST_DBETA=0.2,
                          DUST_T1=18.,
                          DUST_T2=22.,
                          DUST_fI=0.25,
                          DUST_fQ=0.25,
                          DUST_fU=0.25):
    two_comp_silcar_model = models.DustGen(
        amp_I=rj2cmb(353e9, DUST_I),  #/ ( 1 + DUST_fI ) ), 
        amp_Q=rj2cmb(353e9, DUST_Q),  #/ ( 1 + DUST_fQ ) ),
        amp_U=rj2cmb(353e9, DUST_U),  #/ ( 1 + DUST_fU ) ),
        beta=DUST_BETA,
        dbeta=DUST_DBETA,
        Td1=DUST_T1,
        Td2=DUST_T2,
        fI=DUST_fI,
        fQ=DUST_fQ,
        fU=DUST_fU)
    return two_comp_silcar_model
Example #4
0
def ff_model(FF_I=30, FF_Q=0, FF_U=0, FF_BETA=-0.118):
    ff_model = models.FreeFreeUnpol(amp_I=rj2cmb(30e9, FF_I),
                                    amp_Q=rj2cmb(30e9, FF_Q),
                                    amp_U=rj2cmb(30e9, FF_U),
                                    ff_beta=FF_BETA)
    return ff_model
Example #5
0
def sync_model(SYNC_I=30, SYNC_Q=10, SYNC_U=10, SYNC_BETA=-3.2):
    sync_model = models.SyncPow(amp_I=rj2cmb(30e9, SYNC_I),
                                amp_Q=rj2cmb(30e9, SYNC_Q),
                                amp_U=rj2cmb(30e9, SYNC_U),
                                sync_beta=SYNC_BETA)
    return sync_model
Example #6
0
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.),
Example #7
0
np.random.seed(SEED)

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"
print "hello!"

mean_beta = 1.6
mean_temp = 20.
sigma_beta = .2
sigma_temp = 4.

pMBB_broad = model_list.prob1mbb_model
sMBB = model_list.dust_model
cmb = model_list.cmb_model
sync = model_list.sync_model

DUST_I = 50.
DUST_P = 5. / 1.41
amp_I=rj2cmb(353e9, DUST_I)
amp_Q=rj2cmb(353e9, DUST_P)
amp_U=rj2cmb(353e9, DUST_P)

pMBB_narrow = 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=.1 * sigma_beta, sigma_temp=.1 * sigma_temp)

nu_pico = np.asarray([21,25,30, 36.0,43.2,51.8,62.2,74.6,89.6,
                      107.5,129.0,154.8,185.8,222.9,267.5,321.0,
                      385.2,462.2,554.7,665.6,798.7]) * 1e9

models_sMBB = [sMBB, cmb, sync]
models_pMBB_broad = [pMBB_broad, cmb, sync]