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 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import os | |
| 23 | 22 | import math |
| 24 | 23 | import gammalib |
| 25 | 24 | import ctools |
| ... | ... | @@ -56,6 +55,7 @@ class cstsmapsplit(ctools.cscript): |
| 56 | 55 | self._outfile = gammalib.GFilename() |
| 57 | 56 | self._map = gammalib.GSkyMap() |
| 58 | 57 | self._cmd = [] |
| 58 | + self._srcname = '' | |
| 59 | 59 | |
| 60 | 60 | # Initialise observation container from constructor arguments. |
| 61 | 61 | self._obs, argv = self._set_input_obs(argv) |
| ... | ... | @@ -83,9 +83,9 @@ class cstsmapsplit(ctools.cscript): |
| 83 | 83 | self._obs.models(self['inmodel'].filename()) |
| 84 | 84 | |
| 85 | 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 | 90 | # Get additional parameters |
| 91 | 91 | self._bins_per_job = self['bins_per_job'].integer() | ... | ... |
examples/generate_prod3_irfs.py
examples/make_ts_distributions.py
examples/show_model.py
| ... | ... | @@ -19,7 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import math | |
| 23 | 22 | import gammalib |
| 24 | 23 | try: |
| 25 | 24 | import matplotlib.pyplot as plt |
| ... | ... | @@ -73,13 +72,6 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100, plotfile=''): |
| 73 | 72 | x.append(energy.TeV()) |
| 74 | 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 | 75 | # Show spectrum |
| 84 | 76 | plt.figure() |
| 85 | 77 | plt.title(model.name()+' ('+spectrum.type()+')') | ... | ... |
examples/show_obs.py