Skip to content

Commit 47182d4

Browse files
authored
Merge pull request #390 from alejoe91/cn-generation-fixes
Drop shank ids when all NaN and clean up report
2 parents bfe18aa + be09f53 commit 47182d4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

resources/generate_cambridgeneurotech_library.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ def generate_all_probes(probe_tables_path, output_folder):
152152

153153
if np.all(pd.isna(contacts["contact_sides"])):
154154
contacts.drop(columns="contact_sides", inplace=True)
155-
else:
156-
print(f"Double sided probe: {sheet_name}")
155+
156+
if np.all(pd.isna(contacts["shank_ids"])):
157+
contacts.drop(columns="shank_ids", inplace=True)
157158

158159
if "z" in contacts.columns:
159160
contacts.drop(columns=["z"], inplace=True)
@@ -172,8 +173,9 @@ def generate_all_probes(probe_tables_path, output_folder):
172173
print(f"Problem loading {sheet_name}: {e}")
173174
sheets_with_issues.append(sheet_name)
174175

175-
print("Wrong contours:\n\n", wrong_contours)
176-
print("Sheets with issues:\n\n", sheets_with_issues)
176+
print(f"\nREPORT for CambridgeNeurotech probe library generation\n")
177+
print(f"Probes with wrong contours: {len(wrong_contours)}\n{wrong_contours}")
178+
print(f"Probes failed to load: {len(sheets_with_issues)}\n{sheets_with_issues}")
177179

178180

179181
if __name__ == "__main__":

0 commit comments

Comments
 (0)