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

Metadata errors to fix #510

Open alexpiet opened 5 months ago

alexpiet commented 5 months ago

Rig

Session

alexpiet commented 5 months ago

@XX-Yin Can you take care of the Session metadata updates?

XX-Yin commented 5 months ago

@XX-Yin Can you take care of the Session metadata updates?

I can handle the session metadata.

hagikent commented 4 months ago

I saw a couple behavior_json has erroneous entries such as animal_weight_post = 24..12 (should reas 24.12) Would it be possible to "force" input type?

This causes ValueError: could not convert string to float and would be a reason for session.json not being produced.

XX-Yin commented 4 months ago

I can add a format check when using the animal_weight_post in the session metadata. Please let me know if you find other edge cases.

XX-Yin commented 4 months ago

I saw a couple behavior_json has erroneous entries such as animal_weight_post = 24..12 (should reas 24.12) Would it be possible to "force" input type?

This causes ValueError: could not convert string to float and would be a reason for session.json not being produced.

This session should be an old session. The current GUI will check the format and the non-numeric expression is not allowed.

alexpiet commented 1 month ago

Additional feedback from Saskia about session metadata. @XX-Yin can you address these issues?

Notes are for behavior_719511_2024-08-05_09-33-05 (I believe):

In Session:

XX-Yin commented 1 month ago

@alexpiet I do not have time to address these issues recently. Did you have a discussion with Saskia about these issues?

alexpiet commented 1 month ago

@alexpiet I do not have time to address these issues recently. Did you have a discussion with Saskia about these issues?

Saskia gave me feedback on the session.json while I was addressing the issue of ".csv" in the fieldnames blocking uploads to DocDB.

XX-Yin commented 1 month ago

The session metadata can be regenerated easily when we update the code.

JeremiahYCohen commented 4 weeks ago

Do we have an update here @XX-Yin ? Do you need help from one or two other folks to get this done?

XX-Yin commented 4 weeks ago

I don’t get a chance to update it. That would be great if some forks can help with this. Who should I contact for help?

Get Outlook for iOShttps://aka.ms/o0ukef


From: JeremiahYCohen @.> Sent: Thursday, October 31, 2024 8:24:20 AM To: AllenNeuralDynamics/dynamic-foraging-task @.> Cc: Xinxin Yin @.>; Mention @.> Subject: Re: [AllenNeuralDynamics/dynamic-foraging-task] Metadata errors to fix (Issue #510)

Do we have an update here @XX-Yinhttps://github.com/XX-Yin ? Do you need help from one or two other folks to get this done?

— Reply to this email directly, view it on GitHubhttps://github.com/AllenNeuralDynamics/dynamic-foraging-task/issues/510#issuecomment-2450161059, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2CTX5VS3RDXOSBL6TWECVTZ6JDSJAVCNFSM6AAAAABJGQB67CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJQGE3DCMBVHE. You are receiving this because you were mentioned.Message ID: @.***>

alakunina commented 4 weeks ago

Can I help with getting this updated? I also really need the metadata issues fixed for my experiments.

JeremiahYCohen commented 3 weeks ago

@alakunina That would be great, thanks. @hanhou can you work with Anna on this?

hanhou commented 3 weeks ago

@alakunina That would be great, thanks. @hanhou can you work with Anna on this?

No problem.

JeremiahYCohen commented 2 weeks ago

@alakunina @hanhou @XX-Yin any updates here? There are nine unresolved items above. Happy to add other folks if this is a big lift.

alexpiet commented 2 weeks ago

Probably a good time to take care of this as well:

hagikent commented 2 weeks ago

@alexpiet FYI, I suggested David ingesting "requestor" from surgery form into procedure. Can inherit from there or manually inputting at GUI for each session. Latter maybe better as, in rare cases, requester and responsible-sci may be different.

XX-Yin commented 1 week ago
XX-Yin commented 1 week ago

I updated most fields. And there are some fields requiring more discussion tomorrow.

XX-Yin commented 1 week ago
  • [ ] "Lick sensor left" and "Lick sensor right" are not daq_names for your rig and thus can't be listed as under daq_names. (Xinxin: the new lick detector should be included in the daq_names? Janelia should be removed from daq names)
  • [x] Camera names don't match the names in the rig. They must match. There is a utility function you can use to make sure that the names align between rig and session.
  • [ ] Reward delivery cannot be null. How are you delivery rewards without it? (Xinxin: we don't have the lickspout reference area; need a reference area and reference coordinates collected from the GUI)
  • [ ] Your session_end_time is before the end of one of your data streams. The end time should be the last time of all data streams and stimulus epochs. (Xinxin: the session_end_time here is the end of the behavior session. For each data stream, there is a separate start and end time. Behavior should go to the stimulus_epoch) Stimulus Epoch
  • [x] Missing stimulus_device_name
  • [x] These output parameters and task parameters duplicate almost the entire metadata schema. Can we please please please not do this? Very seriously, this is going to make our DocDB painful and it ultimately undermines having the schema in the first place.
  • [x] eg. calibrations should be in the calibration field
  • [ ] frame rate should be in the device (also, check the version of the schema you're using. The cameras in your device class have a max_frame_rate which was changed a while ago) (Xinxin: not clear to me; change the rig about the max_frame_rate)
  • [ ] Your frame_num item specifically is blocking upload to DocDB. You can't have fields with ".csv" in the name. This information should live in the quality_control class (which was only recently added to the schema, but that's where it should live) (Alex: the .csv name is fixed, but not moved to quality_control)
  • [x] adding software name to the stimulus_epochs
alexpiet commented 1 week ago
alexpiet commented 1 week ago
XX-Yin commented 1 week ago
  • [x] "Lick sensor left" and "Lick sensor right" are not daq_names for your rig and thus can't be listed as under daq_names. (Xinxin: the new lick detector should be included in the daq_names? Janelia should be removed from daq names)
  • [x] Camera names don't match the names in the rig. They must match. There is a utility function you can use to make sure that the names align between rig and session.
  • [x] Reward delivery cannot be null. How are you delivery rewards without it? (Xinxin: we don't have the lickspout reference area; need a reference area and reference coordinates collected from the GUI)
  • [x] Your session_end_time is before the end of one of your data streams. The end time should be the last time of all data streams and stimulus epochs. (Xinxin: the session_end_time here is the end of the behavior session. For each data stream, there is a separate start and end time. Behavior should go to the stimulus_epoch) Stimulus Epoch
  • [x] Missing stimulus_device_name
  • [x] These output parameters and task parameters duplicate almost the entire metadata schema. Can we please please please not do this? Very seriously, this is going to make our DocDB painful and it ultimately undermines having the schema in the first place.
  • [x] eg. calibrations should be in the calibration field
  • [x] frame rate should be in the device (also, check the version of the schema you're using. The cameras in your device class have a max_frame_rate which was changed a while ago) (Xinxin: not clear to me; change the rig about the max_frame_rate)
  • [x] Your frame_num item specifically is blocking upload to DocDB. You can't have fields with ".csv" in the name. This information should live in the quality_control class (which was only recently added to the schema, but that's where it should live) (Alex: the .csv name is fixed, but not moved to quality_control; remove them from the session)
  • [x] adding software name to the stimulus_epochs
  • [x] mismatch harp names
alexpiet commented 1 week ago