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

add sky start step scaling

parent 7f680534
......@@ -3338,7 +3338,7 @@ void FStatNomad::HybridSearchCreateLattice(gsl_matrix *g, REAL4 m,CHAR *lattice)
// Print number of templates
UINT8 ntemplates = XLALTotalLatticeTilingPoints(itr);
XLAL_CHECK_MAIN(ntemplates > 0, XLAL_EFUNC);
printf("HybridSearch total number of templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
// printf("HybridSearch total number of templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
}
......@@ -3463,7 +3463,7 @@ void SCHybridSearch::search( Mads & mads, int &nb_search_pts, bool &stop, stop_t
pdirections.push_back(directions.at(i));
pdirections.at(i).min = (*x)[i].value()/directions.at(i).scale - gsl_vector_get(minext,i);
pdirections.at(i).max = (*x)[i].value()/directions.at(i).scale + gsl_vector_get(minext,i);
printf("size in direction %d:%.16e,%.16e\n",i,gsl_matrix_get(g,i,i),pdirections.at(i).max-pdirections.at(i).min);
// printf("size in direction %d:%.16e,%.16e\n",i,gsl_matrix_get(g,i,i),pdirections.at(i).max-pdirections.at(i).min);
}
for (INT4 i = 0; i < directions.size(); i++) {
......@@ -3486,7 +3486,7 @@ void SCHybridSearch::search( Mads & mads, int &nb_search_pts, bool &stop, stop_t
// Print number of templates
UINT8 ntemplates = XLALTotalLatticeTilingPoints(itr);
XLAL_CHECK_MAIN(ntemplates > 0, XLAL_EFUNC);
printf("HybridSearch total number of partial templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
// printf("HybridSearch total number of partial templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
}
else {
itr = XLALCreateLatticeTilingIterator( tiling, n );
......@@ -3494,7 +3494,7 @@ void SCHybridSearch::search( Mads & mads, int &nb_search_pts, bool &stop, stop_t
// Print number of templates
UINT8 ntemplates = XLALTotalLatticeTilingPoints(itr);
XLAL_CHECK_MAIN(ntemplates > 0, XLAL_EFUNC);
printf("HybridSearch total number of templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
// printf("HybridSearch total number of templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
}
......@@ -3641,7 +3641,7 @@ void FCHybridSearch::search ( Mads &mads, int &nb_search_pts, bool &stop, stop_t
pdirections.push_back(directions.at(i));
pdirections.at(i).min = (*x)[i].value()/directions.at(i).scale - gsl_vector_get(minext,i);
pdirections.at(i).max = (*x)[i].value()/directions.at(i).scale + gsl_vector_get(minext,i);
printf("size in direction %d:%.16e,%.16e,%.16e\n",i,gsl_matrix_get(g,i,i),(*x)[i].value()/directions.at(i).scale,pdirections.at(i).max-pdirections.at(i).min);
// printf("size in direction %d:%.16e,%.16e,%.16e\n",i,gsl_matrix_get(g,i,i),(*x)[i].value()/directions.at(i).scale,pdirections.at(i).max-pdirections.at(i).min);
}
for (INT4 i = 0; i < directions.size(); i++) {
......@@ -3664,13 +3664,13 @@ void FCHybridSearch::search ( Mads &mads, int &nb_search_pts, bool &stop, stop_t
// Print number of templates
UINT8 ntemplates = XLALTotalLatticeTilingPoints(itr);
XLAL_CHECK_MAIN(ntemplates > 0, XLAL_EFUNC);
printf("HybridSearch total number of partial templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
// printf("HybridSearch total number of partial templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
}
else {
itr = XLALCreateLatticeTilingIterator( tiling, n );
tloc = XLALCreateLatticeTilingLocator(tiling);
UINT8 ntemplates = XLALTotalLatticeTilingPoints( itr );
printf("HybridSearch total number of templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
// printf("HybridSearch total number of templates: %" LAL_UINT8_FORMAT "\n", ntemplates);
}
......
......@@ -173,6 +173,7 @@ extern "C" {
#define NUM_FACT 7
#define STARTSTEPFACTOR 0.1
#define STARTSTEPFACTORSKY 100
#define USETYPE_SEARCH 0
#define USETYPE_EXTENDS 1
......@@ -1346,11 +1347,11 @@ public:
};
REAL8 ComputeStartStep(INT4 i,REAL8 e,REAL8 s,REAL8 avg2FNseg) {
return s * e * sqrt(avg2FNseg);
return s * e * sqrt(avg2FNseg);
};
REAL8 ComputeStartStep(INT4 i,gsl_vector *e,REAL8 s,REAL8 avg2FNseg) {
return s * gsl_vector_get(e,i) * sqrt(avg2FNseg);
return s * gsl_vector_get(e,i) * sqrt(avg2FNseg);
};
void TargetedSearch(BOOLEAN v) {
......@@ -1701,11 +1702,11 @@ public:
}
else {
if (!FixedDirection.at(PID_ALPHA)) {
directions.at(n).startstep = ComputeStartStep(n,extends,STARTSTEPFACTOR,avg2FNseg());
directions.at(n).startstep = ComputeStartStep(n,extends,STARTSTEPFACTORSKY,avg2FNseg());
n++;
}
if (!FixedDirection.at(PID_DELTA)) {
directions.at(n).startstep = ComputeStartStep(n,extends,STARTSTEPFACTOR,avg2FNseg());
directions.at(n).startstep = ComputeStartStep(n,extends,STARTSTEPFACTORSKY,avg2FNseg());
n++;
}
if (!FixedDirection.at(PID_FREQ)) {
......@@ -1725,6 +1726,10 @@ public:
n++;
}
}
for (int i = 0; i < directions.size(); i++){
printf("startstep at %d : %.16e\n",i,directions.at(i).startstep);
}
};
INT4 UpdateDirections(ExPoint *p) {
......
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