This Python script generates a filter mask (frequency response) for
yapp_filter. The format of the
filename is yapp_mask_nfft_tsamp_lower_upper.dat. The
mask coefficients are signed bytes.
Usage:
yapp_genfiltermask.py [options]
The options are:
-hor--help: Display this usage information.-nor--nfft nfft: Length of the Fourier transform (default is 4096).-tor--tsamp tsamp: Sampling time in seconds.-lor--lower freq: Lower cut-off frequency in Hz (default is 0.1 Hz).-uor--upper freq: Upper cut-off frequency in Hz (default is 1000 Hz).-gor--graphics: Turn on plotting.
The flag -t (or --tsamp) is a required
argument.
Example:
The following generates a filter mask to run yapp_filter
with 16384 FFT points, with a lower cut-off frequency of 1 Hz and an
upper cut-off frequency of 100 Hz, for data with a sampling time of
10 microseconds. It creates a file named
yapp_mask_16384_0.0001_1.0_100.0.dat in the current
working directory, and also displays a plot of the filter mask.
yapp_genfiltermask.py -n 16384 -t 0.0001 -l 1 -u 100 -g