Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #916

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

WIP #916

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/pymovements/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@
if self.definition.has_files['precomputed_events']:
self.load_precomputed_events()

if self.definition.has_files['precomputed_aois']:
self.load_precomputed_aois()

Check warning on line 141 in src/pymovements/dataset/dataset.py

View check run for this annotation

Codecov / codecov/patch

src/pymovements/dataset/dataset.py#L141

Added line #L141 was not covered by tests

# Reading measures files precomuted by authors of the dataset
if self.definition.has_files['precomputed_reading_measures']:
self.load_precomputed_reading_measures()
Expand Down Expand Up @@ -213,6 +216,15 @@
)
return self

def load_precomputed_aois(self) -> None:
"""Load precomputed aois."""
self._check_fileinfo()
self.precomputed_events = dataset_files.load_precomputed_event_files(

Check warning on line 222 in src/pymovements/dataset/dataset.py

View check run for this annotation

Codecov / codecov/patch

src/pymovements/dataset/dataset.py#L221-L222

Added lines #L221 - L222 were not covered by tests
self.definition,
self.fileinfo['precomputed_aois'],
self.paths,
)

def load_precomputed_events(self) -> None:
"""Load precomputed events."""
self._check_fileinfo()
Expand Down
4 changes: 4 additions & 0 deletions src/pymovements/datasets/sb_sat.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class SBSAT(DatasetDefinition):
'gaze': True,
'precomputed_events': True,
'precomputed_reading_measures': False,
'precomputed_aois': True,
},
)
mirrors: dict[str, tuple[str, ...]] = field(
Expand All @@ -143,6 +144,9 @@ class SBSAT(DatasetDefinition):
'precomputed_events': (
'https://raw.githubusercontent.com/ahnchive/SB-SAT/master/fixation/',
),
'precomputed_aois': (
'https://raw.githubusercontent.com/ahnchive/SB-SAT/master/fixation/',
),
},
)
resources: dict[str, tuple[dict[str, str], ...]] = field(
Expand Down
Loading