Public Access
renamed and fully integrated lowpass filter
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user