Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
degenerate with the normalization of the model.
NOTE2: always keep at least one multiplicative constant fixed to one (its default value), when using this
with other OGIPLike-type detectors
:param min_value: minimum allowed value (default: 0.8, corresponding to a 20% - effect)
:param max_value: maximum allowed value (default: 1.2, corresponding to a 20% + effect
:return:
"""
self._nuisance_parameter.free = True
self._nuisance_parameter.bounds = (min_value, max_value)
# Use a uniform prior by default
self._nuisance_parameter.set_uninformative_prior(Uniform_prior)
if min_value > 0:
orders_of_magnitude_span = math.log10(max_value) - math.log10(min_value)
if orders_of_magnitude_span > 2:
# Use a Log-uniform prior
self._param_priors[parameter_name] = Log_uniform_prior(
lower_bound=min_value, upper_bound=max_value
)
else:
# Use a uniform prior
self._param_priors[parameter_name] = Uniform_prior(
lower_bound=min_value, upper_bound=max_value
)
else:
# Can only use a uniform prior
self._param_priors[parameter_name] = Uniform_prior(
lower_bound=min_value, upper_bound=max_value
)
def prior(params, ndim, nparams):
for i, (parameter_name, parameter) in enumerate(self.parameters.items()):
try: