Commit 7bae4bc8 authored by plasky's avatar plasky
Browse files

Merge branch 'master' of git.ligo.org:Monash/tupak

parents a37ad877 6b6bea88
Pipeline #18650 failed with stages
in 4 minutes and 2 seconds
......@@ -180,8 +180,6 @@ class Cosine(Prior):
def __init__(self, name=None, latex_label=None):
Prior.__init__(self, name, latex_label)
self.minimum = - np.pi / 2
self.maximum = np.pi / 2
def rescale(self, val):
"""
......@@ -205,8 +203,6 @@ class Sine(Prior):
def __init__(self, name=None, latex_label=None):
Prior.__init__(self, name, latex_label)
self.minimum = 0
self.maximum = np.pi
def rescale(self, val):
"""
......
......@@ -35,10 +35,21 @@ class WaveformGenerator(object):
def frequency_domain_strain(self):
""" Wrapper to source_model """
return self.frequency_domain_source_model(self.frequency_array, **self.parameters)
if self.frequency_domain_source_model is not None:
return self.frequency_domain_source_model(self.frequency_array, **self.parameters)
elif self.time_domain_source_model is not None:
fft_data, self.frequency_array = utils.nfft(self.time_domain_source_model(self.time_array, **self.parameters), self.sampling_frequency)
return fft_data
else:
raise RuntimeError("No source model given")
def time_domain_strain(self):
return self.time_domain_source_model(self.time_array, **self.parameters)
if self.time_domain_source_model is not None:
return self.time_domain_source_model(self.time_array, **self.parameters)
elif self.frequency_domain_source_model is not None:
return utils.infft(self.frequency_domain_source_model(self.frequency_array, **self.parameters))
else:
raise RuntimeError("No source model given")
@property
def frequency_array(self):
......@@ -49,6 +60,10 @@ class WaveformGenerator(object):
self.__frequency_array_updated = True
return self.__frequency_array
@frequency_array.setter
def frequency_array(self, frequency_array):
self.__frequency_array = frequency_array
@property
def time_array(self):
if self.__time_array_updated is False:
......
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