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

debug validator for ieeg (bep010): specification of HardwareFilters field in ieeg.json #668

Closed
irisgroen opened this issue Dec 6, 2018 · 2 comments

Comments

@irisgroen
Copy link

irisgroen commented Dec 6, 2018

I am having a difficult time figuring out how to format the HardwareFilter field for the visual_multimodal bids-example dataset (bids-standard/bids-examples#138) for the ieeg (bep010) branch. The following is not correct:

"HardwareFilters": "HighPass:0.16,LowPass:500",

I've have tried to add curly brackets to format according to these instructions:
https://github.com/bids-standard/bids-validator/blob/307b4b2e9aa6381c47e0b2f935b0bb081376f18c/validators/schemas/eeg.json#L29-L40

but the validator keeps throwing the following errors:
./sub-som682/ses-somecog01/ieeg/sub-som682_ses-somecog01_task-hrfpattern_run-01_ieeg.json
Evidence: .HardwareFilters should be object
./sub-som682/ses-somecog01/ieeg/sub-som682_ses-somecog01_task-hrfpattern_run-01_ieeg.json
Evidence: .HardwareFilters should match pattern "^n/a$"
./sub-som682/ses-somecog01/ieeg/sub-som682_ses-somecog01_task-hrfpattern_run-01_ieeg.json
Evidence: .HardwareFilters should match some schema in anyOf

Could someone please clarify? There are no examples in either bep006 or bep010 that actually have a hardware filters field in the eeg.json file as far as I could see. Thanks!

@sappelhoff
Copy link
Member

you can find more information on how to define filters here: https://github.com/bids-standard/bids-starter-kit/wiki/FAQ#how-to-format-hardware-and-software-filter-fields-in-a-json

  • A JSON object is content confined within curly brackets
  • The content of a JSON object is a bunch of key-value pairs
  • Keys are always strings such as "Key" or 'Key'
  • Values can be anything, for example another JSON object

... defining the filters requires:

  1. define an object
  2. for each filter you want to define, add a new object

Your example:

{
"HighPass": {"cutoff": 0.16},
"LowPass": {"cutoff": 500}
}

Note that within a JSON object, you can define as many parameters as you want: not only the cutoff_frequency, but for example the filter slope (or other things).

Hope that helps!

@irisgroen
Copy link
Author

That is indeed helpful, I get it now! I am writing the files using Matlab jsonwrite function and for some reason that added backward slashes in the name but when I manually removed those it passes the validator. Thanks @sappelhoff for your quick response!

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