def load_sdss_redmapper(path, lams=True, zs=True): from orphics import catalogs extra = [] if lams: extra += ["LAMBDA"] if zs: extra += ["Z_LAMBDA"] return catalogs.load_fits( "%s/redmapper_dr8_public_v6.3_catalog.fits" % path, column_names=["RA", "DEC"] + extra, )
cversion = 'joint' # deep56 vs boss-n region = 'boss' # array to compare to fig 8 array = "pa3_f090" # remove modes below this scale from stacks lmin = 2000 # make stack images do_images = True # Load the ACT cluster catalog cols = catalogs.load_fits("AdvACT_S18dn_confirmed_clusters.fits", ['RAdeg', 'DECdeg', 'SNR']) ras = cols['RAdeg'] decs = cols['DECdeg'] sns = cols['SNR'] # Rough central frequencies freqs = {"pa3_f090": 97, "pa3_f150": 149} # Get a region mask mask = sints.get_act_mr3_crosslinked_mask(region) bmask = mask.copy() bmask[bmask < 0.99] = 0 # Map loader dm = sints.ACTmr3(region=mask, calibrated=True) modlmap = mask.modlmap()
# fname = os.environ['WORK'] + "/data/boss/boss_dr12/galaxy_DR12v5_CMASS_South.fits" # cols = catalogs.load_fits(fname,['RA','DEC']) # iras1 = cols['RA'] # idecs1 = cols['DEC'] # fname = os.environ['WORK'] + "/data/boss/boss_dr12/galaxy_DR12v5_CMASS_North.fits" # cols = catalogs.load_fits(fname,['RA','DEC']) # iras2 = cols['RA'] # idecs2 = cols['DEC'] # iras = np.append(iras1,iras2) # idecs = np.append(idecs1,idecs2) fname = os.environ[ 'WORK'] + "/data/boss/sdss_dr8/redmapper_dr8_public_v6.3_catalog.fits" cols = catalogs.load_fits(fname, ['RA', 'DEC']) iras = cols['RA'] idecs = cols['DEC'] mask1 = sints.get_act_mr3_crosslinked_mask(region1) mask1[mask1 < 0.99] = 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)
print("Making source map") smap = pointsrcs.sim_srcs(imap.shape[-2:], imap.wcs, out, rbeam) return smap #%% splitnum = int(sys.argv[1]) freq = 545 cfile = sints.dconfig['planck_hybrid'][ 'maps_path'] + "/COM_PCCS_%s_R2.01.fits" % freq print("Loading catalog...") cat = catalogs.load_fits(cfile, ['RA', 'DEC', 'DETFLUX', 'DETFLUX_ERR', 'EXT_VAL']) ras = np.deg2rad(cat['RA']) decs = np.deg2rad(cat['DEC']) #%% dfact = 4 def hdowngrade(imap, shape, wcs, lmax): return (cs.alm2map(cs.map2alm(imap, lmax=lmax), enmap.empty(shape, wcs, dtype=imap.dtype))) i = splitnum fname = f"/home/r/rbond/sigurdkn/project/actpol/planck/npipe/car_equ/planck_npipe_{freq}_split{i+1}_map.fits"
sbname = "/scratch/r/rbond/msyriac/data/depot/tilec/v1.2.0_20200324//%s_%s/tilec_single_tile_%s_cmb_%s_beam.txt" % ( version, region, region, version) mname = "/scratch/r/rbond/msyriac/data/depot/tilec/v1.2.0_20200324//%s_%s/tilec_mask.fits" % ( version, region) # shutil.copy(yname,"/scratch/r/rbond/msyriac/data/for_sigurd/") # shutil.copy(sname,"/scratch/r/rbond/msyriac/data/for_sigurd/") # shutil.copy(mname,"/scratch/r/rbond/msyriac/data/for_sigurd/") # continue mask = maps.binary_mask(enmap.read_map(mname)) # Planck cols = catalogs.load_fits( "/scratch/r/rbond/msyriac/data/planck/data/J_A+A_594_A27.fits", ['RAdeg', 'DEdeg']) ras = cols['RAdeg'] decs = cols['DEdeg'] # ACT cols = catalogs.load_fits("paper/E-D56Clusters.fits", ['RAdeg', 'DECdeg']) ras = np.append(ras, cols['RAdeg']) decs = np.append(decs, cols['DECdeg']) if region == 'boss': radius = 10 width = 2 fontsize = 28 elif region == 'deep56': radius = 6