Commit 09296293 authored by Miroslav Shaltev's avatar Miroslav Shaltev
Browse files

add options to mc hybrid search

parent 0c2cf112
......@@ -6,7 +6,7 @@
#\details This script performs a single MC trial of a NOMAD based F-stat follow-up.
#\author Miroslav Shaltev <miroslav.shaltev@aei.mpg.de>
#\version 0.1
#\date 2011-2014
#\date 2011-2017
#\copyright GPLv3
......@@ -121,8 +121,8 @@ def getcmdline():
help = "Final maximal mesh coarsening exponent [default: 1]", default = 2)
p.add_option("--nB", action = "store", dest = "nB",\
help = "nB [default: 24]", default = 24)
p.add_option("--MeshType", action = "store", dest = "MeshType",\
help = "mesh type [default: 0]", default = 0)
p.add_option("--MeshType", action = "store", dest = "MeshType",\
help = "mesh type [default: 0]", default = 0)
p.add_option("--MeshUpdateBasis", action = "store", dest = "MeshUpdateBasis",\
help = "mesh update basis [default: 2]", default = 2)
p.add_option("--FinalMeshUpdateBasis", action = "store", dest = "FinalMeshUpdateBasis",\
......@@ -141,6 +141,26 @@ def getcmdline():
help = "type [default: 5]", default = 5)
p.add_option("--finaltype", action = "store", dest = "finaltype",\
help = "finaltype [default: 12]", default = 12)
p.add_option("--HybridSearch", action = "store_true", dest = "HybridSearch",\
help = "HybridSearch [default: false]", default = False)
p.add_option("--HybridSearchLatticeAtOnce", action = "store_true", dest = "HybridSearchLatticeAtOnce",\
help = "HybridSearchLatticeAtOnce [default: false]", default = False)
p.add_option("--HybridSearchMismatch", action = "store", dest = "HybridSearchMismatch",\
help = "HybridSearchMismatch [default: 0.2]", default = 0.2)
p.add_option("--HybridSearchLattice", action = "store", dest = "HybridSearchLattice",\
help = "HybridSearchLattice [default: an-star]", default = "an-star")
p.add_option("--HybridSearchPoints", action = "store", dest = "HybridSearchPoints",\
help = "HybridSearchPoints [default: 32]", default = 32)
p.add_option("--FinalHybridSearch", action = "store_true", dest = "FinalHybridSearch",\
help = "FinalHybridSearch [default: false]", default = False)
p.add_option("--FinalHybridSearchLatticeAtOnce", action = "store_true", dest = "FinalHybridSearchLatticeAtOnce",\
help = "FinalHybridSearchLatticeAtOnce [default: false]", default = False)
p.add_option("--FinalHybridSearchMismatch", action = "store", dest = "FinalHybridSearchMismatch",\
help = "FinalHybridSearchMismatch [default: 0.2]", default = 0.2)
p.add_option("--FinalHybridSearchLattice", action = "store", dest = "FinalHybridSearchLattice",\
help = "FinalHybridSearchLattice [default: an-star]", default = "an-star")
p.add_option("--FinalHybridSearchPoints", action = "store", dest = "FinalHybridSearchPoints",\
help = "FinalHybridSearchPoints [default: 32]", default = 32)
p.add_option("--donotclean", action = "store_true", dest = "donotclean",\
help = "Do not clean after exception [default: False]", default = False)
(o, a) = p.parse_args()
......@@ -894,6 +914,19 @@ def FStatNomad(p):
cmd = cmd + ' --ComputeDTS'
if p['DumpCache'] > 0:
cmd = cmd + ' --DumpCache'
if p['HybridSearch']:
cmd = cmd + ' --HybridSearch'
if p['HybridSearchLatticeAtOnce']:
cmd = cmd + ' --HybridSearchLatticeAtOnce'
cmd = cmd + ' --HybridSearchMismatch="%f" --HybridSearchLattice="%s" --HybridSearchPoints="%d"'%(p['HybridSearchMismatch'],p['HybridSearchLattice'],p['HybridSearchPoints'])
if p['FinalHybridSearch']:
cmd = cmd + ' --FinalHybridSearch'
if p['FinalHybridSearchLatticeAtOnce']:
cmd = cmd + ' --FinalHybridSearchLatticeAtOnce'
cmd = cmd + ' --FinalHybridSearchMismatch="%f" --FinalHybridSearchLattice="%s" --FinalHybridSearchPoints="%d"'%(p['FinalHybridSearchMismatch'],p['FinalHybridSearchLattice'],p['FinalHybridSearchPoints'])
print cmd
cmdout = cplexec(cmd)
return cmdout
......@@ -1082,6 +1115,17 @@ def do_nomad_search(c,segments,workdir,sg,signal,offsignal,directedsearch):
p['f2dot'] = dirs['f2dot']
p['f3dot'] = dirs['f3dot']
p['HybridSearch'] = c['HybridSearch']
p['HybridSearchLatticeAtOnce'] = c['HybridSearchLatticeAtOnce']
p['HybridSearchMismatch'] = c['HybridSearchMismatch']
p['HybridSearchLattice'] = c['HybridSearchLattice']
p['HybridSearchPoints'] = c['HybridSearchPoints']
p['FinalHybridSearch'] = c['FinalHybridSearch']
p['FinalHybridSearchLatticeAtOnce'] = c['FinalHybridSearchLatticeAtOnce']
p['FinalHybridSearchMismatch'] = c['FinalHybridSearchMismatch']
p['FinalHybridSearchLattice'] = c['FinalHybridSearchLattice']
p['FinalHybridSearchPoints'] = c['FinalHybridSearchPoints']
cmdout = FStatNomad(p)
print cmdout
......@@ -1369,7 +1413,7 @@ def main():
c['nB'] = int(o.nB)
c['MeshUpdateBasis'] = float(o.MeshUpdateBasis)
c['FinalMeshUpdateBasis'] = float(o.FinalMeshUpdateBasis)
c['MeshType'] = int(o.MeshType)
c['MeshType'] = int(o.MeshType)
c['NoiseLimit'] = float(o.NoiseLimit)
c['ltmads'] = float(o.ltmads)
c['finalltmads'] = float(o.finalltmads)
......@@ -1377,6 +1421,16 @@ def main():
c['finalresearch'] = int(o.finalresearch)
c['type'] = int(o.type)
c['finaltype'] = int(o.finaltype)
c['HybridSearch'] = bool(o.HybridSearch)
c['HybridSearchLatticeAtOnce'] = bool(o.HybridSearchLatticeAtOnce)
c['HybridSearchMismatch'] = float(o.HybridSearchMismatch)
c['HybridSearchLattice'] = str(o.HybridSearchLattice)
c['HybridSearchPoints'] = int(o.HybridSearchPoints)
c['FinalHybridSearch'] = bool(o.FinalHybridSearch)
c['FinalHybridSearchLatticeAtOnce'] = bool(o.FinalHybridSearchLatticeAtOnce)
c['FinalHybridSearchMismatch'] = float(o.FinalHybridSearchMismatch)
c['FinalHybridSearchLattice'] = str(o.FinalHybridSearchLattice)
c['FinalHybridSearchPoints'] = int(o.FinalHybridSearchPoints)
c['donotclean'] = bool(o.donotclean)
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment