Skip to content

v0.30.0 - Event Rate Summary Output (2026-07-02)

What Changed?

This release adds summary output to check_event_rate.py. After computing rates, a per-hit_type statistics table and layer efficiency table are always printed to stdout. With --save, a rate_summary_{freq}.json file is saved alongside the plot.


What's New

Main Feature: Summary Output in check_event_rate.py

What it does: Prints two Rich tables to stdout after every run — one for per-hit_type counts and rates, one for layer efficiency — regardless of the --hit-type filter used for plotting. Also saves a structured JSON summary file when --save is specified.

How to use it:

# Print summary to terminal
uv run examples/check_event_rate.py ./data --pattern "*.parquet"

# Save plot + summary JSON
uv run examples/check_event_rate.py ./data --save

Output files (with --save):

rate_summary_10s.png
rate_summary_10s.json

Summary JSON structure:

{
  "total": 12345,
  "duration": 3600.0,
  "resample_s": 10,
  "counts": {"1": 100, "2": 200, ...},
  "rate_mean": {"1": 0.0123, ...},
  "rate_std": {"1": 0.001, ...},
  "efficiency": {"T": 0.85, "M": 0.82, "B": 0.79, "TMB": 0.61}
}

Layer efficiency formulas (3-layer coincidence method, consistent with monitor_events.py):

  • η(T) = TMB / (TMB + MB)
  • η(M) = TMB / (TMB + TB)
  • η(B) = TMB / (TMB + TM)
  • η(TMB) = TMB / total

Installation

Quick Start

# Get the release
git checkout 0.30.0

# Setup
task env:setup

# Run CLI
uv run kazunoko --help

What's Different from the Last Version?

✅ Added

  • check_event_rate.py: compute_summary() — aggregates counts, rates, and layer efficiency
  • check_event_rate.py: print_summary() — prints two Rich tables to stdout (always all hit_types 1–7)
  • check_event_rate.py: save_summary() — writes summary to JSON with --save
  • check_event_rate.py: duration [s] and resample_s [int] fields in summary

🔧 Changed

  • check_event_rate.py: Output filenames simplified to rate_summary_{freq}.png / rate_summary_{freq}.json
  • check_event_rate.py: Summary always covers all hit_types 1–7, independent of --hit-type plot filter

Is It Safe to Upgrade?

Backward Compatible: Yes

  • No CLI option changes
  • Summary output is additive; existing plot behavior is unchanged

Tests Passed

  • ✅ Builds without errors
  • uv run check_event_rate.py ./data prints summary tables to stdout
  • uv run check_event_rate.py ./data --save produces rate_summary_10s.png and rate_summary_10s.json

Release Details

  • Date: 2026-07-02
  • Version: v0.30.0
  • Files Changed: 1 (check_event_rate.py)

Next Steps

  • Per-hit_type rate time series export (CSV/JSONL)