if massCol == 'M500c':
    delta = 500
    rhoType = "critical"
elif massCol == 'M200m':
    delta = 200
    rhoType = "matter"
else:
    raise Exception("Unsupported massCol - should be M500c or M200m")
deltaLabel = "%d%s" % (delta, rhoType[0])
log10MBinCentres = (log10MBinEdges[1:] + log10MBinEdges[:-1]) / 2

# Set up Websky cosmology
H0, Om0, Ob0, sigma_8, ns = 68.0, 0.31, 0.049, 0.81, 0.965
selFn = completeness.SelFn(selFnDir,
                           SNRCut,
                           footprintLabel=footprintLabel,
                           zStep=0.02,
                           delta=delta,
                           rhoType=rhoType)
scalingRelationDict = selFn.scalingRelationDict
selFn.update(H0,
             Om0,
             Ob0,
             sigma_8,
             ns,
             scalingRelationDict=scalingRelationDict)
print("Total area = %.3f square degrees" % (selFn.totalAreaDeg2))

# Cut to just the halos in the survey mask
cutTabFileName = "halosInMask.fits"
if os.path.exists(cutTabFileName) == False:
    print("Cutting halos catalog to the survey mask")
Example #2
0
                        dest="zStep",
                        help="""Redshift bin width (default: 0.1).""",
                        default=0.1,
                        type=float)
    args = parser.parse_args()

    configFileName = args.configFileName
    selFnDir = args.selFnDir
    SNRCut = args.SNRCut
    zStep = args.zStep
    footprintLabel = args.footprint

    print(">>> Setting up SNR > %.2f selection function ..." % (SNRCut))
    selFn = completeness.SelFn(selFnDir,
                               SNRCut,
                               configFileName=configFileName,
                               footprintLabel=footprintLabel,
                               zStep=zStep)

    # If we want to play with scaling relation also
    scalingRelationDict = selFn.scalingRelationDict

    # Default parameters
    t0 = time.time()
    H0, Om0, Ob0, sigma8, ns = 70.0, 0.30, 0.05, 0.80, 0.95
    printNumClusters(H0,
                     Om0,
                     Ob0,
                     sigma8,
                     ns,
                     scalingRelationDict=scalingRelationDict)