Ejemplo n.º 1
0
from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
from orphics import maps,io,cosmology,mpi
from pixell import enmap
import numpy as np
import os,sys,shutil
from datetime import datetime
from actsims import noise as actnoise
from actsims.util import seed_tracker
from soapack import interfaces as sints
from enlib import bench
from tilec import pipeline,utils as tutils


pdefaults = io.config_from_yaml("input/cov_defaults.yml")['cov']

import argparse
# Parse command line
parser = argparse.ArgumentParser(description='Do a thing.')
parser.add_argument("version", type=str,help='Version name.')
parser.add_argument("region", type=str,help='Region name.')
parser.add_argument("arrays", type=str,help='Comma separated list of array names. Array names map to a data specification in data.yml')
parser.add_argument("solutions", type=str,help='Comma separated list of solutions. Each solution is of the form x-y-... where x is solved for and the optionally provided y-,... are deprojected. The x can belong to any of CMB,tSZ and y,z,... can belong to any of CMB,tSZ,CIB.')
parser.add_argument("beams", type=str,help='Comma separated list of beams. Each beam is either a float for FWHM in arcminutes or the name of an array whose beam will be used.')
parser.add_argument("beams_planck", type=str,help='Comma separated list of beams. Each beam is either a float for FWHM in arcminutes or the name of an array whose beam will be used.')
parser.add_argument("-N", "--nsims",     type=int,  default=1,help="A description.")
parser.add_argument("--start-index",     type=int,  default=0,help="A description.")
parser.add_argument("--skip-inpainting", action='store_true',help='Do not inpaint.')
parser.add_argument("--use-cached-sims", action='store_true',help='Use cached sims.')
parser.add_argument("--fft-beam", action='store_true',help='Apply the beam and healpix-pixwin with FFTs instead of SHTs.')
Ejemplo n.º 2
0
                    action='store_true',
                    help='Use flat-sky norm.')
args = parser.parse_args()
car = "healpix_" if args.healpix else "car_"
mask = "nomask_" if args.no_mask else "mask_"
noise = "sonoise" if args.wnoise == None else "wnoise"

solint, ils, Als, Nl, comm, rank, my_tasks, sindex, debug_cmb, lmin, lmax, polcomb, nsims, channel, isostr = solenspipe.initialize_args(
    args)
print(isostr)
w2 = solint.wfactor(2)
w3 = solint.wfactor(3)
w4 = solint.wfactor(4)
s = stats.Stats(comm)

config = io.config_from_yaml("../input/config.yml")

#load noise nells

#length of ell determines maximum l used for N1 calculation
ls, nells, nells_P = solint.get_noise_power(channel, beam_deconv=True)
NOISE_LEVEL = nells[:3000]
polnoise = nells_P[:3000]

lmin = 100
LMAXOUT = 2992
LMAX_TT = 2992
TMP_OUTPUT = config['data_path']
LCORR_TT = 0
Lstep = 20
Lmin_out = 2
Ejemplo n.º 3
0
from __future__ import print_function
from orphics import maps, io, cosmology, mpi  # msyriac/orphics ; pip install -e . --user
from pixell import enmap, lensing as plensing, curvedsky, utils, enplot, powspec
import numpy as np
import os, sys
import os
import glob
import traceback
import healpy as hp
from . import qe
import math

config = io.config_from_yaml(
    os.path.dirname(os.path.abspath(__file__)) + "/../input/config.yml")
opath = config['data_path']

closest_nside = lambda lmax: 1 << (int(
    (lmax / 3000.) * 2048.) - 1).bit_length()

# These functions are copied from solenspipe, so will have to update
# solenspipe to call them from here


def get_cmb_alm(i, iset, path=config['signal_path']):
    sstr = str(iset).zfill(2)
    istr = str(i).zfill(5)
    fname = path + "fullskyLensedUnabberatedCMB_alm_set%s_%s.fits" % (sstr,
                                                                      istr)
    return hp.read_alm(fname, hdu=(1, 2, 3))

Ejemplo n.º 4
0
#         'd56_02',
#         'd56_03',
#         'd56_04',
#         'd56_05',
#         'd56_06','s16_01','s16_02','s16_03','p04','p05','p06','p07','p08'] # list of quick IDs
# qids = ['d5',
#         'd6',
#         'd56_01',
#         'd56_02',
#         'd56_03',
#         'd56_04',
#         'd56_05',
#         'd56_06','s16_01','s16_02','s16_03','p04','p05'] # list of quick IDs
parent_qid = 'd56_01'  # qid of array whose geometry will be used for the full map

pdefaults = io.config_from_yaml("input/cov_defaults_tiled.yml")['cov']

import argparse
# Parse command line
parser = argparse.ArgumentParser(description='Do a thing.')
parser.add_argument("--dtiles", type=str, default=None, help="A description.")
parser.add_argument("--theory",
                    type=str,
                    default="none",
                    help="A description.")
parser.add_argument("--onlyd", action='store_true', help='A flag.')
parser.add_argument("--ivars", action='store_true', help='A flag.')
parser.add_argument("--signal-bin-width",
                    type=int,
                    default=pdefaults['signal_bin_width'],
                    help="A description.")