AllenNeuralDynamics / aind-fip-dff

This capsule takes an input raw NWB file of fiber data and creates processed DFF traces
MIT License
0 stars 0 forks source link

NWB files tables in the files need to be reorganized to follow some standardized convention #4

Open alexpiet opened 1 month ago

alexpiet commented 1 month ago
hanhou commented 1 month ago

scratch['metadata'] should have all the information in the aind-metadata session.json, right?

Actually the opposite is true. Scratch is my temporary way of storing meta data, so we should remove it and make sure that all information in the scratach exists in the json metadata files.

Ahad-Allen commented 1 month ago
  • nwb.stimulus should contain:

    • go Cue (currently only in trials)
    • rewards (currently in acquisitions, and only has time of rewards, not size)

      • data should contain the reward volume, instead of "1" which is the current value
    • scratch['metadata'] should have all the information in the aind-metadata session.json, right?

    • nwb.experimenter is none

    • nwb.session_description is the string "Test File"

    • nwb.lab is none

    • nwb.notes is none (we have notes in the metadata)

    • nwb.protocol is none

    • nwb.surgery is none

    • nwb.virus is none

Most of this makes sense to update! We can pull a lot of the missing metadata from the json files. The scratch section should be removed, as Han pointed out. I'm a little confused on the changes you'd like to do to the stimulus. Are you suggesting we add the Stim table with reward times and go Cues in it(I am not sure what a go Cue is, but that is probably just my ignorance on experimental design here)? That shouldn't be too large of a change, if so!

alexpiet commented 1 month ago

Yes, we should add a stimulus table with reward times (water delivery, currently in acquisition), and go cue (sound played to the mouse, currently only in the trials table)

Ahad-Allen commented 3 weeks ago

@rachelstephlee here's the metadata objects we should be adding

rachelstephlee commented 3 weeks ago

where was the session_description set? I can't re-set it. NWB gives me an error that the attribute is already set.

rachelstephlee commented 2 weeks ago

@rachelstephlee will followup with @Ahad-Allen on this.

Ahad-Allen commented 2 weeks ago

I believe @rachelstephlee already did some work on adding most of this metadata, and I have some code that should move where the gocues are present. We still need to add reward volume and remove scratch. I can work on these now

Ahad-Allen commented 1 week ago

Good news, the reward volume size is already in the trials table as reward_size_left and reward_size_right. I added the gocues in the feat-4 branch. I'll push a pr now

Ahad-Allen commented 1 week ago

PR: https://github.com/AllenNeuralDynamics/NWB-Packaging-FiberPhotometry-Base-Capsule/pull/21

alexpiet commented 1 week ago

Updated specs: nwb.acquisitions['left_reward_delivery_time'].data should contain reward volume

These fields should be grabbed from the aind metadata files

alexpiet commented 1 week ago

https://github.com/AllenNeuralDynamics/NWB-Packaging-FiberPhotometry-Base-Capsule/pull/16 adds nwb.surgery, nwb.Experimenter, nwb.protocol, and nwb.lab

alexpiet commented 1 week ago

Need to define an NWB specification here

jeromelecoq commented 1 week ago

Assigning to Alex to finish document. @Ahad-Allen can handle once done.

alexpiet commented 1 week ago

This NWB extension is for adding AIND metadata to NWB files https://github.com/AllenNeuralDynamics/ndx-aind-metadata