mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
overlapfrac now user-settable
This commit is contained in:
parent
b21300a56a
commit
41abc9eb35
4 changed files with 9 additions and 0 deletions
|
@ -143,6 +143,8 @@ int main(int argc, char **argv) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
matchDist = args.overlapFrac_arg;
|
||||||
|
|
||||||
loadCatalog(args.partFile1_arg, args.volFile1_arg, args.voidFile1_arg,
|
loadCatalog(args.partFile1_arg, args.volFile1_arg, args.voidFile1_arg,
|
||||||
args.zoneFile1_arg, args.infoFile1_arg, args.centerFile1_arg,
|
args.zoneFile1_arg, args.infoFile1_arg, args.centerFile1_arg,
|
||||||
args.shapeFile1_arg,
|
args.shapeFile1_arg,
|
||||||
|
|
|
@ -26,4 +26,5 @@ option "shapeFile2" - "Shape file for catalog 2" string yes
|
||||||
# options
|
# options
|
||||||
option "outfile" - "Output file" string yes
|
option "outfile" - "Output file" string yes
|
||||||
option "useID" - "Use unique catalog ID to match voids; otherwise use volumes" flag off
|
option "useID" - "Use unique catalog ID to match voids; otherwise use volumes" flag off
|
||||||
|
option "overlapFrac" - "threshold fraction of voronoi radius to count as matched" double optional default="0.25"
|
||||||
option "periodic" - "Set of edges which are periodic" string optional default="xy"
|
option "periodic" - "Set of edges which are periodic" string optional default="xy"
|
||||||
|
|
|
@ -540,6 +540,7 @@ def launchVoidOverlap(sample1, sample2, sample1Dir, sample2Dir,
|
||||||
binPath, thisDataPortion=None,
|
binPath, thisDataPortion=None,
|
||||||
logFile=None,
|
logFile=None,
|
||||||
continueRun=None, outputFile=None,
|
continueRun=None, outputFile=None,
|
||||||
|
overlapFrac=0.25,
|
||||||
matchMethod=None, strictMatch=False):
|
matchMethod=None, strictMatch=False):
|
||||||
|
|
||||||
sampleName1 = sample1.fullName
|
sampleName1 = sample1.fullName
|
||||||
|
@ -588,6 +589,8 @@ def launchVoidOverlap(sample1, sample2, sample1Dir, sample2Dir,
|
||||||
cmd += " --zonePartFile2=" + sample2Dir+"/voidPart_" + \
|
cmd += " --zonePartFile2=" + sample2Dir+"/voidPart_" + \
|
||||||
str(sampleName2)+".dat"
|
str(sampleName2)+".dat"
|
||||||
|
|
||||||
|
cmd += " --overlapFrac=" + str(overlapFrac)
|
||||||
|
|
||||||
if matchMethod == "useID": cmd += " --useID"
|
if matchMethod == "useID": cmd += " --useID"
|
||||||
cmd += periodicLine
|
cmd += periodicLine
|
||||||
cmd += " --outfile=" + outputFile
|
cmd += " --outfile=" + outputFile
|
||||||
|
|
|
@ -32,6 +32,7 @@ def compareCatalogs(baseCatalogDir, compareCatalogDir,
|
||||||
outputDir="./", logDir="./",
|
outputDir="./", logDir="./",
|
||||||
matchMethod="useID", dataPortion="central",
|
matchMethod="useID", dataPortion="central",
|
||||||
strictMatch=True,
|
strictMatch=True,
|
||||||
|
overlapFrac=0.25,
|
||||||
pathToCTools="../../../c_tools"):
|
pathToCTools="../../../c_tools"):
|
||||||
|
|
||||||
# reports the overlap between two void catalogs
|
# reports the overlap between two void catalogs
|
||||||
|
@ -42,6 +43,7 @@ def compareCatalogs(baseCatalogDir, compareCatalogDir,
|
||||||
# matchMethod: "useID" to use unique IDs, "prox" to use overlap of Voronoi cells
|
# matchMethod: "useID" to use unique IDs, "prox" to use overlap of Voronoi cells
|
||||||
# dataPortion: "central" or "all"
|
# dataPortion: "central" or "all"
|
||||||
# strictMatch: if True, only attempt to match to trimmed catalog
|
# strictMatch: if True, only attempt to match to trimmed catalog
|
||||||
|
# overlapFrac: threshold fraction of Voronoi radius to count as matched
|
||||||
# pathToCTools: path to location of VIDE c_tools directory
|
# pathToCTools: path to location of VIDE c_tools directory
|
||||||
|
|
||||||
if not os.access(outputDir, os.F_OK):
|
if not os.access(outputDir, os.F_OK):
|
||||||
|
@ -74,6 +76,7 @@ def compareCatalogs(baseCatalogDir, compareCatalogDir,
|
||||||
continueRun=False,
|
continueRun=False,
|
||||||
outputFile=stepOutputFileName,
|
outputFile=stepOutputFileName,
|
||||||
matchMethod=matchMethod,
|
matchMethod=matchMethod,
|
||||||
|
overlapFrac=overlapFrac,
|
||||||
strictMatch=strictMatch)
|
strictMatch=strictMatch)
|
||||||
|
|
||||||
print " Done!"
|
print " Done!"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue