diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/GazeFeatures.py | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index 81a87c8..cfd7419 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -979,6 +979,20 @@ class AOIScanPath(list): self.__duration = 0 + def clear(self): + """Clear aoi scan steps list, letter sequence and transition matrix.""" + + super().clear() + + self.__movements = TimeStampedGazeMovements() + self.__current_aoi = '' + self.__index = ord('A') + self.__aoi_letter = {} + self.__letter_aoi = {} + + size = len(self.__expected_aoi) + self.__transition_matrix = pandas.DataFrame(numpy.zeros((size, size)), index=self.__expected_aoi, columns=self.__expected_aoi) + @property def duration(self) -> float: """Sum of all scan steps duration""" @@ -1043,20 +1057,12 @@ class AOIScanPath(list): !!! warning This will clear the AOIScanPath """ - self.clear() - + self.__expected_aoi = [OutsideAOI] self.__expected_aoi += expected_aoi - self.__movements = TimeStampedGazeMovements() - self.__current_aoi = '' - self.__index = ord('A') - self.__aoi_letter = {} - self.__letter_aoi = {} - - size = len(self.__expected_aoi) - self.__transition_matrix = pandas.DataFrame(numpy.zeros((size, size)), index=self.__expected_aoi, columns=self.__expected_aoi) - + self.clear() + @property def current_aoi(self): """AOI name of aoi scan step under construction""" |