Commit 101e1635 authored by James Kennington's avatar James Kennington
Browse files

flow duration argument

parent 37c2732f
Pipeline #351231 passed with stage
in 3 minutes and 2 seconds
......@@ -307,11 +307,12 @@ class CBCMetric(metric.Metric):
WAVEFORM_COORDS = (M1, M2, S1X, S1Y, S1Z, S2X, S2Y, S2Z)
WAVEFORM_COORD_DEFAULTS = {S1X: 0., S1Y: 0., S1Z: 0., S2X: 0., S2Y: 0., S2Z: 0.}
def __init__(self, psd=None, coord_func=None, flow=15.0, fhigh=512., approximant="IMRPhenomD", max_metric_diff: float = metric.DEFAULT_MAX_DIFF_THRESHOLD, max_duration: float = numpy.inf):
def __init__(self, psd=None, coord_func=None, flow=15.0, fhigh=512., approximant="IMRPhenomD", max_metric_diff: float = metric.DEFAULT_MAX_DIFF_THRESHOLD,
duration: float = metric.DEFAULT_DURATION, max_duration: float = numpy.inf):
self.appxstr = approximant
self.approximant = lalsim.GetApproximantFromString(approximant)
self.max_duration = max_duration
metric.Metric.__init__(self, psd, coord_func, flow, fhigh, max_metric_diff=max_metric_diff)
metric.Metric.__init__(self, psd, coord_func, flow, fhigh, duration=duration, max_metric_diff=max_metric_diff)
def _to_dict(self):
return {"psd": self.psd, "coord_func": {self.coord_func.key: self.coord_func.to_dict()}, "flow": self.freq_low, "fhigh": self.freq_high, "approximant": self.appxstr, "max_metric_diff": self.max_diff_threshold, "max_duration": self.max_duration}
......
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