aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/GazeFeatures.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index e17c9f9..7afb7ba 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -291,24 +291,24 @@ VisualScanStepType = TypeVar('VisualScanStep', bound="VisualScanStep")
@dataclass(frozen=True)
class VisualScanStep():
- """Define a visual scan step as a set of successive gaze movements onto a same AOI."""
+ """Define a visual scan step as a set of successive gaze movements onto a same AOI.
+ .. warning::
+ Last movement have to be a saccade that comes out AOI."""
movements: TimeStampedGazeMovements
- """All movements over an aoi and the last saccade that comes out."""
+ """All movements over an AOI and the last saccade that comes out."""
aoi: str = field(default='')
- """Name of the looked AOI."""
+ """AOI name."""
def __post_init__(self):
- # Last movement should be a saccade
- _, last_movement = self.movements.last
-
- assert(type(last_movement).__bases__[0] == Saccade)
+ # Last movement have to be a saccade
+ assert(type(self.transition).__bases__[0] == Saccade)
@property
def transition(self):
- """Last saccade that comes out looked aoi"""
+ """Last saccade that comes out AOI."""
_, last_movement = self.movements.last
return last_movement
@@ -324,12 +324,12 @@ class VisualScan(list):
self.__last_aoi = ''
def __repr__(self):
- """String representation"""
+ """String representation."""
return str(super())
def __str__(self) -> str:
- """String display"""
+ """String display."""
output = ''
@@ -340,12 +340,12 @@ class VisualScan(list):
return output
def append_saccade(self, ts, saccade):
- """Append a new saccade to visual scan."""
+ """Append new saccade to visual scan."""
self.__movements[ts] = saccade
def append_fixation(self, ts, fixation, looked_aoi: str) -> bool:
- """Append a new fixation to visual scan and return last new visual scan step if one have been created."""
+ """Append new fixation to visual scan and return last new visual scan step if one have been created."""
# Is the fixation onto a new aoi?
if looked_aoi != self.__last_aoi and len(self.__movements) > 0: