import alhazen.halos as halos from scipy.interpolate import interp1d from orphics.theory.cosmology import LimberCosmology from orphics.tools.stats import npspace iniFile = "../SZ_filter/input/pipeline.ini" Config = SafeConfigParser() Config.optionxform = str Config.read(iniFile) cosmologyName = 'params' # from ini file cosmoDict = dictFromSection(Config, cosmologyName) constDict = dictFromSection(Config, 'constants') cc = ClusterCosmology(cosmoDict, constDict, clTTFixFile="../SZ_filter/data/cltt_lensed_Feb18.txt") M500 = 5.e14 c500 = 1.18 z = 0.5 delta = 500 R500 = cc.rdel_c(M500, z, delta) # R500_alt = cc.rdel_c_alt(M500,c500,delta) # print R500, R500_alt # sys.exit() # R500 = R500_alt Rrange = npspace(0.1, 10. * R500, 100, "log") rhofunc = halos.rho_nfw(M500, c500, R500)
#sys.exit() p143Loc = '/astro/astronfs01/workarea/msyriac/PlanckClusters/WPR2_CMB_muK.fits' hpPlanck = hp.read_map(p143Loc) outDir = os.environ['WWW'] + "plots/kappatest/" # === COSMOLOGY === cosmologyName = 'LACosmology' # from ini file iniFile = "../SZ_filter/input/params.ini" Config = SafeConfigParser() Config.optionxform = str Config.read(iniFile) lmax = 8000 cosmoDict = dictFromSection(Config, cosmologyName) constDict = dictFromSection(Config, 'constants') cc = ClusterCosmology(cosmoDict, constDict, lmax, pickling=True) TCMB = 2.7255e6 # === QUADRATIC ESTIMATOR INITIALIZATION === from orphics.analysis import flatMaps as fmaps from alhazen.quadraticEstimator import Estimator # === RUN N SIMS === kappaStack = 0. stampStack = 0. maxN = None #10000 #None pixScale = 1.0 widthArc = 160. width = widthArc / 60.
import orphics.analysis.flatMaps as fmaps import flipper.liteMap as lm from orphics.tools.stats import timeit, bin2D, coreBinner from configparser import SafeConfigParser from szlib.szcounts import ClusterCosmology cosmologyName = 'LACosmology' #Planck15' iniFile = "input/params.ini" Config = SafeConfigParser() Config.optionxform = str Config.read(iniFile) lmax = Config.getint('general', 'camb_ellmax') cosmoDict = dictFromSection(Config, cosmologyName) constDict = dictFromSection(Config, 'constants') cc = ClusterCosmology(cosmoDict, constDict, lmax) theory = cc.theory expX = Config.get('general', 'X') expY = Config.get('general', 'Y') beamX,beamFileX,fgFileX,noiseTX,noisePX,tellminX,tellmaxX,pellminX, \ pellmaxX,lxcutTX,lycutTX,lxcutPX,lycutPX,lkneeTX,alphaTX,lkneePX,alphaPX = getLensParams(Config,expX) beamY,beamFileY,fgFileY,noiseTY,noisePY,tellminY,tellmaxY,pellminY, \ pellmaxY,lxcutTY,lycutTY,lxcutPY,lycutPY,lkneeTY,alphaTY,lkneePY,alphaPY = getLensParams(Config,expY) TCMB = Config.getfloat('general', 'TCMB') gradCut = Config.getint('general', 'gradCut') halo = Config.getboolean('general', 'halo') fsky = Config.getfloat('general', 'sqDeg') / 41250.