-
Notifications
You must be signed in to change notification settings - Fork 0
/
fir_filters.h
60 lines (48 loc) · 1.56 KB
/
fir_filters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _fir_filters_h_
#define _fir_filters_h_
/*
Copyright (c) 2001, 2002 Enthought, Inc.
All rights reserved.
Copyright (c) 2003-2017 SciPy Developers.
All rights reserved.
*/
/**
* firwin_Kaiser_bandpass
*
* Computes the coefficients for a bandpass filter using a Kaiser window.
*
*
Parameters
----------
h : array[numtaps] with the computed taps
numtaps : int
Length of the filter (number of coefficients, i.e. the filter
order + 1).
cutoff_L : Low cutoff frequency of filter (expressed in the same units as `nyq`)
cutoff_H : High cutoff frequency of filter (expressed in the same units as `nyq`)
beta : Beta value for the Kaiser window
scale : bool, optional
Set to True to scale the coefficients so that the frequency
response is exactly unity at a certain frequency.
That frequency is either:
- 0 (DC) if the first passband starts at 0 (i.e. pass_zero
is True)
- `nyq` (the Nyquist frequency) if the first passband ends at
`nyq` (i.e the filter is a single band highpass filter);
center of first passband otherwise
fs : The sampling frequency of the signal. Each frequency in `cutoff`
must be between 0 and ``fs/2``. Default is 2.
Returns
-------
h : (numtaps,) ndarray
Coefficients of length `numtaps` FIR filter.
*/
int firwin_Kaiser_bandpass(
float *h,
int numtaps,
float cutoff_L,
float cutoff_H,
float beta,
bool scale,
float fs );
#endif