Ejemplo n.º 1
0
    def cl_noise(self, ells, patch, dm, season=None, array=None):
        # beam
        if dm == 'planck':
            import soapack.interfaces as sints
            dmodel = sints.PlanckHybrid()
            lbeam = dmodel.get_beam(ells, array=array)
            lknee = 0
            alpha = 1
            rms = self.planck_rms[array]
        elif dm == 'act':
            afreq = get_act_freq(array)
            fwhm = 1.4 * 150. / afreq
            lbeam = maps.gauss_beam(ells, fwhm)
            lknee = 2500
            alpha = -4
            a, f = array.split('_')
            rms = self.act_rms(season, patch, a, f)

        from tilec.covtools import rednoise
        return rednoise(ells, rms, lknee=lknee, alpha=alpha) / lbeam**2.
Ejemplo n.º 2
0
kroot = "/scratch/r/rbond/msyriac/data/depot/tilec/test_lfi_v2_00_0000_deep56/"
droot = "/scratch/r/rbond/msyriac/data/depot/tilec/test_lfi_data_deep56/"
lroot = "/scratch/r/rbond/msyriac/data/depot/tilec/test_lfi_v3_00_0000_deep56/"
mask = sints.get_act_mr3_crosslinked_mask("deep56")
shape,wcs = mask.shape,mask.wcs
w2 = np.mean(mask**2.)
    
qids = 'p01,p02,p03'.split(',')

bin_edges = np.arange(20,6000,40)
modlmap = mask.modlmap()
binner = stats.bin2D(modlmap,bin_edges)

arraynames = {'p01':'030','p02':'044','p03':'070'}

dm = sints.PlanckHybrid(region=mask)
for qid in qids:


    split = enmap.read_map("%ssplit_%s.fits" % (froot,qid))
    #io.hplot(enmap.downgrade(split,4),"split_%s" % qid)

    arrayname = arraynames[qid]
    wts = dm.get_splits_ivar(arrayname)[0,:,0,...]

    coadd,_ = noise.get_coadd(split[:,0,...],wts,axis=0) * mask

    pl = io.Plotter(xyscale='linlog',xlabel='l',ylabel='C')

    kmap = enmap.fft(coadd,normalize='phys')
    p2d = np.real(kmap*kmap.conj())/w2
Ejemplo n.º 3
0
        modlmap = enmap.modlmap(map1.shape,map1.wcs)
        binned_power = bin(power/w2/beamf1(modlmap)/beamf2(modlmap),modlmap,bin_edges)
        return centers, binned_power
    else:
        ells,cls = pcalc.get_power_scalarXscalar(map1*mask, map2*mask,ret_dl=False)
        return ells,cls/beamf1(ells)/beamf2(ells)


# # ACTxPlanck

# coadded ACT x coadded Planck


patch = args.region
dma = interfaces.ACTmr3(region=mask)
dmp = interfaces.PlanckHybrid(region=mask)
pfreqs = ['030','044','070','100','143','217','353','545']
nfreqs = len(pfreqs)

# we loop over all pairs of Planck x ACT

# combs = []
# for planckfreq in ['030','044','070','100','143','217','353','545']: # no '857'
#     for actseason in ['s14','s15']:
#         for array in ['pa1_f150', 'pa2_f150', 'pa3_f090', 'pa3_f150']:
#             try:
#                 actbeam = lambda x: dma.get_beam(x, actseason, 
#                                        patch, array)
#                 actbeam(100)
#                 combs.append((planckfreq,actseason,array))
#             except:
Ejemplo n.º 4
0
f2 = lambda array, splitnum, mtype: "%s/HFI_SkyMap_%s_2048_R2.02_halfmission-%d_%s.fits" % (
    pr2_loc, array, splitnum + 1, mtype)
f3 = lambda array, splitnum, mtype: "%s/LFI_SkyMap_%s-BPassCorrected_1024_R3.00_full-ringhalf-%d_%s.fits" % (
    pr3_loc, array, splitnum + 1, mtype)


def f4(array, splitnum, mtype):
    farray = array if array != '353' else '353-psb'
    if splitnum == 0: splitname = "odd"
    elif splitnum == 1: splitname = "even"
    return "%s/HFI_SkyMap_%s_2048_R3.01_full-%sring_%s.fits" % (
        pr3_loc, farray, splitname, mtype)


# Get output filename convention
dm = sints.PlanckHybrid()
save_loc = dm.config['maps_path']
for array in dm.arrays:
    if array in lfis: continue  # !!! REMOVE
    for splitnum in range(2):
        if array in lfis:
            mtfile = f1(array, splitnum, "map")
            mpfile = f3(array, splitnum, "map")
            itfile = f1(array, splitnum, "ivar")
            ipfile = f3(array, splitnum, "ivar")
        elif array in hfis:
            mtfile = f2(array, splitnum, "map")
            mpfile = f4(array, splitnum, "map")
            itfile = f2(array, splitnum, "ivar")
            ipfile = f4(array, splitnum, "ivar")
        else: