AllenNeuralDynamics / dynamic-foraging-task

Bonsai/Harp workflow for Dynamic Foraging with Python GUI for visualization and control
MIT License
5 stars 4 forks source link

Need to create session.json schema #303

Closed alexpiet closed 3 months ago

alexpiet commented 6 months ago

@dyf said I need to (1) generate a list of fields that we need to include, (2) figure out how to populate each field from the saved behavior data .json

assume d is the GUI created json file

see docs here: aind-data-schema: src/aind_data_schema/models

hanhou commented 5 months ago
hanhou commented 5 months ago

Some code snippets from TransferToNWB may be helpful (most backward compatibility issues already handled) https://github.com/AllenNeuralDynamics/dynamic-foraging-task/blob/427a450c7ef45d5648406dc3ea22644d08fae2b6/src/foraging_gui/TransferToNWB.py#L152-L174

alexpiet commented 4 months ago

steps for creating session.json

alexpiet commented 4 months ago

Useful example scripts for making metadata files: https://github.com/AllenNeuralDynamics/CTLUT-metadata-gen/tree/main/src/CTLUT_metadata_gen

hagikent commented 4 months ago

Copy data to VAST, with expected organization by data modality Run script that creates session.json from data modality, saves in metadata directory Upload to AWS

Is that what you discussed with Saskia today? I thought GUI would directly generate session.json but considering the multimodalness of our data collection, this makes sense. Since "copy data to VAST" is at the moment done by a simple Robocopy routine, let's discuss if we need an active reorganization of data during this copy.

alexpiet commented 4 months ago

Copy data to VAST, with expected organization by data modality Run script that creates session.json from data modality, saves in metadata directory Upload to AWS

Is that what you discussed with Saskia today? I thought GUI would directly generate session.json but considering the multimodalness of our data collection, this makes sense. Since "copy data to VAST" is at the moment done by a simple Robocopy routine, let's discuss if we need an active reorganization of data during this copy.

Yes, this is what we discussed as a solution to multi-modal issues. I think as long as the data copying to VAST keeps the organization that the rig computers save out, then that is fine.

@XX-Yin is going to create a draft script that generates session.json. For FIP/Ephys sessions we will need to modify the script to include additional information

hagikent commented 4 months ago

Ok, thanks. I already have ophys_session.json for my other photometry based platform, and just by extracting some parts would be sufficient to make the FIP-piece of session.json to be merged into at the level of VAST.

as long as the data copying to VAST keeps the organization that the rig computers save out

Yes, that's the case. \allen\aind\svc_aind_behavior_transfer \allen\aind\svc_aind_FIP_transfer

alexpiet commented 3 months ago

resolved by #405