aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/GazeAnalysis/KCoefficient.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze/GazeAnalysis/KCoefficient.py')
-rw-r--r--src/argaze/GazeAnalysis/KCoefficient.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/argaze/GazeAnalysis/KCoefficient.py b/src/argaze/GazeAnalysis/KCoefficient.py
index 727b838..066de35 100644
--- a/src/argaze/GazeAnalysis/KCoefficient.py
+++ b/src/argaze/GazeAnalysis/KCoefficient.py
@@ -17,13 +17,10 @@ __credits__ = []
__copyright__ = "Copyright 2023, Ecole Nationale de l'Aviation Civile (ENAC)"
__license__ = "GPLv3"
-from dataclasses import dataclass
-
from argaze import GazeFeatures, DataFeatures
import numpy
-@dataclass
class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer):
"""Implementation of the K coefficient algorithm as described in:
@@ -33,9 +30,10 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer):
[https://doi.org/10.1145/2896452](https://doi.org/10.1145/2896452)
"""
- def __post_init__(self):
+ @DataFeatures.PipelineStepInit
+ def __init__(self, **kwargs):
- super().__init__()
+ super().__init__(**kwargs)
self.__K = 0
@@ -80,7 +78,6 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer):
return self.__K
-@dataclass
class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer):
"""Implementation of the K-modified coefficient algorithm as described in:
@@ -90,9 +87,10 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer):
[https://doi.org/10.1145/3379157.3391412](https://doi.org/10.1145/3379157.3391412)
"""
- def __post_init__(self):
+ @DataFeatures.PipelineStepInit
+ def __init__(self, **kwargs):
- super().__init__()
+ super().__init__(**kwargs)
self.__K = 0