Tcl Library Source Code

Check-in [ce253d70e3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correct mistakes in the man page for the filter package.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: ce253d70e31f8b0d0f826ca9f7367281a9fe61f84bda5ae732f8130e3118fd21
User & Date: arjenmarkus 2025-01-04 18:37:28.736
Context
2025-01-15
19:49
fix: ticket b01462dff7, integrated from branch. version bumped. testsuite extended. doc regenerated. check-in: 870b1002a4 user: aku tags: trunk, main
2025-01-10
13:55
Proposed fix for tar::untar bug [b01462dff7] check-in: cef77068e4 user: apnadkarni tags: bug-b01462dff7
2025-01-04
18:37
Correct mistakes in the man page for the filter package. check-in: ce253d70e3 user: arjenmarkus tags: trunk, main
16:16
Re-implement the filter procedures, this time based on source code with an MIT license check-in: 79ae95d9e3 user: arjenmarkus tags: trunk, main
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/math/filtergen.man.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[description]
[para]
The [package math::filters] package implements digital filters,
notably Butterworth and Chebyshev low-pass and high-pass filters. The procedures
allow to filter an entire data series as well as filter data one
by one.

Note: [url https://en.wikipedia.org/wiki/Digital_filter] and other pages on Wikipedia describe
the principles and design considerations of these digital filters.

Note: This is a reimplementation compared to version 0.3, which was based on GPL-licensed code.
One possible incompatibility with that version is that the order now needs to be even.


[section "PROCEDURES"]







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[description]
[para]
The [package math::filters] package implements digital filters,
notably Butterworth and Chebyshev low-pass and high-pass filters. The procedures
allow to filter an entire data series as well as filter data one
by one.

Note: [uri https://en.wikipedia.org/wiki/Digital_filter] and other pages on Wikipedia describe
the principles and design considerations of these digital filters.

Note: This is a reimplementation compared to version 0.3, which was based on GPL-licensed code.
One possible incompatibility with that version is that the order now needs to be even.


[section "PROCEDURES"]
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

[list_begin arguments]
[arg_def list coeffs] List of coefficients as generated by [emph filterButterworth] (or in fact any similar list of coefficients)
[arg_def list data] Data to be filtered
[list_end]


[call [cmd ::math::filters::filterChebyshev] [arg lowpass] [arg order] [arg samplefreq] [arg cutofffreq] [opt epsilon]]

Determine the coefficients for a Chebyshev filter of given (even) order. The coefficients are returned as
a nested list, suitable for the [term filter] command or method, For this type of filters an extra parameter
can be given, the so-called ripple factor. This controls the smoothness of the gain factor.

[list_begin arguments]
[arg_def bool lowpass] Generate a low-pass filter (1) or a high-pass filter (0)
[arg_def integer order] The order of the filter to be generated - it must be even
[arg_def double samplefreq] Sampling frequency of the data series
[arg_def double cutofffreq] Cut-off frequency for the filter (must be less than half the sampling frequency)
[opt_def double epsilon] Ripple factor, defaults to 0.1
[list_end]


[call [cmd ::math::filters::filter] [arg coeffs] [arg data]]

Filter the entire data series based on the filter coefficients.








|










|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

[list_begin arguments]
[arg_def list coeffs] List of coefficients as generated by [emph filterButterworth] (or in fact any similar list of coefficients)
[arg_def list data] Data to be filtered
[list_end]


[call [cmd ::math::filters::filterChebyshev] [arg lowpass] [arg order] [arg samplefreq] [arg cutofffreq] [opt [arg epsilon]]]

Determine the coefficients for a Chebyshev filter of given (even) order. The coefficients are returned as
a nested list, suitable for the [term filter] command or method, For this type of filters an extra parameter
can be given, the so-called ripple factor. This controls the smoothness of the gain factor.

[list_begin arguments]
[arg_def bool lowpass] Generate a low-pass filter (1) or a high-pass filter (0)
[arg_def integer order] The order of the filter to be generated - it must be even
[arg_def double samplefreq] Sampling frequency of the data series
[arg_def double cutofffreq] Cut-off frequency for the filter (must be less than half the sampling frequency)
[arg_def double epsilon] Ripple factor, defaults to 0.1
[list_end]


[call [cmd ::math::filters::filter] [arg coeffs] [arg data]]

Filter the entire data series based on the filter coefficients.