Commit 51307080791b5795b570049fbfad5b816ee771ef

Authored by Jürgen Knödlseder
1 parent b1e044a4

Cope with the case that only upper limits are detected

Showing 1 changed file with 1 additions and 1 deletions
examples/show_spectrum.py
@@ -231,7 +231,7 @@ def plot_spectrum(filename, plotfile): @@ -231,7 +231,7 @@ def plot_spectrum(filename, plotfile):
231 spec = get_spectrum_file(filename) 231 spec = get_spectrum_file(filename)
232 232
233 # Set energy scale of spectrum 233 # Set energy scale of spectrum
234 - if max(spec['energies']) < 1.0e-3: 234 + if max(spec['energies']+spec['ul_energies']) < 1.0e-3:
235 xlabel = 'Energy (MeV)' 235 xlabel = 'Energy (MeV)'
236 conv = 1.0e6 236 conv = 1.0e6
237 elif max(spec['energies']) < 1.0: 237 elif max(spec['energies']) < 1.0: