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

allow events descriptions to contain 0 values #93

Closed
compmonks opened this issue Jun 30, 2022 · 3 comments
Closed

allow events descriptions to contain 0 values #93

compmonks opened this issue Jun 30, 2022 · 3 comments

Comments

@compmonks
Copy link
Contributor

I have an event file with 'labels' (description) which contain 0 values.
In this case, the labels are rotations in degrees but write_brainvision fails during _chk_events and returns the following error: events: when type is Stimulus, descriptions must be positve ints.

Would it be possible to allow event["description"] to be at least >= 0 instead of >=1? The current test is

443 if event["description"] < 1:
444                 raise ValueError(f"events: when `type` is {event['type']}, "
445                                  "descriptions must be positve ints.")```
@sappelhoff
Copy link
Member

Thanks for the report I think >= 0 would still be fine. Do you want to prepare a PR?

Alternatively, just use the stimulus type Comment and you can add whatever information you'd like.

@compmonks
Copy link
Contributor Author

compmonks commented Jul 4, 2022

@sappelhoff , thanks! I just created one there: #95 .
@cbrnr, I did not change anything regarding the event duration test :)

@sappelhoff
Copy link
Member

closed in #95

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

No branches or pull requests

2 participants