Commit a874226a authored by moritz's avatar moritz
Browse files

Moritz Huebner: Added default case for prior

parent 0a038e48
...@@ -48,40 +48,38 @@ class Parameter: ...@@ -48,40 +48,38 @@ class Parameter:
if self.name == 'mass_1': if self.name == 'mass_1':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(5, 100)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(5, 100))
if self.name == 'mass_2': elif self.name == 'mass_2':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(5, 100)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(5, 100))
if self.name == 'mchirp': elif self.name == 'mchirp':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(5, 100)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(5, 100))
if self.name == 'q': elif self.name == 'q':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 1)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 1))
elif self.name == 'a1':
# spins
if self.name == 'a1':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 1)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 1))
if self.name == 'a2': elif self.name == 'a2':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 1)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 1))
if self.name == 'tilt1': elif self.name == 'tilt1':
self.prior = peyote.prior.Sine() self.prior = peyote.prior.Sine()
if self.name == 'tilt2': elif self.name == 'tilt2':
self.prior = peyote.prior.Sine() self.prior = peyote.prior.Sine()
if self.name == 'phi1': elif self.name == 'phi1':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi))
if self.name == 'phi2': elif self.name == 'phi2':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi))
elif self.name == 'luminosity_distance':
# extrinsic
if self.name == 'luminosity_distance':
self.prior = peyote.prior.PowerLaw(alpha=2, bounds=(1e2, 5e3)) self.prior = peyote.prior.PowerLaw(alpha=2, bounds=(1e2, 5e3))
if self.name == 'dec': elif self.name == 'dec':
self.prior = peyote.prior.Cosine() self.prior = peyote.prior.Cosine()
if self.name == 'ra': elif self.name == 'ra':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi))
if self.name == 'iota': elif self.name == 'iota':
self.prior = peyote.prior.Sine() self.prior = peyote.prior.Sine()
if self.name == 'psi': elif self.name == 'psi':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi))
if self.name == 'phase': elif self.name == 'phase':
self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi)) self.prior = peyote.prior.PowerLaw(alpha=0, bounds=(0, 2 * np.pi))
else:
self.prior = None
def set_default_values(self): def set_default_values(self):
# spins # spins
......
Supports Markdown
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