courtois-neuromod / shinobi

subdataset of Courtois-neuromod project with task of playing ShinobiIII game in the MRI
1 stars 0 forks source link

Create JSON sidecar with a few info for each bk2 #5

Open hyruuk opened 2 years ago

hyruuk commented 2 years ago

Not sure if this is on purpose, but the files and folder nomenclature in sourcedata/ seem to be inconsistent with BIDS standard. For example, sessions are named "ses-shinobi_001" instead of "ses-001", and files are named : "sub-01_ses-shinobi_001_20200914-150431_ShinobiIIIReturnOfTheNinjaMaster-Genesis_Level5-0_003.bk2" instead of "sub-01_ses-001_task-shinobi_level-5_rep-003_gamedata.bk2.

To reproduce the formatting of the training dataset, .bk2 files could be associated with .json files that keep the timestamp information (currently in the filename) in the following format :

{"LevelStartTime": "2019-01-28 09:47:24", "LevelStartTimestamp": 1548686844.0, "Level": "Level1-0", "LevelRepetition": 1}

bpinsard commented 2 years ago

You are right that the file naming should be fixed to be more readable. Also we should get rid of the timestamp/datetime in the name for anonymity reasons. The timestamp was mainly there to avoid overwritting when relaunching, it is in fact the timestamp of the start of the script, not the start of the level.

The json sidecars could contain run-wide helpful info to filter levels without loading the bk2 files such as (naming to be polished).

In fact it should store all the variables included in a data.json such as https://github.com/courtois-neuromod/shinobi.stimuli/blob/main/ShinobiIIIReturnOfTheNinjaMaster-Genesis/data.json Maybe having to sub-dict:

Ideally we would generated these jsons and filenames directly in task_stimuli code at acquisition time.

hyruuk commented 2 years ago

Not sure how to generate this file without relying on reading them through a full gym-retro + shinobi.stimuli setup. This would probably need to be done outside the shinobi repo ?