Exemplo n.º 1
0
mask2 = sints.get_act_mr3_crosslinked_mask(region2)
mask2[mask2 < 0.99] = 0

dm1 = sints.ACTmr3(region=mask1, calibrated=True)
dm2 = sints.ACTmr3(region=mask2, calibrated=True)
wt1 = dm1.get_coadd_ivar("s15", region1, "pa2_f150")
wt2 = dm2.get_coadd_ivar("s15", region2, "pa2_f150")

ras1, decs1 = catalogs.select_based_on_mask(iras, idecs, mask1)
ras2, decs2 = catalogs.select_based_on_mask(iras, idecs, mask2)

tdir = '/scratch/r/rbond/msyriac/data/depot/tilec/v1.0.0_rc_20190919'

solution = 'tsz'

yfile1 = tutils.get_generic_fname(tdir, region1, solution, None, cversion)
cfile1 = tutils.get_generic_fname(tdir, region1, solution, 'cib', cversion)
dfile1 = tutils.get_generic_fname(tdir, region1, solution, 'cmb', cversion)
ybfile1 = tutils.get_generic_fname(tdir,
                                   region1,
                                   solution,
                                   None,
                                   cversion,
                                   beam=True)
cbfile1 = tutils.get_generic_fname(tdir,
                                   region1,
                                   solution,
                                   'cib',
                                   cversion,
                                   beam=True)
Exemplo n.º 2
0
tdir = "/scratch/r/rbond/msyriac/data/depot/tilec/"
dcomb = 'joint'

nside = 2048
lmax = 3 * nside

#for deproject in [None,'cib']:
for deproject in ['cib']:
    hmap = 0
    hmask = 0
    for region in ['deep56', 'boss']:
        imap = enmap.read_map(
            tutils.get_generic_fname(tdir,
                                     region,
                                     solution,
                                     deproject=deproject,
                                     data_comb=dcomb,
                                     version="v1.1.1",
                                     sim_index=None))
        mask = enmap.read_map(
            tutils.get_generic_fname(tdir,
                                     region,
                                     solution,
                                     deproject=deproject,
                                     data_comb=dcomb,
                                     version="v1.1.1",
                                     sim_index=None,
                                     mask=True))

        malm = cs.map2alm(mask, lmax=lmax)
        ialm = cs.map2alm(imap, lmax=lmax)
Exemplo n.º 3
0
dm1 = sints.ACTmr3(region=mask1, calibrated=True)
dm2 = sints.ACTmr3(region=mask2, calibrated=True)
wt1 = dm1.get_coadd_ivar("s15", region1, "pa2_f150")
wt2 = dm2.get_coadd_ivar("s15", region2, "pa2_f150")

ras1, decs1 = catalogs.select_based_on_mask(iras, idecs, mask1)
ras2, decs2 = catalogs.select_based_on_mask(iras, idecs, mask2)
# ras1 = iras
# decs1 = idecs

tdir = '/scratch/r/rbond/msyriac/data/depot/tilec/v1.0.0_rc_20190919'

solution = 'tsz'

yfile1 = tutils.get_generic_fname(tdir, region1, solution, None, cversion)
cfile1 = tutils.get_generic_fname(tdir, region1, solution, 'cib', cversion)

yfile2 = tutils.get_generic_fname(tdir, region2, solution, None, cversion)
cfile2 = tutils.get_generic_fname(tdir, region2, solution, 'cib', cversion)

ymap1 = enmap.read_map(yfile1)
cmap1 = enmap.read_map(cfile1)

ymap2 = enmap.read_map(yfile2)
cmap2 = enmap.read_map(cfile2)

arcmin = 40.
pix = 0.5

Exemplo n.º 4
0
from orphics import maps, io, cosmology, stats
from pixell import enmap
import numpy as np
import os, sys
from tilec import utils as tutils

region = 'deep56'
#region = 'boss'
solution = 'comptony'
tdir = "/scratch/r/rbond/msyriac/data/depot/tilec/v1.2.0_20200324"
dcomb = 'joint'

dfile = tutils.get_generic_fname(tdir,
                                 region,
                                 solution,
                                 deproject=None,
                                 data_comb=dcomb,
                                 version=None,
                                 sim_index=None)
dbeam = tutils.get_generic_fname(tdir,
                                 region,
                                 solution,
                                 deproject=None,
                                 data_comb=dcomb,
                                 version=None,
                                 sim_index=None,
                                 beam=True)
sfile = tutils.get_generic_fname(tdir,
                                 region,
                                 solution,
                                 deproject=None,
Exemplo n.º 5
0
    def pow(x, y=None):
        k = enmap.fft(x, normalize='phys')
        ky = enmap.fft(y, normalize='phys') if y is not None else k
        p = (k * ky.conj()).real
        cents, p1d = binner.bin(p)
        return p, cents, p1d

    for component in ['cmb', 'tsz']:
        deprojs = depdict[component]
        for deproj in deprojs:
            ps = []
            for tdir, version in zip(tdirs, versions):
                csfile = tutils.get_generic_fname(tdir,
                                                  region,
                                                  component,
                                                  deproject=deproj,
                                                  data_comb='joint',
                                                  version=version)
                imap = enmap.read_map(csfile)
                _, cents, p1d = pow(imap)
                ps.append(p1d.copy())
            p1 = ps[0]
            p2 = ps[1]
            r = (p1 - p2) / p2

            pl = io.Plotter('Dell')
            pl.add(cents, p1, label=versions[0], lw=1)
            pl.add(cents, p2, label=versions[1], lw=1)
            pl.done(f"vcomp_{region}_{component}_{str(deproj)}.png")

            pl = io.Plotter('rCell')
Exemplo n.º 6
0
fname = os.environ['WORK'] + "/data/boss/eboss_dr14/data_DR14_QSO_S.fits"
cols = catalogs.load_fits(fname, ['RA', 'DEC'])
ras = cols['RA']
decs = cols['DEC']
sns = np.array(ras) * 0 + 6

tdir = '/scratch/r/rbond/msyriac/data/depot/tilec/v1.0.0_rc_20190919'

mask = sints.get_act_mr3_crosslinked_mask(region)
bmask = mask.copy()
bmask[bmask < 0.99] = 0
io.hplot(enmap.downgrade(bmask, 4), "fig_qso_bmask")

solution = 'tsz'

bfile = tutils.get_generic_fname(tdir, region, 'cmb', None, 'act', beam=True)
yfile = tutils.get_generic_fname(tdir, region, 'cmb', None, 'act')

bfile2 = tutils.get_generic_fname(tdir,
                                  region,
                                  'cmb',
                                  None,
                                  'planck',
                                  beam=True)
yfile2 = tutils.get_generic_fname(tdir, region, 'cmb', None, 'planck')

cmap = enmap.read_map(yfile2)
modlmap = cmap.modlmap()
ymap = enmap.read_map(yfile)

pix = 80
Exemplo n.º 7
0
#versions = ['test_sim_galtest_nofg','test_sim_galtest_withfg_fgfit','test_sim_galtest_withfg_test']
#seeds = [11,12]

# versions = ['test_sim_galtest_sim_updates','test_sim_galtest_rc_commit']
# seeds = [12]

versions = ['test_sim_galtest_final']
seeds = [12,13]



for version in versions:
    pl = io.Plotter(xyscale='linlog',scalefn = lambda x: x**2./2./np.pi,xlabel='l',ylabel='D')
    for seed in seeds:
        csfile = tutils.get_generic_fname(tdir,region,'cmb',deproject=None,data_comb=dcomb,version=version,sim_index=seed)
        imap = enmap.read_map(csfile)
        modlmap = imap.modlmap()
        k = enmap.fft(imap,normalize='phys')
        p2d = p(k)
        io.power_crop(p2d,300,f"cp2d_{version}.png")
        binner = stats.bin2D(modlmap,bin_edges)
        cents,p1d = binner.bin(p2d)
        pl.add(cents,p1d,lw=1,alpha=0.8,label=f'{seed}')
    pl._ax.set_ylim(10,3e5)
    pl.done("cpowall_%s.png" % version)


# #This snippet discovered that sim_index=12 is the first instance of break-down
# nsims = 13
Exemplo n.º 8
0
#sys.exit()
pl = io.Plotter(xlabel='l',
                ylabel='LC_L',
                scalefn=lambda x: x,
                xyscale='linlin')


def get_beam(bfile, ells):
    ls, bells = np.loadtxt(bfile, unpack=True)
    return maps.interp(ls, bells)(ells)


for col, region in zip(['red', 'blue'], ['boss', 'deep56']):

    ymap = enmap.read_map(
        tutils.get_generic_fname(tdir, region, "tsz", None, "joint"))
    cmap = enmap.read_map(
        tutils.get_generic_fname(tdir, region, "tsz", 'cmb', "joint"))
    dmap = enmap.read_map(
        tutils.get_generic_fname(tdir, region, "tsz", 'cib', "joint"))

    ybfile = tutils.get_generic_fname(tdir,
                                      region,
                                      "tsz",
                                      None,
                                      "joint",
                                      beam=True)
    cbfile = tutils.get_generic_fname(tdir,
                                      region,
                                      "tsz",
                                      'cmb',
Exemplo n.º 9
0
cols = catalogs.load_fits(fname, ['RA', 'DEC'])
ras = cols['RA']
decs = cols['DEC']
sns = np.array(ras) * 0 + 6

tdir = '/scratch/r/rbond/msyriac/data/depot/tilec/v1.0.0_rc_20190919'

bmask = mask.copy()
bmask[bmask < 0.99] = 0
#io.hplot(enmap.downgrade(bmask,4),"fig_qso_bmask")

solution = 'tsz'

bfile = tutils.get_generic_fname(tdir,
                                 region,
                                 solution,
                                 None,
                                 cversion,
                                 beam=True)
yfile = tutils.get_generic_fname(tdir, region, solution, None, cversion)

bfile2 = tutils.get_generic_fname(tdir,
                                  region,
                                  solution,
                                  'cib',
                                  cversion,
                                  beam=True)
yfile2 = tutils.get_generic_fname(tdir, region, solution, 'cib', cversion)

cmap = enmap.read_map(yfile2)
modlmap = cmap.modlmap()
ls1, b1 = np.loadtxt(bfile, unpack=True)