aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-12-03 07:37:14 +0100
committerThéo de la Hogue2023-12-03 07:37:14 +0100
commit710d73e2afcc422f371a018628ac04684d8d88fd (patch)
tree4c482df4873be7d39152fcf7d4fee6d7961415ea /src
parentaede4215c10ddfa7154099a40204460444011dff (diff)
downloadargaze-710d73e2afcc422f371a018628ac04684d8d88fd.zip
argaze-710d73e2afcc422f371a018628ac04684d8d88fd.tar.gz
argaze-710d73e2afcc422f371a018628ac04684d8d88fd.tar.bz2
argaze-710d73e2afcc422f371a018628ac04684d8d88fd.tar.xz
Minor fixes in documentation and annotation.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/DataStructures.py18
-rw-r--r--src/argaze/GazeFeatures.py13
2 files changed, 22 insertions, 9 deletions
diff --git a/src/argaze/DataStructures.py b/src/argaze/DataStructures.py
index 9e35dea..fc5072b 100644
--- a/src/argaze/DataStructures.py
+++ b/src/argaze/DataStructures.py
@@ -109,10 +109,13 @@ class TimeStampedBuffer(collections.OrderedDict):
}
```
- .. warning:: Timestamps must be numbers.
+ !!! warning
+
+ Timestamps must be numbers.
- .. warning:: Timestamps are not sorted internally.
- Data are considered to be stored according at their coming time.
+ !!! warning "Timestamps are not sorted internally"
+
+ Data are considered to be stored according at their coming time.
"""
def __new__(cls, args = None):
@@ -276,10 +279,13 @@ class TimeStampedBuffer(collections.OrderedDict):
The optional *split* argument allows tuple values to be stored in dedicated columns.
For example: to convert {"point": (0, 0)} data as two separated "x" and "y" columns, use split={"point": ["x", "y"]}
- .. warning:: Values must be dictionaries.
- Each key is stored as a column name.
+ !!! warning "Values must be dictionaries"
+
+ Each key is stored as a column name.
+
+ !!! note
- .. note:: Timestamps are stored as index column called 'timestamp'.
+ Timestamps are stored as index column called 'timestamp'.
"""
df = pandas.DataFrame.from_dict(self.values())
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index 46e9f17..a4cf244 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -664,6 +664,7 @@ class ScanStep():
"""Define a scan step as a fixation and a consecutive saccade.
!!! warning
+
Scan step have to start by a fixation and then end by a saccade.
"""
@@ -874,8 +875,10 @@ class AOIScanStepError(Exception):
@dataclass(frozen=True)
class AOIScanStep():
"""Define a aoi scan step as a set of successive gaze movements onto a same AOI.
- .. warning::
- Aoi scan step have to start by a fixation and then end by a saccade."""
+
+ !!! warning
+
+ Aoi scan step have to start by a fixation and then end by a saccade."""
movements: TimeStampedGazeMovements
"""All movements over an AOI and the last saccade that comes out."""
@@ -948,7 +951,11 @@ AOIScanPathType = TypeVar('AOIScanPathType', bound="AOIScanPathType")
# Type definition for type annotation convenience
class AOIScanPath(list):
- """List of aoi scan steps over successive aoi."""
+ """List of aoi scan steps over successive aoi.
+
+ Parameters:
+ duration_max: duration from which older aoi scan steps are removed each time new aoi scan steps are added. 0 means no maximal duration.
+ """
def __init__(self, expected_aoi: list[str] = [], duration_max: int|float = 0):