Skip to content

Commit

Permalink
low pass filter docstring updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementMonaco committed Dec 12, 2023
1 parent d0d071e commit d8dce0c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,14 +1092,18 @@ def low_pass_filter(self, alpha):
Implements a low pass filter with a moving average filter
Parameters:
- alpha (float): attenuation coefficient, 0 < alpha < 1
- for a given dataset, the larger alpha is, the more closely the filtered function returned will match the function
- the smaller alpha is, the smoother the filtered function returned will be (but with a phase shift)
----------
- alpha : float
Attenuation coefficient, 0 < alpha < 1
For a given dataset, the larger alpha is, the more closely the
filtered function returned will match the function the smaller
alpha is, the smoother the filtered function returned will be
(but with a phase shift)
Returns:
- filtered_function (Function): The function that filter the incoming source
----------
- filtered_function : Function
The function with the incoming source filtered
"""
filtered_signal = np.zeros_like(self.source)

Check warning on line 1108 in rocketpy/mathutils/function.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/mathutils/function.py#L1107-L1108

Added lines #L1107 - L1108 were not covered by tests
filtered_signal[0] = self.source[0]
Expand Down

0 comments on commit d8dce0c

Please sign in to comment.