Skip to content

Commit

Permalink
return empty when missing thetacycles
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanharvey1 committed Dec 20, 2024
1 parent b299afd commit dc40e81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions neuro_py/io/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,12 @@ def load_theta_cycles(
filename = os.path.join(
basepath, os.path.basename(basepath) + ".thetacycles.events.mat"
)
if not os.path.exists(filename):
warnings.warn("file does not exist")
if return_epoch_array:
return nel.EpochArray()
return pd.DataFrame()

data = sio.loadmat(filename, simplify_cells=True)
df = pd.DataFrame()
df["start"] = data["thetacycles"]["timestamps"][:, 0]
Expand Down

0 comments on commit dc40e81

Please sign in to comment.