Skip to content

Commit

Permalink
fix(streams): remove unnecessary instantiation of sine_freq in method…
Browse files Browse the repository at this point in the history
… sine_wave_function
  • Loading branch information
anupam-prasad committed May 5, 2021
1 parent 87f8135 commit 192a6c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agentMET4FOF/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,12 @@ class SineGenerator(DataStreamMET4FOF):
sine_freq : float
frequency of wave function
"""
def __init__(self, sfreq = 500, sine_freq=5):
def __init__(self, sfreq=500, sine_freq=50):
super().__init__()
self.set_metadata("SineGenerator","time","s",("Voltage"),("V"),"Simple sine wave generator")
self.set_generator_function(generator_function=self.sine_wave_function, sfreq=sfreq, sine_freq=sine_freq)

def sine_wave_function(self, time, sine_freq=50):
def sine_wave_function(self, time, sine_freq):
"""A simple sine wave generator"""
amplitude = np.sin(2 * np.pi * sine_freq * time)
return amplitude
Expand Down

1 comment on commit 192a6c9

@anupam-prasad
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.