renamed and fully integrated lowpass filter

This commit is contained in:
2026-07-12 18:32:40 +02:00
parent eaf23abec6
commit e4cdea3b07
3 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -148,7 +148,7 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
return self.is_clipped
def digital_filter(self, cutoff, numtaps=None):
def lowpass(self, cutoff, numtaps=None):
"""
Apply a zero-phase lowpass FIR filter to all channels.
@@ -185,12 +185,12 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
Examples
--------
>>> # Lowpass at 1 MHz (taps auto-computed, ~40)
... filtered = adc.digital_filter(cutoff=1e6)
... filtered = adc.lowpass(cutoff=1e6)
>>> # Lowpass at 500 kHz with fixed 63 taps
... filtered = adc.digital_filter(cutoff=500e3, numtaps=63)
... filtered = adc.lowpass(cutoff=500e3, numtaps=63)
"""
if not self.contains_data():
raise RuntimeError("digital_filter: no data present")
raise RuntimeError("lowpass: no data present")
nyquist = self.sampling_rate / 2.0
cutoff = float(cutoff)