Skip to content

Implement first version of QA-turned-QC code for ROI mis-locating #1336

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

Open
alexpiet opened this issue Jan 28, 2025 · 9 comments
Open

Implement first version of QA-turned-QC code for ROI mis-locating #1336

alexpiet opened this issue Jan 28, 2025 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@alexpiet
Copy link
Collaborator

No description provided.

@Ahad-Allen
Copy link
Collaborator

@hagikent to coordinate with @alexpiet about running the code for this

@alexpiet
Copy link
Collaborator Author

alexpiet commented Feb 4, 2025

Create QC jsons, and add to metadata folder, and then they will show up in the QC portal

@hagikent
Copy link
Collaborator

hagikent commented Feb 18, 2025

Draft done (a reproducible capsule can be found here). The ideas is to visualize RawData (binary movie) + Experimenter Defined ROIs to check if ROIs are properly covering each fibre (+ empty space for floor signal recording).

UI during experiments
Image

QA/QC view for a corresponding session: (clearly, ROIs in the Red channel are off)
Image

Several discussion points:
1.Do we want to run on DAQ PC? or as a part of QC capsule?
2.Do we want to delete RawData once we confirm ROIs are ok ( = online extracted TCs in CSVs are valid)? This can save ~20GB per session. A while ago @dyf suggested deleting them. For deletion purpose, running on DAQ PC before watchdog-uploading would sound more logical.

@dyf
Copy link
Member

dyf commented Feb 20, 2025

Agree, I would create a quality_control.json using code run on the DAQ PC.

If you would prefer to defer this to the upload process, we can add a "job type" to the Data Transfer Service that computes this on the HPC before upload.

@alexpiet
Copy link
Collaborator Author

Makes sense to run on the acquisition computer. @hagikent Can this check run before the session runs so we can address the issue before we collect data? Or is the idea to detect issues that happen during the session?

@hagikent
Copy link
Collaborator

@dyf
This routine is super light-weight and no advantage of using clusters.
We should rather do it locally so that we can exclude rawdata from watchdog uploading (this part I need help from @alexpiet )

@alexpiet

to detect issues that happen during the session?
rather this.


Ok, then I will ditch CO and make a local .py version of this including generating QCs corresponding to this QA.

@hagikent hagikent changed the title Implement first version of QA code ran upon data acquisition Implement first version of QA-turned-QC code for ROI mis-locating Feb 25, 2025
@hagikent
Copy link
Collaborator

hagikent commented Feb 25, 2025

Practically, it's impossible to do QA while having human in the loop before uploading. Thus, we agreed to make this just a part of QC pipeline. I will work on integrating the draft to the fip-raw-qc capsule and also set up a capsule to perform signal re-extraction (new ToDo item here: https://github.com/AllenNeuralDynamics/aind-physio-arch/issues/516).

@dougollerenshaw
Copy link

@hagikent are you still working on this? Any status update you can provide?

@hagikent
Copy link
Collaborator

Yes! When I have time to work on pipeline stuff, this would be the 1st thing I would do! Likely next week.

@alexpiet alexpiet added the enhancement New feature or request label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants