libSDRForge
Loading...
Searching...
No Matches
sdrforge.weather.same_benchmark Namespace Reference

Reproducible end-to-end NOAA SAME audio impairment benchmark. More...

Classes

class  BenchmarkResult
 Provide BenchmarkResult behavior. More...

Functions

np.ndarray add_awgn (np.ndarray audio, float snr_db, np.random.Generator rng)
 Add reproducible white Gaussian noise at signal-power SNR in dB.
tuple[int, int] _byte_errors (bytes expected, bytes decoded)
list[BenchmarkResult] benchmark (*, tuple[float,...] snrs=DEFAULT_SNR_DB, tuple[float,...] baud_errors=(0.0, 1.0), int trials=3, int seed=2026, bool known_clock=True)
 Measure exact-byte header recovery, including clock-search failures.
int main (list[str]|None argv=None)
 Provide main behavior.

Variables

str HEADER = b"ZCZC-WXR-RWT-026099+0030-3211200-KDTX/NWS-"
tuple DEFAULT_SNR_DB = (30.0, 20.0, 10.0, 5.0, 0.0)

Detailed Description

Reproducible end-to-end NOAA SAME audio impairment benchmark.

Function Documentation

◆ _byte_errors()

tuple[int, int] sdrforge.weather.same_benchmark._byte_errors ( bytes expected,
bytes decoded )
protected
Best contiguous alignment and longest correct prefix for diagnostics.

A deletion/insertion may inflate the mismatch count. This is a diagnostic
approximation, not an edit-distance metric or SAME error correction.

◆ add_awgn()

np.ndarray sdrforge.weather.same_benchmark.add_awgn ( np.ndarray audio,
float snr_db,
np.random.Generator rng )

Add reproducible white Gaussian noise at signal-power SNR in dB.

Parameters
audioThe audio value.
snr_dbThe snr db value.
rngThe rng value.
Returns
The operation result.

◆ benchmark()

list[BenchmarkResult] sdrforge.weather.same_benchmark.benchmark ( * ,
tuple[float, ...] snrs = DEFAULT_SNR_DB,
tuple[float, ...] baud_errors = (0.0, 1.0),
int trials = 3,
int seed = 2026,
bool known_clock = True )

Measure exact-byte header recovery, including clock-search failures.

Parameters
snrsThe snrs value.
baud_errorsThe baud errors value.
trialsThe trials value.
seedThe seed value.
known_clockThe known clock value.
Returns
The operation result.

◆ main()

int sdrforge.weather.same_benchmark.main ( list[str] | None argv = None)

Provide main behavior.

Parameters
argvThe argv value.
Returns
The operation result.

Variable Documentation

◆ DEFAULT_SNR_DB

tuple sdrforge.weather.same_benchmark.DEFAULT_SNR_DB = (30.0, 20.0, 10.0, 5.0, 0.0)

◆ HEADER

str sdrforge.weather.same_benchmark.HEADER = b"ZCZC-WXR-RWT-026099+0030-3211200-KDTX/NWS-"