sccn / EEG-BIDS

21 stars 17 forks source link

export issues -- sessions or run STUDY number #121

Closed CPernet closed 2 years ago

CPernet commented 2 years ago

We export using the order as numeric for sessions, runs, etc ... but one should use string as people may have things such as session1 run 1 session 1 run 3 session run 2 session 2 run 3 ... we must be able to handle this without screwing the order (name string) specified and not rely on internal indexing

arnodelorme commented 2 years ago

Good point. Does BIDS allow for arbitrary session and run strings, e.g. sessionxyz_runkij?

Remi-Gau commented 2 years ago

Most entities use a label format (see for example here in the BIDS schema for session)

https://github.com/bids-standard/bids-specification/blob/9842cea7cab7b0493a7d7ef496401692d587216d/src/schema/objects/entities.yaml#L288

The label format is specified as [0-9a-zA-Z]+ here:

https://github.com/bids-standard/bids-specification/blob/9842cea7cab7b0493a7d7ef496401692d587216d/src/schema/objects/formats.yaml#L14

CPernet commented 2 years ago

It does - values of keys sub- ses- run- task- are any string - well any we can recode as a field --> the new function on eeglab miscfunc cleans your string for that purpose https://github.com/sccn/eeglab/blob/develop/functions/miscfunc/cleanvarname.m

arnodelorme commented 2 years ago

Is that what you wanted? See branch the very explicit branch "pernet_x"

Screen Shot 2022-05-09 at 6 57 55 PM Screen Shot 2022-05-09 at 6 57 44 PM

arnodelorme commented 2 years ago

And run bids_export_example4 to test Cleaned up the code as well and removed dozens of lines of useless code as well (not by me ;-).

arnodelorme commented 2 years ago

Closing this for now and merging the branch with master.