From 587d567f6942ee858a4045e81c01ca1ff438354d Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Tue, 12 Jun 2018 15:08:50 +1000 Subject: [PATCH] Rename fixed_arguments to waveform_arguments Also changes {} = dict() to ensure it is not mutable. --- tupak/gw/waveform_generator.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tupak/gw/waveform_generator.py b/tupak/gw/waveform_generator.py index 663ee7a23..cb4a1f222 100644 --- a/tupak/gw/waveform_generator.py +++ b/tupak/gw/waveform_generator.py @@ -28,8 +28,9 @@ class WaveformGenerator(object): waveform generator non_standard_sampling_parameter_keys: list List of parameter name for *non-standard* sampling parameters. - fixed_arguments: dict - A dictionary of fixed keyword arguments + waveform_arguments: dict + A dictionary of fixed keyword arguments to pass to either + `frequency_domain_source_model` or `time_domain_source_model`. Note: the arguments of frequency_domain_source_model (except the first, which is the frequencies at which to compute the strain) will be added to @@ -39,7 +40,8 @@ class WaveformGenerator(object): def __init__(self, time_duration, sampling_frequency, frequency_domain_source_model=None, time_domain_source_model=None, parameters=None, parameter_conversion=None, - non_standard_sampling_parameter_keys=None, fixed_arguments={}): + non_standard_sampling_parameter_keys=None, + waveform_arguments=dict()): self.time_duration = time_duration self.sampling_frequency = sampling_frequency self.frequency_domain_source_model = frequency_domain_source_model @@ -49,11 +51,11 @@ class WaveformGenerator(object): self.parameter_conversion = parameter_conversion self.non_standard_sampling_parameter_keys = non_standard_sampling_parameter_keys self.parameters = parameters - self.fixed_arguments = fixed_arguments + self.waveform_arguments = waveform_arguments self.__frequency_array_updated = False self.__time_array_updated = False self.__full_source_model_keyword_arguments = {} - self.__full_source_model_keyword_arguments.update(fixed_arguments) + self.__full_source_model_keyword_arguments.update(waveform_arguments) def frequency_domain_strain(self): """ Wrapper to source_model """ -- GitLab