Commit 274019b7 authored by MoritzThomasHuebner's avatar MoritzThomasHuebner
Browse files

Renamed

PriorSet -> PriorDict
BBHPriorSet -> BBHPriorDict
BNSPriorSet -> BNSPriorDict
CalibrationPriorSet -> CalibrationPriorDict

Introduced backports with deprecation warnings for the old classes
parent f41bfaa3
Pipeline #34422 failed with stage
in 4 minutes and 36 seconds
......@@ -15,7 +15,7 @@ import bilby # noqa
import inspect
class PriorSet(OrderedDict):
class PriorDict(OrderedDict):
def __init__(self, dictionary=None, filename=None):
""" A set of priors
......@@ -238,6 +238,14 @@ class PriorSet(OrderedDict):
return False
class PriorSet(PriorDict):
def __init__(self, dictionary=None, filename=None):
""" DEPRECATED: USE PriorDict INSTEAD"""
logger.warning("The name 'PriorSet' is deprecated use 'PriorDict' instead")
super(PriorSet, self).__init__(dictionary, filename)
def create_default_prior(name, default_priors_file=None):
"""Make a default prior for a parameter with a known name.
......@@ -261,7 +269,7 @@ def create_default_prior(name, default_priors_file=None):
"No prior file given.")
prior = None
else:
default_priors = PriorSet(filename=default_priors_file)
default_priors = PriorDict(filename=default_priors_file)
if name in default_priors.keys():
prior = default_priors[name]
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment