diff --git a/cscripts/csbkgmodel.py b/cscripts/csbkgmodel.py index 5e98deb..d0aa695 100755 --- a/cscripts/csbkgmodel.py +++ b/cscripts/csbkgmodel.py @@ -19,7 +19,6 @@ # # ========================================================================== import sys -import math import gammalib import ctools @@ -96,10 +95,10 @@ class csbkgmodel(ctools.csobservation): # Query input parameters spatial = self['spatial'].string() - if self['spatial'].string() == 'GAUSS': + if spatial == 'GAUSS': self['gradient'].boolean() self['spectral'].string() - if self['spatial'].string() == 'NODES': + if spatial == 'NODES': self._create_energies() self['runwise'].boolean() self['emin'].real() @@ -330,7 +329,6 @@ class csbkgmodel(ctools.csobservation): spectral = model.spectral() nodes = spectral.nodes() for i in range(nodes): - ieng = 2*(nodes - i) - 2 iint = 2*(nodes - i) - 1 if spectral[iint].error() == 0.0: spectral.remove(nodes - i - 1) diff --git a/examples/show_significance_distribution.py b/examples/show_significance_distribution.py index 06f9ea8..db1c674 100755 --- a/examples/show_significance_distribution.py +++ b/examples/show_significance_distribution.py @@ -2,7 +2,7 @@ # ========================================================================== # Shows the distribution of significances in a given significance map. # -# Copyright (C) 2018 Andreas Specovius +# Copyright (C) 2018-2019 Andreas Specovius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -50,7 +50,6 @@ import gammalib import cscripts try: import matplotlib.pyplot as plt - import matplotlib.mlab as mlab plt.figure() plt.close() except (ImportError, RuntimeError): diff --git a/src/ctfindvar/ctfindvar.cpp b/src/ctfindvar/ctfindvar.cpp index 069993a..03ebdcb 100644 --- a/src/ctfindvar/ctfindvar.cpp +++ b/src/ctfindvar/ctfindvar.cpp @@ -768,10 +768,10 @@ void ctfindvar::analyse_cube(void) for (int ipix = 0; ipix < m_counts.npix(); ++ipix) { // Compute total counts for pixel - double total_counts = 0.0; - for (int k = 0; k < nbins; ++k) { - total_counts += m_counts(ipix, k); - } + //double total_counts = 0.0; + //for (int k = 0; k < nbins; ++k) { + // total_counts += m_counts(ipix, k); + //} // Getting the variability significance for the current pixel GNdarray pixSig = get_variability_sig(ipix); diff --git a/test/test_ctfindvar.py b/test/test_ctfindvar.py index 0c0c4da..b0980b5 100755 --- a/test/test_ctfindvar.py +++ b/test/test_ctfindvar.py @@ -2,7 +2,7 @@ # ========================================================================== # This scripts performs unit tests for the ctfindvar tool. # -# Copyright (C) 2018 Simon Bonnefoy +# Copyright (C) 2018-2019 Simon Bonnefoy # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ # along with this program. If not, see . # # ========================================================================== -import os import gammalib import ctools from testing import test