From 4748b2cfd4a718d06d3104ad0c7b5fff8a51a9bb Mon Sep 17 00:00:00 2001 From: julia-pfarr Date: Tue, 19 Nov 2024 14:36:48 -0500 Subject: [PATCH] Modify metadata.yml according to #99 and #103 - change name to "eyelink_metadata.yml" so that it has a unique name for 1. ezBIDS to look for in a folder and 2. for EyeLink because other eyetrackers will have other missing metadata and need their own file for the manual metadata - change tests to look for new filename - include commit 6e787b6 of metadata schema from bids specification --- eye2bids/config/{metadata.yml => eyelink_metadata.yml} | 4 ++-- tests/data/{metadata.yml => eyelink_metadata.yml} | 2 +- tests/test_cli.py | 2 +- tests/test_edf2bids.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) rename eye2bids/config/{metadata.yml => eyelink_metadata.yml} (84%) rename tests/data/{metadata.yml => eyelink_metadata.yml} (98%) diff --git a/eye2bids/config/metadata.yml b/eye2bids/config/eyelink_metadata.yml similarity index 84% rename from eye2bids/config/metadata.yml rename to eye2bids/config/eyelink_metadata.yml index 5dbd215..8d11f18 100644 --- a/eye2bids/config/metadata.yml +++ b/eye2bids/config/eyelink_metadata.yml @@ -10,7 +10,7 @@ SampleCoordinateUnits: str SampleCoordinateSystem: str EnvironmentCoordinates: str -ScreenDistance: int +ScreenDistance: float # or express as X,Y,Z coordinates, e.g. [0.05, 0.30, 0.40] ScreenRefreshRate: int ScreenSize: [float] @@ -18,7 +18,7 @@ ScreenSize: [float] SoftwareVersion: str ScreenAOIDefinition: [str, [int]] EyeCameraSettings: -EyeTrackerDistance: float +EyeTrackerDistance: float # or express as X,Y,Z coordinates, e.g. [0.05, 0.30, 0.40] FeatureDetectionSettings: GazeMappingSettings: RawDataFilters: diff --git a/tests/data/metadata.yml b/tests/data/eyelink_metadata.yml similarity index 98% rename from tests/data/metadata.yml rename to tests/data/eyelink_metadata.yml index 035b1d2..c16e240 100644 --- a/tests/data/metadata.yml +++ b/tests/data/eyelink_metadata.yml @@ -9,7 +9,7 @@ SampleCoordinateUnits: pixel SampleCoordinateSystem: gaze-on-screen EnvironmentCoordinates: top-left -ScreenDistance: 60 +ScreenDistance: 0.6 ScreenRefreshRate: 60 ScreenSize: [0.386, 0.29] diff --git a/tests/test_cli.py b/tests/test_cli.py index 8ed891f..3c1bc27 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -19,7 +19,7 @@ def root_dir() -> Path: @pytest.mark.parametrize("output_dir", [data_dir() / "output", None]) @pytest.mark.parametrize("use_relative_path", [False, True]) def test_edf_cli(use_relative_path, output_dir, eyelink_test_data_dir): - metadata_file = data_dir() / "metadata.yml" + metadata_file = data_dir() / "eyelink_metadata.yml" input_dir = eyelink_test_data_dir / "satf" input_file = edf_test_files(input_dir=input_dir)[0] diff --git a/tests/test_edf2bids.py b/tests/test_edf2bids.py index bc02978..5c129e2 100644 --- a/tests/test_edf2bids.py +++ b/tests/test_edf2bids.py @@ -89,7 +89,7 @@ def _check_output_content(output_dir, input_file, eye=1): @pytest.mark.skipif(not _check_edf2asc_present(), reason="edf2asc missing") def test_edf_end_to_end_all(eyelink_test_data_dir, folder): """Run conversion of all test datasets and check output.""" - metadata_file = data_dir() / "metadata.yml" + metadata_file = data_dir() / "eyelink_metadata.yml" input_dir = eyelink_test_data_dir / folder input_file = edf_test_files(input_dir=input_dir)[0] @@ -111,7 +111,7 @@ def test_edf_end_to_end_all(eyelink_test_data_dir, folder): @pytest.mark.skipif(not _check_edf2asc_present(), reason="edf2asc missing") def test_edf_end_to_end_emg_xfail(eyelink_test_data_dir, folder): """Run conversion of all test datasets and check output.""" - metadata_file = data_dir() / "metadata.yml" + metadata_file = data_dir() / "eyelink_metadata.yml" input_dir = eyelink_test_data_dir / folder input_file = edf_test_files(input_dir=input_dir)[0] @@ -128,7 +128,7 @@ def test_edf_end_to_end_emg_xfail(eyelink_test_data_dir, folder): @pytest.mark.xfail(reason="Output is not a continuous recording. See #69.") @pytest.mark.skipif(not _check_edf2asc_present(), reason="edf2asc missing") def test_edf_end_to_end(eyelink_test_data_dir): - metadata_file = data_dir() / "metadata.yml" + metadata_file = data_dir() / "eyelink_metadata.yml" input_dir = eyelink_test_data_dir / "satf" input_file = edf_test_files(input_dir=input_dir)[0] @@ -175,7 +175,7 @@ def test_edf_end_to_end_error_no_metadata(eyelink_test_data_dir): @pytest.mark.skipif(not _check_edf2asc_present(), reason="edf2asc missing") def test_edf_end_to_end_2eyes(eyelink_test_data_dir): - metadata_file = data_dir() / "metadata.yml" + metadata_file = data_dir() / "eyelink_metadata.yml" input_dir = eyelink_test_data_dir / "2eyes" input_file = edf_test_files(input_dir=input_dir)[0]