mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
fixed support for masked mock data sets; now skips over comments in halo catalogs
This commit is contained in:
parent
f3f96b0dcd
commit
2c3fe1b35d
4 changed files with 7 additions and 4 deletions
|
@ -528,7 +528,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
generateFromCatalog_conf_print_version();
|
generateFromCatalog_conf_print_version();
|
||||||
|
|
||||||
cout << "Loading NYU data..." << endl;
|
cout << "Loading data " << args_info.catalog_arg << "..." << endl;
|
||||||
vector<NYU_Data> data;
|
vector<NYU_Data> data;
|
||||||
Healpix_Map<float> o_mask;
|
Healpix_Map<float> o_mask;
|
||||||
vector<int> pixel_list;
|
vector<int> pixel_list;
|
||||||
|
|
|
@ -68,6 +68,7 @@ haloFileVXCol = 3
|
||||||
haloFileVYCol = 4
|
haloFileVYCol = 4
|
||||||
haloFileVZCol = 5
|
haloFileVZCol = 5
|
||||||
haloFileColSep = ','
|
haloFileColSep = ','
|
||||||
|
haloFileNumComLines = 0
|
||||||
|
|
||||||
# adjust these two parameters given the memory contraints on your system:
|
# adjust these two parameters given the memory contraints on your system:
|
||||||
# numZobovDivisions: how many sub-volumes per dimension will zobov process
|
# numZobovDivisions: how many sub-volumes per dimension will zobov process
|
||||||
|
|
|
@ -316,7 +316,8 @@ if (args.script or args.all) and haloFileBase != "":
|
||||||
dataFile = catalogDir+haloFileBase+fileNums[0]
|
dataFile = catalogDir+haloFileBase+fileNums[0]
|
||||||
inFile = open(dataFile, 'r')
|
inFile = open(dataFile, 'r')
|
||||||
numPart = 0
|
numPart = 0
|
||||||
for line in inFile:
|
for (iLine, line) in enumerate(inFile):
|
||||||
|
if iLine < haloFileNumComLines: continue
|
||||||
line = line.split(haloFileColSep)
|
line = line.split(haloFileColSep)
|
||||||
if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass:
|
if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass:
|
||||||
numPart += 1
|
numPart += 1
|
||||||
|
@ -346,7 +347,8 @@ if (args.halos or args.all) and haloFileBase != "":
|
||||||
dataFile = catalogDir+haloFileBase+fileNums[iRedshift]
|
dataFile = catalogDir+haloFileBase+fileNums[iRedshift]
|
||||||
inFile = open(dataFile, 'r')
|
inFile = open(dataFile, 'r')
|
||||||
numPart = 0
|
numPart = 0
|
||||||
for line in inFile:
|
for (iLine, line) in enumerate(inFile):
|
||||||
|
if iLine < haloFileNumComLines: continue
|
||||||
line = line.split(haloFileColSep)
|
line = line.split(haloFileColSep)
|
||||||
if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass:
|
if minHaloMass == "none" or float(line[haloFileMCol]) > minHaloMass:
|
||||||
numPart += 1
|
numPart += 1
|
||||||
|
|
|
@ -32,7 +32,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
if sample.dataFile == "":
|
if sample.dataFile == "":
|
||||||
datafile = inputDataDir+"/"+sampleName
|
datafile = inputDataDir+"/"+sampleName
|
||||||
else:
|
else:
|
||||||
datafile = sample.dataFile
|
datafile = inputDataDir+"/"+sample.dataFile
|
||||||
|
|
||||||
maskFile = sample.maskFile
|
maskFile = sample.maskFile
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue