diff --git a/src/ctfindvar/ctfindvar.cpp b/src/ctfindvar/ctfindvar.cpp index d7102e7..78b9713 100644 --- a/src/ctfindvar/ctfindvar.cpp +++ b/src/ctfindvar/ctfindvar.cpp @@ -472,7 +472,7 @@ void ctfindvar::get_variability_sig(const int& pix_number, #ifdef G_DEBUG //std::cout << "significance of the bin : " << i << " : " << sig << " - alpha : " << alpha << " - non: " << non << " - noff: " << noff << "- excess: " << non - alpha*noff << std::endl; #endif - if (sig>4.5 ) // if the bin is significant, it is removed from the bckg and we loop again. + if (sig>m_sig_threshold ) // if the bin is significant, it is removed from the bckg and we loop again. { accepted_bin_bckg_vector[i]=0; background_validated=false; @@ -723,6 +723,9 @@ void ctfindvar::get_parameters(void) // Get minimum counts for a bin to be considered in Noff calculation m_minoff = (*this)["minoff"].real(); + // Get minimum significance to set a source as variable + m_sig_threshold = (*this)["sig_thr"].real(); + // Write parameters into logger log_parameters(TERSE); diff --git a/src/ctfindvar/ctfindvar.hpp b/src/ctfindvar/ctfindvar.hpp index 792514a..637782f 100644 --- a/src/ctfindvar/ctfindvar.hpp +++ b/src/ctfindvar/ctfindvar.hpp @@ -95,6 +95,7 @@ protected: GModels m_inmodel; //!< List of models for source positions GSkyDir m_max_sig_dir; //!< Sky direction associated with maximum significance double m_minoff; //!< Minimum counts for use in significance calculation + double m_sig_threshold; //!< Minimum significance required to set source as variable GSkyMap m_peaksigmap; //!< Skymap holding the maximum significance GNdarray m_pixsigsrc; //!< Store distributions of the source significances GNdarray m_pixsigmax; //!< Store distribution for pixel with max significance diff --git a/src/ctfindvar/ctfindvar.par b/src/ctfindvar/ctfindvar.par index a202e0a..068e872 100644 --- a/src/ctfindvar/ctfindvar.par +++ b/src/ctfindvar/ctfindvar.par @@ -25,6 +25,7 @@ prefix, s, a, findvar_,,, "Prefix for output files" minoff, r, h, 0,,, "Minimum required events in off bin for computing Noff and alpha" emin, r, a, 0,,, "Lower energy limit (units of TeV; 0 => no cut)" emax, r, a, 0,,, "Upper energy limit (units of TeV; 0 => no cut)" +sig_thr, r, h, 4.5,,, "Significance threshold for variability detection" smoothkrnl, s, h, NONE, GAUSSIAN|DISK|NONE,, "Smoothing kernel for counts maps" smoothpar, r, h, 0.05,,, "Parameter for the smoothing kernel"