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

checking h5py key to open binaries before data_path #1042

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions suite2p/io/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright © 2023 Howard Hughes Medical Institute, Authored by Carsen Stringer and Marius Pachitariu.
Copright © 2023 Howard Hughes Medical Institute, Authored by Carsen Stringer and Marius Pachitariu.
"""
import glob
import os
Expand Down Expand Up @@ -227,18 +227,17 @@ def find_files_open_binaries(ops1, ish5=False):
input_format = "h5"
print(input_format)
if input_format == "h5":
if len(ops1[0]["data_path"]) > 0:
fs, ops2 = get_h5_list(ops1[0])
print("NOTE: using a list of h5 files:")
print(fs)
# find h5"s
print(f"OPS1 h5py: {ops1[0]['h5py']}")
if ops1[0]["h5py"]:
fs = ops1[0]["h5py"]
else:
if ops1[0]["look_one_level_down"]:
fs = list_h5(ops1[0])
if len(ops1[0]["data_path"]) > 0:
fs, ops2 = get_h5_list(ops1[0])
print("NOTE: using a list of h5 files:")
print(fs)
# find h5"s
else:
fs = [ops1[0]["h5py"]]
raise Exception("No h5 files found")
elif input_format == "sbx":
# find sbx
fs, ops2 = get_sbx_list(ops1[0])
Expand Down
Loading