Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "jabs-postprocess"
version = "0.5.2"
version = "0.5.3"
description = "A python library for JABS postprocessing utilities."
readme = "README.md"
license = "LicenseRef-PLATFORM-LICENSE-AGREEMENT-FOR-NON-COMMERCIAL-USE"
Expand Down
4 changes: 4 additions & 0 deletions src/jabs_postprocess/compare_gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ def generate_output_paths(results_folder: Path):
def _expand_intervals_to_frames(df):
"""Expand behavior intervals into per-frame rows."""
expanded = df.copy()
# Ensure integer frame boundaries so range() receives ints even if upstream data was cast to float
for col in ["animal_idx", "start", "duration"]:
if col in expanded.columns:
expanded[col] = pd.to_numeric(expanded[col], errors="coerce").fillna(0).astype(int)
expanded["frame"] = expanded.apply(
lambda row: range(row["start"], row["start"] + row["duration"]), axis=1
)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading