From 067e0e8e64bf5342297ff9a1cbccd601b19bcd61 Mon Sep 17 00:00:00 2001 From: Josh Cardenzana Date: Tue, 13 Nov 2018 23:00:49 +0100 Subject: [PATCH] Simplify algorithm removing redundant variables --- src/ctfindvar/ctfindvar.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ctfindvar/ctfindvar.cpp b/src/ctfindvar/ctfindvar.cpp index 5883ee2..3c1e78f 100644 --- a/src/ctfindvar/ctfindvar.cpp +++ b/src/ctfindvar/ctfindvar.cpp @@ -403,7 +403,6 @@ void ctfindvar::get_variability_sig(const int& pix_number, { std::vector accepted_bin_bckg_vector(nbins, true); std::vector excess_bin_vector(nbins, 0.0); - std::vector background_bin_vector(nbins, 0); bool background_validated=false; double non, noff; double alpha, sig; @@ -418,7 +417,6 @@ void ctfindvar::get_variability_sig(const int& pix_number, for (int i=0; i< nbins; i++) //looping over all the GTIs of the pixel { - alpha=0; //the GTI is discared from bckg calculation and not checked again. if (accepted_bin_bckg_vector[i]==0) { continue; @@ -428,19 +426,20 @@ void ctfindvar::get_variability_sig(const int& pix_number, accepted_bin_bckg_vector[i]=0; continue; } - int background_count=0; + + noff = 0.0; + alpha = 0; for (int j=0;j