fixed support for masked mock data sets; now skips over comments in halo catalogs

This commit is contained in:
P.M. Sutter 2012-12-03 11:00:51 -06:00
parent f3f96b0dcd
commit 2c3fe1b35d
4 changed files with 7 additions and 4 deletions

View file

@ -316,7 +316,8 @@ if (args.script or args.all) and haloFileBase != "":
dataFile = catalogDir+haloFileBase+fileNums[0]
inFile = open(dataFile, 'r')
numPart = 0
for line in inFile:
for (iLine, line) in enumerate(inFile):
if iLine < haloFileNumComLines: continue
line = line.split(haloFileColSep)
if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass:
numPart += 1
@ -346,7 +347,8 @@ if (args.halos or args.all) and haloFileBase != "":
dataFile = catalogDir+haloFileBase+fileNums[iRedshift]
inFile = open(dataFile, 'r')
numPart = 0
for line in inFile:
for (iLine, line) in enumerate(inFile):
if iLine < haloFileNumComLines: continue
line = line.split(haloFileColSep)
if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass:
numPart += 1