Closed peterstangl closed 1 year ago
I would suggest avoiding GeneralGammaDistributionPositiveTemporary
because even if you have deprecation warnings, it will not be possible for users to migrate to the new class without introducing another breaking change in the future when you rename it back. You can't avoid a breaking change, so just announce it and make a clear cut; ideally, make all arguments of the new class's constructor keyword only, to make sure non-migrated code will raise rather than silently calculating a wrong distribution.
I think since GeneralGammaDistributionPositive
was not used directly in flavio so far (only as base class of GeneralGammaUpperLimit
, which is used for some measurements), and it probably is also not used much outside of flavio, it should be safe to break backward compatibility there. In any case, I made the new arguments of GeneralGammaDistributionPositive
keyword only such that using the old interface will raise an error.
This PR is a first step to address issue #209.
GeneralGammaDistributionPositive
a generalization ofGammaDistributionPositive
with argumentsa
,loc
, andscale
. However, this would break backward compatibility. Therefore, the temporary classGeneralGammaDistributionPositiveTemporary
is introduced that fulfills this purpose. It will be renamed toGeneralGammaDistributionPositive
in the future.GeneralGammaCountingProcess
is introduced. It takes argumentsscale_factor
,counts_total
,counts_signal
, andbackground_std
and replaces the functionality of the current classGeneralGammaDistributionPositive
(which is kept for backward compatibility for the moment, butGeneralGammaDistributionPositiveTemporary
will be renamed toGeneralGammaDistributionPositive
in the future)GammaCountingProcess
is introduced as an equivalent of the currentGeneralGammaCountingProcess
with vanishing background uncertainty. It takes argumentsscale_factor
,counts_total
, andcounts_signal
.The inheritance is now as follows:
GammaDistributionPositive
→GammaCountingProcess
→GammaUpperLimit
GeneralGammaDistributionPositive
→GeneralGammaCountingProcess
→GeneralGammaUpperLimit