Python: FIR Filter Builder
-
Moku:Go
Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier Moku:Go General Moku:Go Logic Analyzer/Pattern Generator Moku:Go Time & Frequency Analyzer Moku:Go Laser Lock Box Moku:Go Phasemeter
-
Moku:Lab
Moku:Lab General Moku:Lab Arbitrary Waveform Generator Moku:Lab Data Logger Moku:Lab Digital Filter Box Moku:Lab FIR Filter Builder Moku:Lab Frequency Response Analyzer Moku:Lab Laser Lock Box Moku:Lab Lock-in Amplifier Moku:Lab Oscilloscope Moku:Lab Phasemeter Moku:Lab PID Controller Moku:Lab Spectrum Analyzer Moku:Lab Waveform Generator Moku:Lab Time & Frequency Analyzer Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
Moku:Pro Arbitrary Waveform Generator Moku:Pro Data Logger Moku:Pro Frequency Response Analyzer Moku:Pro Oscilloscope Moku:Pro PID Controller Moku:Pro Spectrum Analyzer Moku:Pro Waveform Generator Moku:Pro Lock-in Amplifier Moku:Pro Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro General Moku:Pro Logic Analyzer/Pattern Generator Moku:Pro Time & Frequency Analyzer
- Python API
- MATLAB API
- Arbitrary Waveform Generator
- Data Logger
- Digital Filter Box
- FIR Filter Builder
- Frequency Response Analyzer
- Laser Lock Box
- Lock-in Amplifier
- Oscilloscope
- Phasemeter
- PID Controller
- Spectrum Analyzer
- Time & Frequency Analyzer
- Waveform Generator
- Logic Analyzer & Pattern Generator
- Multi Instrument Mode
- Moku Cloud Compile
- Moku general
- LabVIEW
Example Python script to implement the FIR Filter Builder
# # Moku example: Basic FIR Filter Builder # # This example demonstrates how to run the FIR Filter Box and configure its # individual filter channel coefficients. # # (c) 2024 Liquid Instruments Pty. Ltd. # from moku.instruments import FIRFilterBox # The following two example arrays are simple rectangular FIR kernels with 50 # and 400 taps respectively. A rectangular kernel produces a sinc shaped # transfer function with width inversely proportional to the length of the # kernel. FIR kernels must have a normalised power of <= 1.0, so the value of # each tap is the inverse of the total number of taps. filt_coeff1 = [1.0 / 50.0] * 50 filt_coeff2 = [1.0 / 400.0] * 400 # Launch FIR Filter and connect to your device through IP i = FIRFilterBox('192.168.###.###', force_connect=True) try: # Configure the Moku:Lab's frontend settings i.set_frontend(1, impedance='1MOhm', attenuation='0dB', coupling='DC') i.set_frontend(2, impedance='1MOhm', attenuation='0dB', coupling='DC') # Load the coefficients and sample rate for each FIR filter channel. # To implement 50 FIR taps i.set_custom_kernel_coefficients(1, sample_rate='1.953MHz', coefficients=filt_coeff1) # To implement 400 FIR taps i.set_custom_kernel_coefficients(2, sample_rate='1.953MHz', coefficients=filt_coeff2) # Both channels have unity gain and no offsets i.set_input_gain(1, gain=1.0) i.set_output_gain(1, gain=1.0) i.set_input_offset(1, offset=0.0) i.set_input_gain(2, gain=1.0) i.set_output_gain(2, gain=1.0) i.set_input_offset(2, offset=0.0) except Exception as e: print(f'Exception Occured: {e}') finally: i.relinquish_ownership()