Commit 4df9ac25 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Name change and minor fixes

parent 72fce93b
......@@ -817,9 +817,33 @@ class PowerLaw(Prior):
1. * self.is_in_prior_range(val))
class SummedPowerLaw(Prior):
class DoublePowerLaw(Prior):
def __init__(self, alpha0, alpha1, xi, minimum, maximum, name=None,
latex_label=None, unit=None, ngrid_points=10000):
"""Mixture model of two power laws
Parameters
----------
alpha0, alpha1: float
Power law exponent parameter for the 0th and 1st components
xi: float
Mixture parameter [0, 1].
ngrid_points:
Number of grid points to evaluate the inverse CDF on
minimum: float
See superclass
maximum: float
See superclass
name: str
See superclass
latex_label: str
See superclass
unit: str
See superclass
boundary: str
See superclass
"""
Prior.__init__(self, name=name, latex_label=latex_label, unit=unit,
maximum=maximum, minimum=minimum)
self.alpha0 = alpha0
......@@ -828,9 +852,6 @@ class SummedPowerLaw(Prior):
self.ngrid_points = ngrid_points
self.icdf_array = np.linspace(minimum, maximum, ngrid_points)
def __repr__(self):
return ""
@property
def a0(self):
if self.alpha0 != -1:
......
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