_coordsystem.json error

16 views
Skip to first unread message

Dr Cyril, Pernet

unread,
Jun 13, 2021, 2:32:15 AM6/13/21
to bids-di...@googlegroups.com

I am puzzled by an error for this json file

{
  "EEGCoordinateUnits":"mm",
  "EEGCoordinateSystem":"ARS"
}

error:

Invalid JSON file. The file is not formatted according the schema.

.EEGCoordinateSystem should be equal to one of the allowed values

Note same thing happens with other A/P R/L S/I combo

reproducible:

change any of our BIDS exemple with RAS, AES, ect .. and the error occurs -- a validator issue?

Stefan Appelhoff

unread,
Jun 14, 2021, 3:22:37 AM6/14/21
to bids-discussion
Hi Cyril,

this is an expected behavior of the validator. It may seem unexpected because we added coverage for this validation step only more recently. Previous datasets "erroneously passed" validation before.

It's expected behavior because RAS, ARS, ... do not provide sufficient information about the coordinate system (where is the origin?).

Therefore you'll have to provide a valid "coordinate system keyword" from Appendix VIII: https://bids-specification.readthedocs.io/en/latest/99-appendices/08-coordinate-systems.html

The validation happens through JSON schemas. You can find the JSON schema for EEG here: https://github.com/bids-standard/bids-validator/blob/c60daacf3dbb4cea5a07d5274947c366cf4c0e3a/bids-validator/validators/json/schemas/common_definitions.json#L18

All other schemas are somewhere close to that file in the file tree, so you could have a look at the files.


Finally: If you want to add support for a currently uncovered coordinate system (i.e., one that's not in appendix VIII), that's very straight forward and easy to do:

  1. Make sure the coordinate system is currently not covered
  2. Make sure it doesn't make sense to use an already covered alternative
  3. Find a good documentation of your coordinate system (or create one)
  4. Make a Pull Request to the specification to add your coordinate system to appendix VIII

We just recently performed these steps to add two more coordinate systems for EEGLAB.

Best,

Stefan
Reply all
Reply to author
Forward
0 new messages