force users to use same base energy
@@ -1061,6 +1061,8 @@ class SuperExpCutoffPowerLaw4FGLSpectralModel(SpectralModel):
reference="1 TeV",
expfactor="1e-2 TeV-2",
):
+ if reference.unit != expfactor.unit.bases[0]:
+ raise(ValueError("Base energy unit for expfactor must match reference unit"))
self.index_1 = Parameter("index_1", index_1)
self.index_2 = Parameter("index_2", index_2)
self.amplitude = Parameter("amplitude", amplitude)
