Exemplo n.º 1
0
                           season,
                           patch,
                           array,
                           coadd=coadd,
                           mask_patch=mask_patch)
        n2d_sim = noise.get_n2d_data(sims,
                                     ivars2,
                                     emask,
                                     coadd_estimator=coadd,
                                     flattened=False,
                                     plot_fname=pout + "_n2d_sim" if
                                     (args.debug and i == 0) else None,
                                     dtype=dm.dtype)
        #n2d_sim = noise.get_n2d_data(sims,ivars2,emask,coadd_estimator=coadd,flattened=True,plot_fname=pout+"_n2d_sim" if (args.debug and i==0) else None,dtype = dm.dtype)
        del sims
        cents, op1ds_sim = noise.get_p1ds(n2d_sim, modlmap, bin_edges)
        p1ds.append(op1ds_sim.copy().reshape(-1))
    p1dstats = stats.get_stats(np.array(p1ds))

    #del covsqrt

    # For verification
    #splits = dm.get_splits(season=args.season,patch=args.patch,arrays=dm.array_freqs[args.array],srcfree=True)
    #splits = dm.get_splits(args.qid)
    splits = enmap.enmap([dm.get_splits(q) for q in qid])
    #splits = np.expand_dims(splits,axis=0)

    if args.extract_mask is not None:
        splits = enmap.extract(splits, eshape, ewcs)

    n2d_data = noise.get_n2d_data(splits,
Exemplo n.º 2
0
parser.add_argument("patch", type=str, help='Patch')
args = parser.parse_args()

bin_edges = np.arange(30, 10000, 100)

dm = datamodel.NoiseModel(args.season, args.array, args.patch)
pout = "%s%s_%s_%s_coadd_est_%s" % (datamodel.pout, args.season, args.array,
                                    args.patch, True)
sout = "%s%s_%s_%s_coadd_est_%s" % (datamodel.paths['save'], args.season,
                                    args.array, args.patch, True)

modlmap = dm.modlmap

n2d_data = dm.get_n2d_data(dm.get_map(), coadd_estimator=True)
corr = datamodel.corrcoef(n2d_data)
cents, c1ds_data = datamodel.get_p1ds(corr, modlmap, bin_edges)

dpi = 300
ncomps = c1ds_data.shape[0]
if ncomps == 3:
    pols = ['150-I', '150-Q', '150-U']
elif ncomps == 6:
    pols = ['90-I', '90-Q', '90-U', '150-I', '150-Q', '150-U']

pl = io.Plotter(xlabel="$\\ell$",
                ylabel="$N_{XY}/\\sqrt{N_{XX}N_{YY}}$",
                xyscale='linlin')
for i in range(c1ds_data.shape[0]):
    for j in range(i + 1, c1ds_data.shape[0]):
        polstring = "%s x %s" % (pols[i], pols[j])
        pl.add(cents, c1ds_data[i, j], label=polstring)