lamp_pair_phase — DRIVE crossing op

• Data kinds: signal × signal → table

• Call: import fullseye as fs; fs.ledger.lamp_pair_phase(a, b, fps: 'float', *, f_min: 'float' = 0.0, pad: 'int' = 8, tol: 'float' = 0.25) -> 'Dict[str, object]' (to call the implementation directly, import drivecrossing; drivecrossing.lamp_pair_phase(a, b, fps: 'float', *, f_min: 'float' = 0.0, pad: 'int' = 8, tol: 'float' = 0.25) -> 'Dict[str, object]'; from the registry, opsdrive.get("lamp_pair_phase"))

Usage

Estimates the common blinking frequency and the phase difference from 2 brightness time series (pixels of the 2 lamps) via the cross-spectrum.

Subtract the mean, apply a Hann window, and rFFT zero-padded by a factor of pad. At the peak of |A| + |B| (f_min or above, excluding the tail around 0 Hz), fold φ = arg(A_k B̄_k) into [0, π]. delay = φ / (2π f). alternating = |φ − π| < tol (alternating flashing). The frequency is the apparent value (flashing faster than fps/2 aliases). ValueError if either one is constant.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_driving_crossing — py -3.11 examples/poc_driving_crossing.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (crossing)

crossing_timing_check · crossing_gate_state · crossing_lamp_signal · crossing_clear_time · exit_room_check · crossing_stop_check · track_sight_distance · sight_triangle_distance


*Provenance: drivecrossing.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.