Skip to content
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

Delete raw assets for Same Probe Different Record Node #107

Open
4 of 5 tasks
arjunsridhar12345 opened this issue Jun 11, 2024 · 2 comments
Open
4 of 5 tasks

Delete raw assets for Same Probe Different Record Node #107

arjunsridhar12345 opened this issue Jun 11, 2024 · 2 comments
Assignees

Comments

@arjunsridhar12345
Copy link
Contributor

arjunsridhar12345 commented Jun 11, 2024

Sessions:

  • ecephys_699847_2024-04-15_12-48-18: cd81b518-07bf-41b9-88fa-584343ca1df6
  • ecephys_699847_2024-04-15_15-02-28: 03916edd-4171-45b5-b6c3-4f13c8588915
  • ecephys_708016_2024-04-29_15-01-49: 9ebbb8cb-6936-43d2-9b76-6120ce418f4e
  • ecephys_708016_2024-04-29_12-59-12: 7b56f221-e053-4d56-80a2-72535eee40cf
  • ecephys_702136_2024-03-06_13-24-14: e75044bd-7896-4f5d-a28e-779c099c1fb2
@arjunsridhar12345 arjunsridhar12345 self-assigned this Jun 11, 2024
@bjhardcastle
Copy link
Member

here's a script to find sessions with duplicate probes based on the current data on-site:

import pathlib
import npc_session

ROOT = pathlib.Path('//allen/programs/mindscope/workgroups/dynamicrouting/PilotEphys/Task 2 pilot')

for folder in ROOT.iterdir():
    if '_366122_' in folder.name:
        continue
    # if '702136_20240306' not in folder.name: # for testing - has duplicate probe F
    #     continue
    if not folder.is_dir():
        continue
    dat_files = list(folder.rglob('**/continuous/**/*Probe*-AP/continuous.dat'))
    if not dat_files:
        continue
    # assumption is 2 record nodes, one probe per 2 record nodes
    num_record_nodes = len(list((f.name for f in folder.rglob('Record Node *') if f.is_dir())))
    if num_record_nodes % 2 != 0:
        print(f"Odd number of record nodes: {num_record_nodes} - {folder}")
        continue
    # there may be multiple experiment folders per record node (therefore 2 per probe)
    # there may be multiple recording folders per experiment (therefore 2 per probe)
    num_experiments: int = len(list((f.name for f in folder.rglob('experiment[0-9]*') if f.is_dir())))
    num_recordings = len(list(f.name for f in folder.rglob('recording[0-9]*') if f.is_dir()))
    probes = list(npc_session.ProbeRecord(dat.as_posix()) for dat in dat_files)
    for p in set(probes):
        if probes.count(p) > (num_recordings / 2) * (num_experiments / 2):
            print(f"Duplicate {p.name} - {folder}")

@bjhardcastle
Copy link
Member

Still need to re-sort some of these with the 0.1.0 pipeline when available.

@bjhardcastle bjhardcastle added this to the paper1-datacube milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants