You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here's a script to find sessions with duplicate probes based on the current data on-site:
importpathlibimportnpc_sessionROOT=pathlib.Path('//allen/programs/mindscope/workgroups/dynamicrouting/PilotEphys/Task 2 pilot')
forfolderinROOT.iterdir():
if'_366122_'infolder.name:
continue# if '702136_20240306' not in folder.name: # for testing - has duplicate probe F# continueifnotfolder.is_dir():
continuedat_files=list(folder.rglob('**/continuous/**/*Probe*-AP/continuous.dat'))
ifnotdat_files:
continue# assumption is 2 record nodes, one probe per 2 record nodesnum_record_nodes=len(list((f.nameforfinfolder.rglob('Record Node *') iff.is_dir())))
ifnum_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.nameforfinfolder.rglob('experiment[0-9]*') iff.is_dir())))
num_recordings=len(list(f.nameforfinfolder.rglob('recording[0-9]*') iff.is_dir()))
probes=list(npc_session.ProbeRecord(dat.as_posix()) fordatindat_files)
forpinset(probes):
ifprobes.count(p) > (num_recordings/2) * (num_experiments/2):
print(f"Duplicate {p.name} - {folder}")
Sessions:
The text was updated successfully, but these errors were encountered: