Commit 4f0d56a3 authored by findesgh's avatar findesgh

Add power law size dist.

parent dcf4c5ff
......@@ -148,6 +148,25 @@ class SizeDist(object):
__rmul__ = __mul__
class PowerLaw(SizeDist):
"""
Parameters
----------
sizeMin : scalar Quantity [L]
Low end size cutoff of the distribution.
sizeMax : scalar Quantity [L]
High end size cutoff of the distribution.
power : float
Log-slope of the size distribution.
C : scalar Quantity [L]**(-1-power)
Normalization of the size distribution.
"""
def __init__(self, sizeMin, sizeMax, power, C):
def f(a):
return C*a**power
super(self).__init__(sizeMin, sizeMax, f)
return
###############################################################################
if __name__ == "__main__":
......
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