new complex for --bin

This commit is contained in:
awe
2026-04-10 20:20:16 +03:00
parent eee1039099
commit fac0add45d
6 changed files with 36 additions and 15 deletions

View File

@ -33,8 +33,10 @@ def log_pair_to_sweep(avg_1: int, avg_2: int) -> float:
def tty_ch_pair_to_sweep(ch_1: int, ch_2: int) -> float:
"""Reduce a raw CH1/CH2 TTY point to a single sweep value."""
return float(abs(int(ch_1) - int(ch_2)))
"""Reduce a raw CH1/CH2 TTY point to power-like scalar ``ch1^2 + ch2^2``."""
ch_1_i = int(ch_1)
ch_2_i = int(ch_2)
return float((ch_1_i * ch_1_i) + (ch_2_i * ch_2_i))
class AsciiSweepParser: