Commit 562b6d7c authored by moritz's avatar moritz
Browse files

Moritz Huebner: Renamed source_model -> frequency_domain_source_model

parent f3410504
...@@ -23,11 +23,11 @@ class WaveformGenerator(object): ...@@ -23,11 +23,11 @@ class WaveformGenerator(object):
""" """
def __init__(self, source_model, sampling_frequency=4096, time_duration=1, def __init__(self, frequency_domain_source_model, sampling_frequency=4096, time_duration=1,
parameters=None): parameters=None):
self.time_duration = time_duration self.time_duration = time_duration
self.sampling_frequency = sampling_frequency self.sampling_frequency = sampling_frequency
self.source_model = source_model self.source_model = frequency_domain_source_model
self.parameters = parameters self.parameters = parameters
self.__frequency_array_updated = False self.__frequency_array_updated = False
self.__time_array_updated = False self.__time_array_updated = False
......
...@@ -17,7 +17,8 @@ def gaussian_frequency_domain_strain_2(frequency_array, a, m, s, ra, dec, geocen ...@@ -17,7 +17,8 @@ def gaussian_frequency_domain_strain_2(frequency_array, a, m, s, ra, dec, geocen
class TestWaveformGeneratorInstantiationWithoutOptionalParameters(unittest.TestCase): class TestWaveformGeneratorInstantiationWithoutOptionalParameters(unittest.TestCase):
def setUp(self): def setUp(self):
self.waveform_generator = peyote.waveform_generator.WaveformGenerator(source_model=gaussian_frequency_domain_strain) self.waveform_generator = peyote.waveform_generator.WaveformGenerator(
frequency_domain_source_model=gaussian_frequency_domain_strain)
self.simulation_parameters = dict(amplitude=1e-21, mu=100, sigma=1, self.simulation_parameters = dict(amplitude=1e-21, mu=100, sigma=1,
ra=1.375, ra=1.375,
dec=-1.2108, dec=-1.2108,
...@@ -51,7 +52,8 @@ class TestWaveformGeneratorInstantiationWithoutOptionalParameters(unittest.TestC ...@@ -51,7 +52,8 @@ class TestWaveformGeneratorInstantiationWithoutOptionalParameters(unittest.TestC
class TestParameterSetter(unittest.TestCase): class TestParameterSetter(unittest.TestCase):
def setUp(self): def setUp(self):
self.waveform_generator = peyote.waveform_generator.WaveformGenerator(source_model=gaussian_frequency_domain_strain) self.waveform_generator = peyote.waveform_generator.WaveformGenerator(
frequency_domain_source_model=gaussian_frequency_domain_strain)
self.simulation_parameters = dict(amplitude=1e-21, mu=100, sigma=1, self.simulation_parameters = dict(amplitude=1e-21, mu=100, sigma=1,
ra=1.375, ra=1.375,
dec=-1.2108, dec=-1.2108,
...@@ -89,7 +91,8 @@ class TestParameterSetter(unittest.TestCase): ...@@ -89,7 +91,8 @@ class TestParameterSetter(unittest.TestCase):
class TestSourceModelSetter(unittest.TestCase): class TestSourceModelSetter(unittest.TestCase):
def setUp(self): def setUp(self):
self.waveform_generator = peyote.waveform_generator.WaveformGenerator(source_model=gaussian_frequency_domain_strain) self.waveform_generator = peyote.waveform_generator.WaveformGenerator(
frequency_domain_source_model=gaussian_frequency_domain_strain)
self.waveform_generator.source_model = gaussian_frequency_domain_strain_2 self.waveform_generator.source_model = gaussian_frequency_domain_strain_2
self.simulation_parameters = dict(a=1e-21, m=100, s=1, self.simulation_parameters = dict(a=1e-21, m=100, s=1,
ra=1.375, ra=1.375,
......
...@@ -32,7 +32,7 @@ injection_parameters = dict( ...@@ -32,7 +32,7 @@ injection_parameters = dict(
waveform_generator = peyote.waveform_generator.WaveformGenerator( waveform_generator = peyote.waveform_generator.WaveformGenerator(
sampling_frequency=sampling_frequency, sampling_frequency=sampling_frequency,
time_duration=time_duration, time_duration=time_duration,
source_model=peyote.source.lal_binary_black_hole, frequency_domain_source_model=peyote.source.lal_binary_black_hole,
parameters=injection_parameters) parameters=injection_parameters)
hf_signal = waveform_generator.frequency_domain_strain() hf_signal = waveform_generator.frequency_domain_strain()
......
...@@ -73,7 +73,7 @@ injection_parameters = dict(amplitude=1e-21, ...@@ -73,7 +73,7 @@ injection_parameters = dict(amplitude=1e-21,
sampling_parameters = peyote.prior.parse_floats_to_fixed_priors(injection_parameters) sampling_parameters = peyote.prior.parse_floats_to_fixed_priors(injection_parameters)
wg = peyote.waveform_generator.WaveformGenerator( wg = peyote.waveform_generator.WaveformGenerator(
source_model=gaussian_frequency_domain_strain, frequency_domain_source_model=gaussian_frequency_domain_strain,
parameters=injection_parameters parameters=injection_parameters
) )
......
...@@ -32,7 +32,7 @@ simulation_parameters = dict( ...@@ -32,7 +32,7 @@ simulation_parameters = dict(
psi=2.659 psi=2.659
) )
#sampling_parameters = peyote.parameter.Parameter.parse_floats_to_parameters(simulation_parameters) #sampling_parameters = peyote.parameter.Parameter.parse_floats_to_parameters(simulation_parameters)
waveform_generator = WaveformGenerator(source_model=peyote.source.lal_binary_black_hole, waveform_generator = WaveformGenerator(frequency_domain_source_model=peyote.source.lal_binary_black_hole,
sampling_frequency=sampling_frequency, sampling_frequency=sampling_frequency,
time_duration=time_duration, time_duration=time_duration,
parameters=simulation_parameters) parameters=simulation_parameters)
......
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