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

split physioevents and events json #92

Merged
merged 19 commits into from
Aug 2, 2024
Merged

split physioevents and events json #92

merged 19 commits into from
Aug 2, 2024

Conversation

julia-pfarr
Copy link
Member

See #90
Closes #90

Copy link
Contributor

@Remi-Gau Remi-Gau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to make the test a bit more stringent

Comment on lines 78 to 79
if ending == "_physio":
assert len(df[0].diff().unique()) == 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently this is failing for some data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAILED tests/test_edf2bids.py::test_edf_end_to_end - assert 5 == 1
 +  where 5 = len(array([        nan, 2.00000e+00, 1.10336e+05, 1.76840e+04, 1.61320e+04]))
 +    where array([        nan, 2.00000e+00, 1.10336e+05, 1.76840e+04, 1.61320e+04]) = unique()
 +      where unique = 0         NaN\n1         2.0\n2         2.0\n3         2.0\n4         2.0\n         ... \n531148    2.0\n531149    2.0\n531150    2.0\n531151    2.0\n531152    2.0\nName: 0, Length: 531153, dtype: float64.unique
 +        where 0         NaN\n1         2.0\n2         2.0\n3         2.0\n4         2.0\n         ... \n531148    2.0\n531149    2.0\n531150    2.0\n531151    2.0\n531152    2.0\nName: 0, Length: 531153, dtype: float64 = diff()
 +          where diff = 0         3098681\n1         3098683\n2         3098685\n3         3098687\n4         3098689\n           ...   \n531148    4305123\n531149    4305125\n531150    4305127\n531151    4305129\n531152    4305131\nName: 0, Length: 531153, dtype: int64.diff
FAILED tests/test_edf2bids.py::test_edf_end_to_end_2eyes - assert 2 == 1
 +  where 2 = len(array([nan,  1.]))
 +    where array([nan,  1.]) = unique()
 +      where unique = 0        NaN\n1        1.0\n2        1.0\n3        1.0\n4        1.0\n        ... \n51668    1.0\n51669    1.0\n51670    1.0\n51671    1.0\n51672    1.0\nName: 0, Length: 51673, dtype: float64.unique
 +        where 0        NaN\n1        1.0\n2        1.0\n3        1.0\n4        1.0\n        ... \n51668    1.0\n51669    1.0\n51670    1.0\n51671    1.0\n51672    1.0\nName: 0, Length: 51673, dtype: float64 = diff()
 +          where diff = 0        767979\n1        767980\n2        767981\n3        767982\n4        767983\n          ...  \n51668    819647\n51669    819648\n51670    819649\n51671    819650\n51672    819651\nName: 0, Length: 51673, dtype: int64.diff

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the the time stamp column contain nan?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it should not. It's kind of related to #69 where we said we would need an additional check to ensure that the timestamp in physio.tsv.gz is actually continuous because that might not be the case, at least for eyetrackers other than eyelink. Physioevents.tsv.gz should also not have NaNs in timestamp, but here it does not have to be continuous because a timestamp is only logged if there is an actual corresponding event.

So long story short, we need something checking that there are no NaNs for both, and a check for physio.tsv.gz that it's continuous.

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Aug 2, 2024

some tests are failing because the timestamps of the output physio.tsv.gz are not continuous because eyetracker was probably turned on and off

will need to be fixed as we resolve issue #69

@Remi-Gau Remi-Gau merged commit f939792 into main Aug 2, 2024
2 of 6 checks passed
@Remi-Gau Remi-Gau deleted the events-json branch August 2, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

split physioevents.json and events.json
2 participants