Skip to content

Commit

Permalink
rename variable due to conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
RobBuchananCompPhys committed Feb 14, 2025
1 parent 5b9b5e5 commit bf2caf3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ def edit_preferences(self, key: str, value: any) -> None:

self.render_canvas_assets()

def resample_and_normalise(self, signal, to_len):
def resample_and_normalise(self, values, to_len):
"""
"""
return signal.resample(signal, to_len) * (signal.max() ** (-1))
return signal.resample(values, to_len) * (values.max() ** (-1))

def set_trajectory_power_spectrum(
self, filter: Filter
Expand Down Expand Up @@ -295,7 +295,7 @@ def set_trajectory_power_spectrum(
filter.freq_response = (filter.coeffs, Filter.FrequencyRangeMethod.CUSTOM)

# Resample and normalise trajectory power spectrum (y-axis)
ps = self.resample_and_normalise(signal=raw_power_spectrum_values, to_len=len(response.frequencies))
ps = self.resample_and_normalise(values=raw_power_spectrum_values, to_len=len(response.frequencies))

# Compute power spectral attenuation due to filter (multiplicative)
attenuated_ps = ps * filter.freq_response.magnitudes
Expand Down

0 comments on commit bf2caf3

Please sign in to comment.