diff options
-rw-r--r-- | src/argaze/GazeFeatures.py | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index ba3f54e..85b167f 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -668,16 +668,8 @@ class AOIScanPath(list): super().__init__() - self.__expected_aois = expected_aois - self.__movements = TimeStampedGazeMovements() - self.__current_aoi = '' - self.__index = ord('A') - self.__aoi_letter = {} - self.__letter_aoi = {} - - size = len(self.__expected_aois) - self.__transition_matrix = pandas.DataFrame(numpy.zeros((size, size)), index=self.__expected_aois, columns=self.__expected_aois) - + self.expected_aois = expected_aois + def __repr__(self): """String representation.""" @@ -715,7 +707,26 @@ class AOIScanPath(list): """List of all expected aoi.""" return self.__expected_aois - + + @expected_aois.setter + def expected_aois(self, expected_aois: list[str] = []): + """Edit list of all expected aoi. + + !!! warning + This will clear the AOIScanPath + """ + self.clear() + + self.__expected_aois = expected_aois + self.__movements = TimeStampedGazeMovements() + self.__current_aoi = '' + self.__index = ord('A') + self.__aoi_letter = {} + self.__letter_aoi = {} + + size = len(self.__expected_aois) + self.__transition_matrix = pandas.DataFrame(numpy.zeros((size, size)), index=self.__expected_aois, columns=self.__expected_aois) + @property def current_aoi(self): """AOI name of aoi scan step under construction""" |