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

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

Open
hyruuk opened this issue Feb 7, 2022 · 2 comments
Open

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

hyruuk opened this issue Feb 7, 2022 · 2 comments
Assignees

Comments

@hyruuk
Copy link
Collaborator

hyruuk commented Feb 7, 2022

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
Copy link
Contributor

bpinsard commented Feb 8, 2022

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).

  • LevelCompleted
  • FinalScore
  • FinalNumberOfLives (or number of times you died the 3 lives in mario)
  • ...

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:

  • VariablesAtStart
  • VariablesAtEnd

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

@hyruuk hyruuk assigned hyruuk and bpinsard and unassigned bpinsard and hyruuk Mar 29, 2022
@hyruuk
Copy link
Collaborator Author

hyruuk commented Mar 29, 2022

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 ?

@hyruuk hyruuk changed the title Non-BIDS path and file names in sourcedata Create JSON sidecar with a few general info Jan 10, 2023
@hyruuk hyruuk changed the title Create JSON sidecar with a few general info Create JSON sidecar with a few info for each bk2 Jan 10, 2023
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