This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
ButterworthFilter.py
119 lines (101 loc) · 3.93 KB
/
ButterworthFilter.py
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
from abaqusConstants import *
from .Filter import Filter
class ButterworthFilter(Filter):
"""The ButterworthFilter object defines a Butterworth type filter.
The ButterworthFilter object is derived from the Filter object.
Notes
-----
This object can be accessed by:
.. code-block:: python
import filter
mdb.models[name].filters[name]
import odbFilter
session.odbs[name].filters[name]
The corresponding analysis keywords are:
- FILTER
"""
def __init__(
self,
name: str,
cutoffFrequency: float,
order: int = 2,
operation: SymbolicConstant = NONE,
halt: Boolean = OFF,
limit: float = None,
invariant: SymbolicConstant = NONE,
):
"""This method creates a ButterworthFilter object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].ButterworthFilter
session.odbs[name].ButterworthFilter
Parameters
----------
name
A String specifying the repository key. This name ANTIALIASING is reserved for filters
generated internally by the program.
cutoffFrequency
A Float specifying the attenuation point of the filter. Possible values are non-negative
numbers. Order is not available for OperatorFilter.
order
An Int specifying the highest power of the filter transfer function. Possible values are
non-negative numbers less than or equal to 20. Order is not available for
OperatorFilter. The default value is 2.
operation
A SymbolicConstant specifying the filter operator. Possible values are NONE, MIN, MAX,
and ABS. The default value is NONE.
halt
A Boolean specifying whether to stop the analysis if the specified limit is reached. The
default value is OFF.
limit
None or a Float specifying the threshold limit, an upper or lower bound for output
values depending on the operation, or a bound for stopping the analysis when Halt is
used. The default value is None.
invariant
A SymbolicConstant specifying the invariant to which filtering is applied. Possible
values are NONE, FIRST, and SECOND. The default value is NONE.
Returns
-------
A ButterworthFilter object.
Raises
------
InvalidNameError
RangeError
"""
super().__init__()
pass
def setValues(
self,
order: int = 2,
operation: SymbolicConstant = NONE,
halt: Boolean = OFF,
limit: float = None,
invariant: SymbolicConstant = NONE,
):
"""This method modifies the ButterworthFilter object.
Parameters
----------
order
An Int specifying the highest power of the filter transfer function. Possible values are
non-negative numbers less than or equal to 20. Order is not available for
OperatorFilter. The default value is 2.
operation
A SymbolicConstant specifying the filter operator. Possible values are NONE, MIN, MAX,
and ABS. The default value is NONE.
halt
A Boolean specifying whether to stop the analysis if the specified limit is reached. The
default value is OFF.
limit
None or a Float specifying the threshold limit, an upper or lower bound for output
values depending on the operation, or a bound for stopping the analysis when Halt is
used. The default value is None.
invariant
A SymbolicConstant specifying the invariant to which filtering is applied. Possible
values are NONE, FIRST, and SECOND. The default value is NONE.
Raises
------
RangeError
"""
pass