PeerHerholz / BIDSonym

a BIDS app for pseudo-anonymization of neuroimaging data
https://peerherholz.github.io/BIDSonym/
BSD 3-Clause "New" or "Revised" License
51 stars 14 forks source link

.json sidecars mismatched #61

Open zenkavi opened 3 years ago

zenkavi commented 3 years ago

Hi,

I didn't entirely nail down how this happens but when using the del_meta options .json sidercars can get mismatched when writing them back to the original bids directory.

In my case my bold json's were confused with sbref jsons, sbref jsons with physio ones etc.

It might be because when the file names are 'zip' ped together some files aren't correctly aligned. https://github.com/PeerHerholz/BIDSonym/blob/master/bidsonym/utils.py#L199

Sorry I don't have more time to write a more detailed report but just wanted to flag this in case others have come across too. If defacing after preprocessing this could be easy to miss because the dataset would still pass validator but no bids app's would rely on info in sidecars anymore (e.g. fmriprep).