fosanalysis
A framework to evaluate distributed fiber optic sensor data
Loading...
Searching...
No Matches
compensator.py
Go to the documentation of this file.
2r"""
3Implements the base class for all compensator classes.
4
5\author Bertram Richter
6\date 2023
7"""
8
9from abc import abstractmethod
10
11import numpy as np
12
13from fosanalysis import utils
14
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)
__init__(self, *args, **kwargs)
Base class for any compensatory class.
np.array run(self, np.array x, np.array strain, *args, **kwargs)
This.
This intermediate class indicates, that a sub-class is implementing a task.
Definition base.py:26