fosanalysis
A framework to evaluate distributed fiber optic sensor data
Toggle main menu visibility
Loading...
Searching...
No Matches
compensator.py
Go to the documentation of this file.
1
2
r"""
3
Implements the base class for all compensator classes.
4
5
\author Bertram Richter
6
\date 2023
7
"""
8
9
from
abc
import
abstractmethod
10
11
import
numpy
as
np
12
13
from
fosanalysis
import
utils
14
15
class
Compensator
(
utils.base.Task
):
16
r"""
17
Base for compensation classes.
18
"""
19
def
__init__
(self, *args, **kwargs):
20
r"""
21
Base class for any compensatory class.
22
\param *args Additional positional arguments, will be passed to the superconstructor.
23
\param **kwargs Additional keyword arguments, will be passed to the superconstructor.
24
"""
25
super().
__init__
(*args, **kwargs)
26
@abstractmethod
27
def
run
(self, x: np.array, strain: np.array, *args, **kwargs) -> np.array:
28
r"""
29
This
30
\param x Positional data.
31
\param strain Strain data, belonging to `x`.
32
\param *args Additional positional arguments to costumize the behavior. Further specified in sub-classes.
33
\param **kwargs Additional keyword arguments to costumize the behavior. Further specified in sub-classes.
34
35
\return Returns an array of the same shape as `x` (or `strain` for that matter) with the influence.
36
These values are subtracted from the strains in the crack widths estimation (positive values will reduce the estimated crack width).
37
"""
38
raise
NotImplementedError()
39
return
np.zeros_like(x)
fosanalysis.compensation.compensator.Compensator
Base for compensation classes.
Definition
compensator.py:15
fosanalysis.compensation.compensator.Compensator.__init__
__init__(self, *args, **kwargs)
Base class for any compensatory class.
Definition
compensator.py:19
fosanalysis.compensation.compensator.Compensator.run
np.array run(self, np.array x, np.array strain, *args, **kwargs)
This.
Definition
compensator.py:27
fosanalysis.utils.base.Task
This intermediate class indicates, that a sub-class is implementing a task.
Definition
base.py:26
src
fosanalysis
compensation
compensator.py
Generated by
1.18.0