Commit 773ad107dd767b3262c929a81649a3bb36257653
1 parent
50bfdf53
Remove unused imports
Showing
6 changed files
with
4 additions
and
16 deletions
cscripts/cstsmapsplit.py
| @@ -19,7 +19,6 @@ | @@ -19,7 +19,6 @@ | ||
| 19 | # | 19 | # |
| 20 | # ========================================================================== | 20 | # ========================================================================== |
| 21 | import sys | 21 | import sys |
| 22 | -import os | ||
| 23 | import math | 22 | import math |
| 24 | import gammalib | 23 | import gammalib |
| 25 | import ctools | 24 | import ctools |
| @@ -56,6 +55,7 @@ class cstsmapsplit(ctools.cscript): | @@ -56,6 +55,7 @@ class cstsmapsplit(ctools.cscript): | ||
| 56 | self._outfile = gammalib.GFilename() | 55 | self._outfile = gammalib.GFilename() |
| 57 | self._map = gammalib.GSkyMap() | 56 | self._map = gammalib.GSkyMap() |
| 58 | self._cmd = [] | 57 | self._cmd = [] |
| 58 | + self._srcname = '' | ||
| 59 | 59 | ||
| 60 | # Initialise observation container from constructor arguments. | 60 | # Initialise observation container from constructor arguments. |
| 61 | self._obs, argv = self._set_input_obs(argv) | 61 | self._obs, argv = self._set_input_obs(argv) |
| @@ -83,9 +83,9 @@ class cstsmapsplit(ctools.cscript): | @@ -83,9 +83,9 @@ class cstsmapsplit(ctools.cscript): | ||
| 83 | self._obs.models(self['inmodel'].filename()) | 83 | self._obs.models(self['inmodel'].filename()) |
| 84 | 84 | ||
| 85 | # Get TS map paramters | 85 | # Get TS map paramters |
| 86 | - self._map = self._create_map(self._obs) | ||
| 87 | - self._srcname = self['srcname'].string() | ||
| 88 | - self._outmap = self['outmap'].filename() | 86 | + self._map = self._create_map(self._obs) |
| 87 | + self._srcname = self['srcname'].string() | ||
| 88 | + self._outmap = self['outmap'].filename() | ||
| 89 | 89 | ||
| 90 | # Get additional parameters | 90 | # Get additional parameters |
| 91 | self._bins_per_job = self['bins_per_job'].integer() | 91 | self._bins_per_job = self['bins_per_job'].integer() |
examples/generate_prod3_irfs.py
| @@ -19,7 +19,6 @@ | @@ -19,7 +19,6 @@ | ||
| 19 | # | 19 | # |
| 20 | # ========================================================================== | 20 | # ========================================================================== |
| 21 | import sys | 21 | import sys |
| 22 | -import gammalib | ||
| 23 | import cscripts | 22 | import cscripts |
| 24 | 23 | ||
| 25 | 24 |
examples/make_ts_distributions.py
examples/show_model.py
| @@ -19,7 +19,6 @@ | @@ -19,7 +19,6 @@ | ||
| 19 | # | 19 | # |
| 20 | # ========================================================================== | 20 | # ========================================================================== |
| 21 | import sys | 21 | import sys |
| 22 | -import math | ||
| 23 | import gammalib | 22 | import gammalib |
| 24 | try: | 23 | try: |
| 25 | import matplotlib.pyplot as plt | 24 | import matplotlib.pyplot as plt |
| @@ -73,13 +72,6 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100, plotfile=''): | @@ -73,13 +72,6 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100, plotfile=''): | ||
| 73 | x.append(energy.TeV()) | 72 | x.append(energy.TeV()) |
| 74 | y.append(value) | 73 | y.append(value) |
| 75 | 74 | ||
| 76 | - # Set minimum and maximum | ||
| 77 | - #max = math.pow(10.0, math.log10(max)+1) | ||
| 78 | - #if min < 0.0001*max: | ||
| 79 | - # min = 0.0001*max | ||
| 80 | - #min = math.pow(10.0, math.log10(min)-1) | ||
| 81 | - | ||
| 82 | - | ||
| 83 | # Show spectrum | 75 | # Show spectrum |
| 84 | plt.figure() | 76 | plt.figure() |
| 85 | plt.title(model.name()+' ('+spectrum.type()+')') | 77 | plt.title(model.name()+' ('+spectrum.type()+')') |
examples/show_obs.py
| @@ -20,7 +20,6 @@ | @@ -20,7 +20,6 @@ | ||
| 20 | # ========================================================================== | 20 | # ========================================================================== |
| 21 | import sys | 21 | import sys |
| 22 | import gammalib | 22 | import gammalib |
| 23 | -import ctools | ||
| 24 | import cscripts | 23 | import cscripts |
| 25 | try: | 24 | try: |
| 26 | import matplotlib.pyplot as plt | 25 | import matplotlib.pyplot as plt |
examples/show_ts_distribution.py