예제 #1
0
print((len(ras)))
#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
예제 #2
0
from szar.counts import ClusterCosmology
import numpy as np
import sys, os
from configparser import SafeConfigParser
import pickle as pickle
from orphics.tools.io import dictFromSection, listFromConfig, Plotter
import szar._fast as fast

M = 2.e14
z = 0.1

iniFile = "input/pipeline.ini"
Config = SafeConfigParser()
Config.optionxform = str
Config.read(iniFile)

constDict = dictFromSection(Config, 'constants')
fparams = {}  # the
for (key, val) in Config.items('params'):
    if ',' in val:
        param, step = val.split(',')
        fparams[key] = float(param)
    else:
        fparams[key] = float(val)

clttfile = Config.get('general', 'clttfile')
#fparams['H0']=100.
cc = ClusterCosmology(fparams, constDict, clTTFixFile=clttfile)

print((cc.Mdel_to_cdel(M, z, 500.)))
예제 #3
0
#Mexp = 14.4 #np.log10(2.e14)
Mexp = np.log10(5.e14)
z = 1.5
c = 1.18

clusterParams = 'LACluster'  # from ini file
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')
clusterDict = dictFromSection(Config, clusterParams)
cc = ClusterCosmology(cosmoDict, constDict, lmax, pickling=True)
theory = cc.theory

beamrange = np.arange(0.5, 5.0, 0.25)

# Make a CMB Noise Curve
cambRoot = "data/ell28k_highacc"
gradCut = 2000
halo = True
#beamX = 1.0
#beamY = 1.0
noiseTX = 10.0
noisePX = 14.14
예제 #4
0
파일: CCATpCleaning.py 프로젝트: mntw/szar
from szar.counts import ClusterCosmology
from szar.szproperties import SZ_Cluster_Model
from szar.foregrounds import fgNoises, f_nu
from szar.ilc import ILC_simple
import sys, os
from configparser import SafeConfigParser
import pickle as pickle
from orphics.tools.io import dictFromSection, listFromConfig, Plotter
from orphics.tools.cmb import noise_func

iniFile = "input/pipeline.ini"
Config = SafeConfigParser()
Config.optionxform = str
Config.read(iniFile)

constDict = dictFromSection(Config, 'constants')
clusterDict = dictFromSection(Config, 'cluster_params')
fparams = {}  # the
for (key, val) in Config.items('params'):
    if ',' in val:
        param, step = val.split(',')
        fparams[key] = float(param)
    else:
        fparams[key] = float(val)

clttfile = Config.get('general', 'clttfile')
cc = ClusterCosmology(fparams, constDict, lmax=8000,
                      pickling=True)  #clTTFixFile=clttfile)

fgs = fgNoises(cc.c,
               ksz_battaglia_test_csv="data/ksz_template_battaglia.csv",