aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-09-18 10:16:29 +0200
committerThéo de la Hogue2023-09-18 10:16:29 +0200
commitca4609bc3073b33a912e89cfc0315d3d4bc3698d (patch)
tree55703f7c967bafc0382083015f524bfd91269145
parent30b3e4c630924d2cd229ace2e8efcb3da08423b3 (diff)
downloadargaze-ca4609bc3073b33a912e89cfc0315d3d4bc3698d.zip
argaze-ca4609bc3073b33a912e89cfc0315d3d4bc3698d.tar.gz
argaze-ca4609bc3073b33a912e89cfc0315d3d4bc3698d.tar.bz2
argaze-ca4609bc3073b33a912e89cfc0315d3d4bc3698d.tar.xz
Adding default value to dataclass field.
-rw-r--r--src/argaze/GazeAnalysis/DeviationCircleCoverage.py2
-rw-r--r--src/argaze/GazeFeatures.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
index db707c0..4cfab72 100644
--- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
+++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
@@ -25,7 +25,7 @@ GazeMovementType = TypeVar('GazeMovement', bound="GazeMovement")
class AOIMatcher(GazeFeatures.AOIMatcher):
"""Matching algorithm based on fixation's deviation circle coverage over AOI."""
- coverage_threshold: float
+ coverage_threshold: float = field(default = 0.)
"""Minimal coverage ratio to consider a fixation over an AOI (1 means that whole fixation's deviation circle have to be over the AOI)."""
def __post_init__(self):
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index d28986c..5b89558 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -722,7 +722,7 @@ class ScanPathAnalyzer():
class AOIMatcher():
"""Abstract class to define what should provide an AOI matcher algorithm."""
- exclude: list[str] = field()
+ exclude: list[str] = field(default_factory = list)
def match(self, aoi_scene: AOIFeatures.AOIScene, gaze_movement: GazeMovement) -> Tuple[str, AOIFeatures.AreaOfInterest]:
"""Which AOI is looked in the scene?"""