Skip to content

v0.17.3 - Coincidence Detection Fix (2026-03-05)

What Changed?

This release fixes the coincidence detection logic in check_coincidence.py. The find_coincidences() function was refactored to pre-rename all columns with _a/_b suffixes before calling pd.merge_asof, making the merge simpler and more robust. No library API changes were made.


What's New

Main Feature: Refactored find_coincidences() in check_coincidence.py

What it does: The previous implementation added a hidden helper column (__<on>_b) to preserve the right detector's timestamp before the merge. After the merge, the on column held the left detector's value without a suffix, and build_output_record() had to special-case it.

The new implementation renames all columns with _a/_b suffixes before calling pd.merge_asof using a temporary merge_key column as the join key. This eliminates the suffix conflict and makes build_output_record() uniform.

How to use it:

No change to the CLI interface. The output format is identical.

uv run check_coincidence.py ./detA ./detB --window 1s --hit-types 7

What's Different from the Last Version?

🔧 Changed

  • check_coincidence.py find_coincidences(): Pre-rename all columns with _a/_b suffixes before pd.merge_asof; use merge_key as join column
  • check_coincidence.py find_coincidences(): Restore integer dtypes for _b columns promoted to float by NaN rows before dropna()
  • check_coincidence.py build_output_record(): Removed on parameter; all columns are now accessed uniformly via _a/_b suffixes

🐛 Fixed

  • check_coincidence.py: Docstring --window default corrected from "1ms" to "1s"

Installation

Quick Start

# Get the release
git checkout 0.17.3

# Setup
uv sync

# Run CLI
uv run kazunoko --help

Is It Safe to Upgrade?

Backward Compatible: Yes

  • No changes to the library API (kazunoko package)
  • No changes to CLI options or defaults
  • check_coincidence.py output format is identical to the previous version

Tests Passed

  • ✅ Builds without errors
  • uvx ruff check src/ passes
  • ✅ Pre-commit hooks pass

Release Details

  • Date: 2026-03-05
  • Version: v0.17.3
  • Files Changed: 1
  • Commits: 3bd0033, 6f9d594

Next Steps

  • Add test coverage for check_coincidence.py merge logic