Exemplo n.º 1
0
def brcg(fname='taulikes_onechain_v1.dat', lmax=30, firstchain=None, 
        lastchain=None, firstsamp=None, lastsamp=None, 
        suffix='_ctp3_real10_hke_onechain_v2.fits', path=None, lmax_br=9, 
        lmax_comm=90):

    if lmax > lmax_br:
        brpi = fplcmod.Pluginfo('BR_MOD', lmin=2, lmax=lmax_br, numranges=1,
                        lranges=(2, lmax_br), rangetypes=('TT_TE_EE',),
                        sigmafile = 'sigma' + suffix,
                        firstchain=firstchain, lastchain=lastchain,
                        firstsamp=firstsamp, lastsamp=lastsamp)
        cgpi = fplcmod.Pluginfo('COMM_GAUSS', lmin=lmax_br + 1, lmax=lmax, 
                                spectra='TT_TE_EE',
                                clfile='cls' + suffix,
                                firstchain=firstchain, lastchain=lastchain,
                                firstsamp=firstsamp, lastsamp=lastsamp)
        pis = (brpi, cgpi)
    else:
        brpi = fplcmod.Pluginfo('BR_MOD', lmin=2, lmax=lmax, numranges=1,
                        lranges=(2, lmax), rangetypes=('TT_TE_EE', ), 
                        sigmafile='sigma' + suffix, firstchain=firstchain,
                        lastchain=lastchain, firstsamp=firstsamp, 
                        lastsamp=lastsamp)
        pis = (brpi,)
    if path is None:
        fplcmod.update_files(pis, lmax=lmax_comm)
    else:
        fplcmod.update_files(pis, path=path, lmax=lmax_comm)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 2
0
def brcg(fname='taulikes_brcg.dat', lmax=30):
    if lmax > 9:
        brpi = fplcmod.Pluginfo('BR_MOD',
                                lmin=2,
                                lmax=lmax,
                                numranges=2,
                                lranges=(2, 9, lmax),
                                rangetypes=('TT_TE_EE', 'TT'),
                                sigmafile='sigma_easysim_allless9.fits')
        cgpi = fplcmod.Pluginfo('COMM_GAUSS',
                                lmin=10,
                                lmax=30,
                                spectras='TE_EE',
                                clfile='cls_easysim_allless9.fits')
        pis = (brpi, cgpi)
    else:
        brpi = fplcmod.Pluginfo('BR_MOD',
                                lmin=2,
                                lmax=lmax,
                                numranges=1,
                                lranges=(2, lmax),
                                rangetypes=('TT_TE_EE', ))
        pis = (brpi, )
    fplcmod.update_files(pis)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 3
0
def analytic(fname='taulikes_an.dat', lmax=30, path=None, lmax_comm=90):
    anpi = fplcmod.Pluginfo('ANALYTIC', lmin=2, lmax=lmax)
    pis = (anpi,)
    if path is None:
        fplcmod.update_files(pis, lmax=lmax_comm)
    else:
        fplcmod.update_files(pis, path=path, lmax=lmax_comm)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 4
0
def analytic(fname='taulikes_an.dat', lmax=30, path=None, lmax_comm=90):
    anpi = fplcmod.Pluginfo('ANALYTIC', lmin=2, lmax=lmax)
    pis = (anpi, )
    if path is None:
        fplcmod.update_files(pis, lmax=lmax_comm)
    else:
        fplcmod.update_files(pis, path=path, lmax=lmax_comm)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 5
0
def brcg(fname='taulikes_onechain_v1.dat',
         lmax=30,
         firstchain=None,
         lastchain=None,
         firstsamp=None,
         lastsamp=None,
         suffix='_ctp3_real10_hke_onechain_v2.fits',
         path=None,
         lmax_br=9,
         lmax_comm=90):

    if lmax > lmax_br:
        brpi = fplcmod.Pluginfo('BR_MOD',
                                lmin=2,
                                lmax=lmax_br,
                                numranges=1,
                                lranges=(2, lmax_br),
                                rangetypes=('TT_TE_EE', ),
                                sigmafile='sigma' + suffix,
                                firstchain=firstchain,
                                lastchain=lastchain,
                                firstsamp=firstsamp,
                                lastsamp=lastsamp)
        cgpi = fplcmod.Pluginfo('COMM_GAUSS',
                                lmin=lmax_br + 1,
                                lmax=lmax,
                                spectra='TT_TE_EE',
                                clfile='cls' + suffix,
                                firstchain=firstchain,
                                lastchain=lastchain,
                                firstsamp=firstsamp,
                                lastsamp=lastsamp)
        pis = (brpi, cgpi)
    else:
        brpi = fplcmod.Pluginfo('BR_MOD',
                                lmin=2,
                                lmax=lmax,
                                numranges=1,
                                lranges=(2, lmax),
                                rangetypes=('TT_TE_EE', ),
                                sigmafile='sigma' + suffix,
                                firstchain=firstchain,
                                lastchain=lastchain,
                                firstsamp=firstsamp,
                                lastsamp=lastsamp)
        pis = (brpi, )
    if path is None:
        fplcmod.update_files(pis, lmax=lmax_comm)
    else:
        fplcmod.update_files(pis, path=path, lmax=lmax_comm)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 6
0
def brcg(fname='taulikes_brcg.dat', lmax=30):
    if lmax > 9:
        brpi = fplcmod.Pluginfo('BR_MOD', lmin=2, lmax=lmax, numranges=2,
                        lranges=(2, 9, lmax), rangetypes=('TT_TE_EE', 'TT'),
                        sigmafile = 'sigma_easysim_allless9.fits')
        cgpi = fplcmod.Pluginfo('COMM_GAUSS', lmin=10, lmax=30, 
                                spectras='TE_EE',
                                clfile='cls_easysim_allless9.fits')
        pis = (brpi, cgpi)
    else:
        brpi = fplcmod.Pluginfo('BR_MOD', lmin=2, lmax=lmax, numranges=1,
                        lranges=(2, lmax), rangetypes=('TT_TE_EE', ))
        pis = (brpi,)
    fplcmod.update_files(pis)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 7
0
def brcg_new(fname='taulikes_saved.dat',
             lmax_like=30,
             firstchain=None,
             lastchain=None,
             firstsamp=None,
             lastsamp=None,
             suffix='.fits',
             path=None,
             lmax=90,
             comm_lmax=None,
             l_thresh=9,
             logfile=None):

    if suffix is None:
        sigmafile = None
        clfile = None
    else:
        sigmafile = 'sigma' + suffix
        clfile = 'cls' + suffix
    pi = fplcmod.Pluginfo('BRCG',
                          lmin=2,
                          lmax=lmax,
                          lmax_like=lmax_like,
                          firstchain=firstchain,
                          lastchain=lastchain,
                          firstsamp=firstsamp,
                          lastsamp=lastsamp,
                          lranges=(2, l_thresh),
                          numranges=1,
                          rangetypes=('TT_TE_EE', ),
                          sigmafile=sigmafile,
                          clfile=clfile,
                          spectra='TT_TE_EE',
                          l_thresh=l_thresh,
                          comm_lmax=comm_lmax)
    if path is None:
        fplcmod.update_files((pi, ), lmax=lmax)
    else:
        fplcmod.update_files((pi, ), path=path, lmax=lmax)
    fplcmod.run_program(app='tauspec', logfile=logfile)
    fplcmod.savefile(fname)
Exemplo n.º 8
0
def brcg_new(fname='taulikes_saved.dat', lmax_like=30, firstchain=None, 
            lastchain=None,firstsamp=None, lastsamp=None, suffix='.fits', 
            path=None, lmax=90, comm_lmax=None, l_thresh=9, logfile=None):

    if suffix is None:
        sigmafile = None
        clfile = None
    else:
        sigmafile = 'sigma' + suffix
        clfile = 'cls' + suffix
    pi = fplcmod.Pluginfo('BRCG', lmin=2, lmax=lmax, lmax_like=lmax_like, 
            firstchain=firstchain, lastchain=lastchain, firstsamp=firstsamp, 
            lastsamp=lastsamp, lranges=(2, l_thresh), numranges=1, 
            rangetypes=('TT_TE_EE',), sigmafile=sigmafile, 
            clfile=clfile, spectra='TT_TE_EE', l_thresh=l_thresh,
            comm_lmax=comm_lmax)
    if path is None:
        fplcmod.update_files((pi,), lmax=lmax)
    else:
        fplcmod.update_files((pi,), path=path, lmax=lmax)
    fplcmod.run_program(app='tauspec', logfile=logfile)
    fplcmod.savefile(fname)
Exemplo n.º 9
0
def analytic(fname='taulikes_an.dat', lmax=30):
    anpi = fplcmod.Pluginfo('ANALYTIC', lmin=2, lmax=lmax)
    pis = (anpi, )
    fplcmod.update_files(pis)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)
Exemplo n.º 10
0
def analytic(fname='taulikes_an.dat', lmax=30):
    anpi = fplcmod.Pluginfo('ANALYTIC', lmin=2, lmax=lmax)
    pis = (anpi,)
    fplcmod.update_files(pis)
    fplcmod.run_program(app='tauspec')
    fplcmod.savefile(fname)