Skip to content
Snippets Groups Projects
Commit 587d567f authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Rename fixed_arguments to waveform_arguments

Also changes {} = dict() to ensure it is not mutable.
parent aae26944
No related branches found
No related tags found
1 merge request!61Adds fixed_arguments to the wfg
Pipeline #
......@@ -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 """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment