AllenInstitute / brain_observatory_qc

Other
2 stars 0 forks source link

Frame rate inconsistency #242

Open jkim0731 opened 1 year ago

jkim0731 commented 1 year ago

Describe the bug LearningmFISHTask1A dataset have inconsistent frame rate. Data from Apr 2022 have either 10.7 or 11.2 Hz frame rate. (MESO.2 at 10.7 Hz, MESO.1 at 11.2 Hz) Data from late Sept 2022 have either 11.2 or 9.5 Hz frame rate. (MESO.2 at 9.5 Hz, MESO.1 at 11.2 Hz) Data since Oct 2022 have 9.5 Hz frame rate. (Both equipments at 9.5 Hz)

Expected behavior Expected to have a consistent frame rate. Previous dataset is known to have 10.7 Hz frame rate (need to confirm consistency from older dataset).

Scope I have looked into LearningmFISHTask1A and LearningmFISHdevelopment projects. DataFrame at \allen\programs\mindscope\workgroups\learning\qc_issues\lamf_frame_rate.csv has "LearningmFISHTask1A" only. acquisition_framerate_Hz is captured from platform.json file. lims_hz is captured from ophys_timestamps (using brain_observatory_qc.pipeline_dev.calculate_new_dff.get_correct_frame_rate, which in turn uses visual_behavior.data_access.from_lims_utilities.utils.get_timestamps(lims_data)). The values are similar.

Additional context They all have the same FOV size (512 x 512), except for a rare error cases (1048 x 512).

jkim0731 commented 1 year ago

Actually, frame rate from the platform.json (which records 2p setting, I guess?) and the actual frame rate calculated from lims are different, and I think we need to understand where the discrepancy comes from.

DowntonCrabby commented 1 year ago

@jkim0731 can you specify a little more?

Is the frame rate inconsistent for a single field of view? like- is it fluctuating during a session? This would likely show up in a standard deviation metric

OR Is the frame rate consistent for a single field of view- but not what is expected? This should show up as the mean frame rate/interframe interval being different from what's expected?

jkim0731 commented 1 year ago

@DowntonCrabby It was about mean frame rate, and the inconsistency was observed between sessions. I have not looked into within session frame rate variation.

I asked @nataliaorlova about it and learned that the frame rate depends on the geometry of multiple FOVs, which in turn affects fly-back time.

I think what we need for now is documenting the relationship between the FOV configuration (combination of targeted_structure and depths) and resulting frame rate, and letting people know about it.

matchings commented 9 months ago

This is important. The metadata uploaded to lims (now Code Ocean) needs to reflect the correct frame rate. Tagging @arielleleon here since she is working with ophys metadata in CO.

Also, the frame rate shouldn't be this variable to begin with. Less than 10Hz is not ideal. @jkim0731 Let's try to remember to talk to the Natalia replacement engineer about this when they start.