Commit 33b04767da5716f9cd7c7ee35fa7f96511a5ae1c
Committed by
Jürgen Knödlseder
1 parent
effb30e5
added a parameter to set the threshold for significant variability
Showing
3 changed files
with
6 additions
and
1 deletions
src/ctfindvar/ctfindvar.cpp
| ... | ... | @@ -472,7 +472,7 @@ void ctfindvar::get_variability_sig(const int& pix_number, |
| 472 | 472 | #ifdef G_DEBUG |
| 473 | 473 | //std::cout << "significance of the bin : " << i << " : " << sig << " - alpha : " << alpha << " - non: " << non << " - noff: " << noff << "- excess: " << non - alpha*noff << std::endl; |
| 474 | 474 | #endif |
| 475 | - if (sig>4.5 ) // if the bin is significant, it is removed from the bckg and we loop again. | |
| 475 | + if (sig>m_sig_threshold ) // if the bin is significant, it is removed from the bckg and we loop again. | |
| 476 | 476 | { |
| 477 | 477 | accepted_bin_bckg_vector[i]=0; |
| 478 | 478 | background_validated=false; |
| ... | ... | @@ -723,6 +723,9 @@ void ctfindvar::get_parameters(void) |
| 723 | 723 | // Get minimum counts for a bin to be considered in Noff calculation |
| 724 | 724 | m_minoff = (*this)["minoff"].real(); |
| 725 | 725 | |
| 726 | + // Get minimum significance to set a source as variable | |
| 727 | + m_sig_threshold = (*this)["sig_thr"].real(); | |
| 728 | + | |
| 726 | 729 | // Write parameters into logger |
| 727 | 730 | log_parameters(TERSE); |
| 728 | 731 | ... | ... |
src/ctfindvar/ctfindvar.hpp
| ... | ... | @@ -95,6 +95,7 @@ protected: |
| 95 | 95 | GModels m_inmodel; //!< List of models for source positions |
| 96 | 96 | GSkyDir m_max_sig_dir; //!< Sky direction associated with maximum significance |
| 97 | 97 | double m_minoff; //!< Minimum counts for use in significance calculation |
| 98 | + double m_sig_threshold; //!< Minimum significance required to set source as variable | |
| 98 | 99 | GSkyMap m_peaksigmap; //!< Skymap holding the maximum significance |
| 99 | 100 | GNdarray m_pixsigsrc; //!< Store distributions of the source significances |
| 100 | 101 | GNdarray m_pixsigmax; //!< Store distribution for pixel with max significance | ... | ... |
src/ctfindvar/ctfindvar.par
| ... | ... | @@ -25,6 +25,7 @@ prefix, s, a, findvar_,,, "Prefix for output files" |
| 25 | 25 | minoff, r, h, 0,,, "Minimum required events in off bin for computing Noff and alpha" |
| 26 | 26 | emin, r, a, 0,,, "Lower energy limit (units of TeV; 0 => no cut)" |
| 27 | 27 | emax, r, a, 0,,, "Upper energy limit (units of TeV; 0 => no cut)" |
| 28 | +sig_thr, r, h, 4.5,,, "Significance threshold for variability detection" | |
| 28 | 29 | smoothkrnl, s, h, NONE, GAUSSIAN|DISK|NONE,, "Smoothing kernel for counts maps" |
| 29 | 30 | smoothpar, r, h, 0.05,,, "Parameter for the smoothing kernel" |
| 30 | 31 | ... | ... |