|
fosanalysis
A framework to evaluate distributed fiber optic sensor data
|
Abstract base class for preprocessing task classes. More...
Public Member Functions | |
| __init__ (self, str timespace="1d_space", *args, **kwargs) | |
| Construct an instance of the class. | |
| tuple | run (self, np.array x=None, np.array y=None, np.array z=None, bool make_copy=True, str timespace=None, *args, **kwargs) |
Each preprocessing.Task object has a run() method. | |
Public Member Functions inherited from fosanalysis.preprocessing.base.Base | |
| __init__ (self, *args, **kwargs) | |
| Construct an instance of the class. | |
Public Member Functions inherited from fosanalysis.utils.base.Task | |
| __init__ (self, *args, **kwargs) | |
Public Member Functions inherited from fosanalysis.utils.base.Base | |
| __init__ (self, *args, **kwargs) | |
| Construct the object and warn about unused/unknown arguments. | |
Public Attributes | |
| timespace = timespace | |
| Indicator, which approach is used for operations on a 2d array. | |
Protected Member Functions | |
| tuple | _map_2d (self, np.array x, np.array y, np.array z, str timespace=None, *args, **kwargs) |
| Apply the 1D operation along either the space or time timespace. | |
| tuple | _run_1d (self, np.array x, np.array z, *args, **kwargs) |
| Reimplementations describe a one-dimensional operation. | |
| tuple | _run_2d (self, np.array x, np.array y, np.array z, *args, **kwargs) |
| Native two-dimensional operation implementation. | |
| fosanalysis.preprocessing.base.Task.__init__ | ( | self, | |
| str | timespace = "1d_space", | ||
| * | args, | ||
| ** | kwargs ) |
Construct an instance of the class.
As this is an abstract class, it may not be instantiated directly itself.
| timespace | Indicator, which approach is used for operations on a 2d array. For more, see timespace. |
| *args | Additional positional arguments, will be passed to the superconstructor. |
| **kwargs | Additional keyword arguments, will be passed to the superconstructor. |
Definition at line 60 of file base.py.
|
protected |
Apply the 1D operation along either the space or time timespace.
Used for carrying out 1D-only algorithms on a 2D array row- or column-wise.
| x | Array of measuring point positions. |
| y | Array of time stamps. |
| z | Array of strain data in accordance to x and y. |
| timespace | Indicator, which approach is used for operations on a 2d array. For more, see timespace. Defaults to timespace. |
| *args | Additional positional arguments to customize the behaviour. Will be passed to the chosen method to call. |
| **kwargs | Additional keyword arguments to customize the behaviour. Will be passed to the chosen method to call. |
(x, y, z). They correspond to the input variables of the same name. Each of those might be changed. Definition at line 203 of file base.py.
|
protected |
Reimplementations describe a one-dimensional operation.
This operation might be applied to on a 2D array by _map_2d(). This function is called, if:
z is 1D or"1d_space" or "1d_time". | x | Array of coordinate positions. Dependent on timespace it may hold:
|
| z | Array of strain data in accordance to x and y. |
| *args | Additional positional arguments to customize the behaviour. |
| **kwargs | Additional keyword arguments to customize the behaviour. |
(x, z). They correspond to the input variables of the same name. Each of those might be changed. Reimplemented in fosanalysis.preprocessing.filtering.Cluster, fosanalysis.preprocessing.filtering.Limit, fosanalysis.preprocessing.filtering.SlidingFilter, fosanalysis.preprocessing.repair.ScipyInterpolation1D, and fosanalysis.preprocessing.resizing.Resampler.
Definition at line 161 of file base.py.
|
protected |
Native two-dimensional operation implementation.
Needs to be reimplemented by sub-classes. This function is only called, if z is 2D and timespace is "2D".
| x | Array of measuring point positions. |
| y | Array of time stamps. |
| z | Array of strain data in accordance to x and y. |
| *args | Additional positional arguments to customize the behaviour. |
| **kwargs | Additional keyword arguments to customize the behaviour. |
(x, y, z). They correspond to the input variables of the same name. Each of those might be changed. Reimplemented in fosanalysis.preprocessing.filtering.Cluster, fosanalysis.preprocessing.filtering.Limit, fosanalysis.preprocessing.filtering.SlidingFilter, fosanalysis.preprocessing.repair.ScipyInterpolation1D, and fosanalysis.preprocessing.resizing.Resampler.
Definition at line 184 of file base.py.
| tuple fosanalysis.preprocessing.base.Task.run | ( | self, | |
| np.array | x = None, | ||
| np.array | y = None, | ||
| np.array | z = None, | ||
| bool | make_copy = True, | ||
| str | timespace = None, | ||
| * | args, | ||
| ** | kwargs ) |
Each preprocessing.Task object has a run() method.
The actual operations are reimplemented in _run_1d() and _run_2d(). This method decides based on the argument, how is operated over the data. If z is a 1D array, the array to pass to _run_1d() is determined:
x as the coordinate data, if it matches the shape of z.y as the coordinate data, if it matches the shape of z.z.If z is a 2D array, three option are available, based on timespace: Available options:
"2D": Use the native 2D implementation."1d_space": Use the native 1D implementation, in the space domain. This is repeated for each time stamp in the measurement campaign. An iteration step processes a complete reading of sensor length."1d_time": Use the native 1D implementation, in the time domain. This is repeated for each gage location along the sensor. An iteration step processes a time series for a sensor position. | x | Array of measuring point positions. |
| y | Array of time stamps. |
| z | Array of strain data in accordance to x and y. |
| timespace | Indicator, which approach is used for operations on a 2d array. For more, see timespace. Defaults to timespace. |
| make_copy | Switch, whether a deepcopy of the passed data should be done. Defaults to True. |
| *args | Additional positional arguments to customize the behaviour. Will be passed to the chosen method to call. |
| **kwargs | Additional keyword arguments to customize the behaviour. Will be passed to the chosen method to call. |
(x, y, z). They correspond to the input variables of the same name. Each of those might be changed. Reimplemented from fosanalysis.preprocessing.base.Base.
Reimplemented in fosanalysis.preprocessing.filtering.Limit, fosanalysis.preprocessing.filtering.SlidingFilter, and fosanalysis.preprocessing.repair.ScipyInterpolation1D.
Definition at line 81 of file base.py.
| fosanalysis.preprocessing.base.Task.timespace = timespace |
Indicator, which approach is used for operations on a 2d array.
Available options:
"2D": Use the native 2D implementation."1d_space": Use the native 1D implementation, in the space domain. This is repeated for each time stamp in the measurement campaign. An iteration step processes a complete reading of sensor length."1d_time": Use the native 1D implementation, in the time domain. This is repeated for each gage location along the sensor. An iteration step processes a time series for a sensor position.