From 773ad107dd767b3262c929a81649a3bb36257653 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 12 Jul 2016 08:21:54 +0200 Subject: [PATCH] Remove unused imports --- cscripts/cstsmapsplit.py | 8 ++++---- examples/generate_prod3_irfs.py | 1 - examples/make_ts_distributions.py | 1 - examples/show_model.py | 8 -------- examples/show_obs.py | 1 - examples/show_ts_distribution.py | 1 - 6 files changed, 4 insertions(+), 16 deletions(-) diff --git a/cscripts/cstsmapsplit.py b/cscripts/cstsmapsplit.py index 135ca08..29f255e 100755 --- a/cscripts/cstsmapsplit.py +++ b/cscripts/cstsmapsplit.py @@ -19,7 +19,6 @@ # # ========================================================================== import sys -import os import math import gammalib import ctools @@ -56,6 +55,7 @@ class cstsmapsplit(ctools.cscript): self._outfile = gammalib.GFilename() self._map = gammalib.GSkyMap() self._cmd = [] + self._srcname = '' # Initialise observation container from constructor arguments. self._obs, argv = self._set_input_obs(argv) @@ -83,9 +83,9 @@ class cstsmapsplit(ctools.cscript): self._obs.models(self['inmodel'].filename()) # Get TS map paramters - self._map = self._create_map(self._obs) - self._srcname = self['srcname'].string() - self._outmap = self['outmap'].filename() + self._map = self._create_map(self._obs) + self._srcname = self['srcname'].string() + self._outmap = self['outmap'].filename() # Get additional parameters self._bins_per_job = self['bins_per_job'].integer() diff --git a/examples/generate_prod3_irfs.py b/examples/generate_prod3_irfs.py index 6c44972..acfb92c 100755 --- a/examples/generate_prod3_irfs.py +++ b/examples/generate_prod3_irfs.py @@ -19,7 +19,6 @@ # # ========================================================================== import sys -import gammalib import cscripts diff --git a/examples/make_ts_distributions.py b/examples/make_ts_distributions.py index fbed419..b18a74f 100755 --- a/examples/make_ts_distributions.py +++ b/examples/make_ts_distributions.py @@ -19,7 +19,6 @@ # # ========================================================================== import sys -import time import cscripts diff --git a/examples/show_model.py b/examples/show_model.py index a160016..976cc7e 100755 --- a/examples/show_model.py +++ b/examples/show_model.py @@ -19,7 +19,6 @@ # # ========================================================================== import sys -import math import gammalib try: import matplotlib.pyplot as plt @@ -73,13 +72,6 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100, plotfile=''): x.append(energy.TeV()) y.append(value) - # Set minimum and maximum - #max = math.pow(10.0, math.log10(max)+1) - #if min < 0.0001*max: - # min = 0.0001*max - #min = math.pow(10.0, math.log10(min)-1) - - # Show spectrum plt.figure() plt.title(model.name()+' ('+spectrum.type()+')') diff --git a/examples/show_obs.py b/examples/show_obs.py index 3dd46a0..c7d2953 100755 --- a/examples/show_obs.py +++ b/examples/show_obs.py @@ -20,7 +20,6 @@ # ========================================================================== import sys import gammalib -import ctools import cscripts try: import matplotlib.pyplot as plt diff --git a/examples/show_ts_distribution.py b/examples/show_ts_distribution.py index 13f580f..1288237 100755 --- a/examples/show_ts_distribution.py +++ b/examples/show_ts_distribution.py @@ -23,7 +23,6 @@ import csv import math try: import matplotlib.pyplot as plt - import matplotlib.mlab as mlab plt.figure() plt.close() except: -- libgit2 0.21.4