diff --git a/gammapy/catalog/fermi.py b/gammapy/catalog/fermi.py index 4a61e85cef..d942cdfc92 100644 --- a/gammapy/catalog/fermi.py +++ b/gammapy/catalog/fermi.py @@ -407,9 +407,14 @@ def _info_spectral_fit(self): ) fmt = "{:<45s} : {:.3f} +- {:.3f}\n" - ss += fmt.format( - "Spectral index", d[tag + "_Index"], d["Unc_" + tag + "_Index"] - ) + if f"{tag}_ExpfactorS" in d: + ss += fmt.format( + "Spectral index", d[tag + "_IndexS"], d["Unc_" + tag + "_IndexS"] + ) + else: + ss += fmt.format( + "Spectral index", d[tag + "_Index"], d["Unc_" + tag + "_Index"] + ) fmt = "{:<45s} : {:.3} +- {:.3} {}\n" ss += fmt.format(