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

work on hybrid search

parent cd2e03ce
......@@ -593,7 +593,7 @@ int main(int argc, char *argv[]) {
MFCSearch->Semicohmetric(semig);
}
if (MFCSearch->HybridSearch()) {
if (MFCSearch->HybridSearch() && !MFCSearch->HybridSearchLatticeAtOnce()) {
MFCSearch->HybridSearchCreateLattice(MFCSearch->Semicohmetric(),MFCSearch->HybridSearchMismatch(),MFCSearch->HybridSearchLattice());
}
......@@ -727,7 +727,7 @@ int main(int argc, char *argv[]) {
MFCSearch->Cohmetric(g);
}
if (MFCSearch->HybridSearch()) {
if (MFCSearch->HybridSearch() && !MFCSearch->HybridSearchLatticeAtOnce()) {
MFCSearch->HybridSearchCreateLattice(MFCSearch->Cohmetric(),MFCSearch->HybridSearchMismatch(),MFCSearch->HybridSearchLattice());
}
......@@ -866,7 +866,7 @@ int main(int argc, char *argv[]) {
MFCSearch->SaveMetric(MFCSearch->MetricFile(SCStage,SCMETRIC),MFCSearch->Semicohmetric());
}
if (MFCSearch->HybridSearch()) {
if (MFCSearch->HybridSearch() && !MFCSearch->HybridSearchLatticeAtOnce()) {
MFCSearch->HybridSearchCreateLattice(MFCSearch->Semicohmetric(),MFCSearch->HybridSearchMismatch(),MFCSearch->HybridSearchLattice());
}
......@@ -1077,7 +1077,7 @@ int main(int argc, char *argv[]) {
MFCSearch->write_dts_file();
}
if (MFCSearch->FinalHybridSearch()) {
if (MFCSearch->FinalHybridSearch() && MFCSearch->FinalHybridSearchLatticeAtOnce()) {
MFCSearch->HybridSearchCreateLattice(MFCSearch->Cohmetric(),MFCSearch->FinalHybridSearchMismatch(),MFCSearch->FinalHybridSearchLattice());
}
......@@ -1355,12 +1355,14 @@ INT4 FCSearch::XLALInitUserVars ( int argc, char *argv[] )
uvar->BNSLEL = TRUE;
uvar->HybridSearch = FALSE;
uvar->HybridSearchLatticeAtOnce = FALSE;
uvar->HybridSearchMismatch = 0.1;
uvar->HybridSearchLattice = (char*)LALCalloc( 16, sizeof(CHAR) );
strcpy(uvar->HybridSearchLattice, "an-star");
uvar->HybridSearchPoints = 16;
uvar->FinalHybridSearch = FALSE;
uvar->FinalHybridSearchLatticeAtOnce = FALSE;
uvar->FinalHybridSearchMismatch = 0.8;
uvar->FinalHybridSearchLattice = (char*)LALCalloc( 16, sizeof(CHAR) );
strcpy(uvar->FinalHybridSearchLattice, "an-star");
......@@ -1525,10 +1527,12 @@ INT4 FCSearch::XLALInitUserVars ( int argc, char *argv[] )
XLALRegisterUvarMember( BinarySearch,BOOLEAN, 0, OPTIONAL, "Do binary search");
XLALRegisterUvarMember( BNSLEL,BOOLEAN, 0, DEVELOPER, "Use low-eccentricity approximation to compute BNS metric [only TRUE is supported for now!]");
XLALRegisterUvarMember( HybridSearch,BOOLEAN, 0, OPTIONAL, "Do hybrid search (grid search in the Nomad search step)");
XLALRegisterUvarMember( HybridSearchLatticeAtOnce,BOOLEAN, 0, OPTIONAL, "Compute the lattice for the hybrid search at once");
XLALRegisterUvarMember( HybridSearchMismatch,REAL8, 0, OPTIONAL, "Hybrid search maximal mismatch");
XLALRegisterUvarMember( HybridSearchLattice,STRING, 0, OPTIONAL, "Hybrid search lattice type: 'an-star' or 'cubic'");
XLALRegisterUvarMember( HybridSearchPoints,INT4, 0, OPTIONAL, "Hybrid search number of points");
XLALRegisterUvarMember( FinalHybridSearch,BOOLEAN, 0, OPTIONAL, "Final do hybrid search (grid search in the Nomad search step)");
XLALRegisterUvarMember( FinalHybridSearchLatticeAtOnce,BOOLEAN, 0, OPTIONAL, "Final compute the lattice for the hybrid search at once");
XLALRegisterUvarMember( FinalHybridSearchMismatch,REAL8, 0, OPTIONAL, "Final hybrid search maximal mismatch");
XLALRegisterUvarMember( FinalHybridSearchLattice,STRING, 0, OPTIONAL, "Final hybrid search lattice type: 'an-star' or 'cubic'");
XLALRegisterUvarMember( FinalHybridSearchPoints,INT4, 0, OPTIONAL, "Final hybrid search number of points");
......@@ -1968,11 +1972,13 @@ INT4 FCSearch::XLALInitUserVars ( int argc, char *argv[] )
RestrictionType(PITYPEMETRIC);
HybridSearch(uvar->HybridSearch);
HybridSearchLatticeAtOnce(uvar->HybridSearchLatticeAtOnce);
HybridSearchMismatch(uvar->HybridSearchMismatch);
HybridSearchLattice(uvar->HybridSearchLattice);
HybridSearchPoints(uvar->HybridSearchPoints);
FinalHybridSearch(uvar->FinalHybridSearch);
FinalHybridSearchLatticeAtOnce(uvar->FinalHybridSearchLatticeAtOnce);
FinalHybridSearchMismatch(uvar->FinalHybridSearchMismatch);
FinalHybridSearchLattice(uvar->FinalHybridSearchLattice);
FinalHybridSearchPoints(uvar->FinalHybridSearchPoints);
......
......@@ -174,10 +174,12 @@ extern "C" {
REAL8 HybridSearchMismatch;
CHAR *HybridSearchLattice;
INT4 HybridSearchPoints;
BOOLEAN HybridSearchLatticeAtOnce;
BOOLEAN FinalHybridSearch;
REAL8 FinalHybridSearchMismatch;
CHAR *FinalHybridSearchLattice;
INT4 FinalHybridSearchPoints;
BOOLEAN FinalHybridSearchLatticeAtOnce;
INT4 metricType;
......
......@@ -2027,6 +2027,14 @@ public:
return var_HybridSearch;
}
void HybridSearchLatticeAtOnce(BOOLEAN v){
var_HybridSearchLatticeAtOnce = v;
}
BOOLEAN HybridSearchLatticeAtOnce(){
return var_HybridSearchLatticeAtOnce;
}
void HybridSearchMismatch(REAL8 v){
var_HybridSearchMismatch = v;
}
......@@ -2058,7 +2066,15 @@ public:
BOOLEAN FinalHybridSearch(){
return var_FinalHybridSearch;
}
void FinalHybridSearchLatticeAtOnce(BOOLEAN v){
var_FinalHybridSearchLatticeAtOnce = v;
}
BOOLEAN FinalHybridSearchLatticeAtOnce(){
return var_FinalHybridSearchLatticeAtOnce;
}
void FinalHybridSearchMismatch(REAL8 v){
var_FinalHybridSearchMismatch = v;
}
......@@ -2190,10 +2206,12 @@ private:
REAL8 var_SignalPeriod;
BOOLEAN var_HybridSearch;
BOOLEAN var_FinalHybridSearch;
BOOLEAN var_HybridSearchLatticeAtOnce;
REAL4 var_HybridSearchMismatch;
CHAR *var_HybridSearchLattice;
INT4 var_HybridSearchPoints;
BOOLEAN var_FinalHybridSearch;
BOOLEAN var_FinalHybridSearchLatticeAtOnce;
REAL4 var_FinalHybridSearchMismatch;
CHAR *var_FinalHybridSearchLattice;
INT4 var_FinalHybridSearchPoints;
......
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