예제 #1
0
    # 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,
                                  ivars2,
                                  emask,
                                  coadd_estimator=coadd,
                                  dtype=dm.dtype)
    cents, p1ds_data = noise.get_p1ds(n2d_data, modlmap, bin_edges)
    corr = noise.corrcoef(n2d_data)
    del n2d_data
    bin_edges = np.arange(40, 10000, 100)
    cents2, c1ds_data = noise.get_p1ds(corr, modlmap, bin_edges)
    noise.plot_corrcoeff(cents2, c1ds_data, plot_fname=pout)

    nfreqs = len(qid)
    npol = 3
    #noise.compare_ps(cents,p1dstats['mean'].reshape((npol,npol,cents.size)),p1ds_data,plot_fname="%s_compare" % (pout),err=p1dstats['errmean'].reshape((npol,npol,cents.size)))
    noise.compare_ps(cents,
                     p1dstats['mean'].reshape(
                         (nfreqs * npol, nfreqs * npol, cents.size)),
                     p1ds_data,
                     plot_fname="%s_compare" % (pout),
                     err=p1dstats['errmean'].reshape(
                         (nfreqs * npol, nfreqs * npol, cents.size)))
예제 #2
0
parser.add_argument("array", type=str, help='Array')
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])