commkit 3.9.0__tar.gz → 3.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {commkit-3.9.0 → commkit-3.10.0}/.github/workflows/ci.yml +6 -5
- {commkit-3.9.0 → commkit-3.10.0}/AGENTS.md +5 -3
- {commkit-3.9.0 → commkit-3.10.0}/CHANGELOG.md +33 -1
- {commkit-3.9.0 → commkit-3.10.0}/PKG-INFO +14 -6
- {commkit-3.9.0 → commkit-3.10.0}/README.md +13 -5
- {commkit-3.9.0 → commkit-3.10.0}/commkit/__init__.py +1 -1
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/response.py +26 -1
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/__init__.py +4 -2
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/analysis.py +15 -17
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/coding.py +5 -4
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/constellation.py +26 -21
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/equalizer.py +10 -2
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/eye.py +23 -11
- commkit-3.10.0/commkit/plotting/filter_response.py +353 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/frequency.py +13 -7
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/recovery.py +8 -6
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/spectral.py +65 -7
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/theme.py +101 -8
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/timing.py +5 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/00-getting-started.ipynb +50 -23
- {commkit-3.9.0 → commkit-3.10.0}/examples/01-constellations-and-bit-mapping.ipynb +1 -7
- {commkit-3.9.0 → commkit-3.10.0}/examples/02-spectral-analysis.ipynb +86 -16
- {commkit-3.9.0 → commkit-3.10.0}/examples/03-digital-filters.ipynb +113 -23
- {commkit-3.9.0 → commkit-3.10.0}/examples/04-pulse-shaping-and-matched-filtering.ipynb +59 -33
- {commkit-3.9.0 → commkit-3.10.0}/examples/05-multirate-and-resampling.ipynb +3 -9
- {commkit-3.9.0 → commkit-3.10.0}/examples/06-awgn-and-performance-metrics.ipynb +1 -7
- {commkit-3.9.0 → commkit-3.10.0}/examples/07-channel-coding.ipynb +8 -18
- {commkit-3.9.0 → commkit-3.10.0}/examples/08-probabilistic-shaping-and-coded-modulation.ipynb +4 -11
- {commkit-3.9.0 → commkit-3.10.0}/examples/09-laser-phase-noise.ipynb +3 -8
- {commkit-3.9.0 → commkit-3.10.0}/examples/10-front-end-impairments.ipynb +80 -12
- {commkit-3.9.0 → commkit-3.10.0}/examples/11-frame-synchronization-and-timing.ipynb +1 -6
- {commkit-3.9.0 → commkit-3.10.0}/examples/12-sampling-clock-recovery.ipynb +4 -9
- {commkit-3.9.0 → commkit-3.10.0}/examples/13-frequency-offset-estimation.ipynb +11 -25
- {commkit-3.9.0 → commkit-3.10.0}/examples/14-blind-carrier-phase-recovery.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/15-pilot-aided-carrier-recovery.ipynb +4 -10
- {commkit-3.9.0 → commkit-3.10.0}/examples/16-linear-channel-equalization.ipynb +56 -35
- {commkit-3.9.0 → commkit-3.10.0}/examples/17-adaptive-equalization.ipynb +1 -7
- {commkit-3.9.0 → commkit-3.10.0}/examples/18-blind-equalization.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/19-polarization-multiplexing.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/20-chromatic-dispersion.ipynb +38 -32
- {commkit-3.9.0 → commkit-3.10.0}/examples/21-nonlinear-fiber-and-backpropagation.ipynb +13 -18
- {commkit-3.9.0 → commkit-3.10.0}/examples/22-direct-and-self-coherent-detection.ipynb +40 -14
- {commkit-3.9.0 → commkit-3.10.0}/examples/23-fec-in-optical-standards.ipynb +1 -6
- {commkit-3.9.0 → commkit-3.10.0}/examples/24-coherent-transceiver-end-to-end.ipynb +3 -11
- {commkit-3.9.0 → commkit-3.10.0}/examples/25-carrier-phase-characterization.ipynb +19 -20
- {commkit-3.9.0 → commkit-3.10.0}/examples/26-laser-linewidth-self-heterodyne.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/27-laser-linewidth-short-delay-and-flicker.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/28-laser-linewidth-self-homodyne-iq.ipynb +1 -6
- {commkit-3.9.0 → commkit-3.10.0}/examples/29-measurement-template-self-heterodyne.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/30-measurement-template-self-homodyne-iq.ipynb +0 -5
- {commkit-3.9.0 → commkit-3.10.0}/examples/README.md +5 -5
- {commkit-3.9.0 → commkit-3.10.0}/pyproject.toml +2 -2
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_equalizer.py +20 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_eye.py +22 -0
- commkit-3.10.0/tests/plotting/test_plot_filter_response.py +597 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_spectral.py +96 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_theme.py +157 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_examples.py +13 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_filter_response.py +42 -0
- {commkit-3.9.0 → commkit-3.10.0}/uv.lock +1 -1
- commkit-3.9.0/commkit/plotting/filter_response.py +0 -192
- commkit-3.9.0/tests/plotting/test_plot_filter_response.py +0 -207
- {commkit-3.9.0 → commkit-3.10.0}/.gitattributes +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/.github/icon.svg +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/.github/logo.svg +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/.github/workflows/publish.yml +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/.gitignore +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/.python-version +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/LICENSE +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0002_pre_v2.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0003_v2_0.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0004_fiber_dbp.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0005_gpu_decoder_path.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0006_perf_cleanup.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0007_v3_0.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/baselines/Linux-CPython-3.14-64bit/0008_v3_1.json +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_block_blind.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_block_lms.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_bps.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_coding.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_equalizers.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_fiber.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_filters.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_gardner.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_import.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_llr.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_mapping.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_signal_pipeline.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/bench_sync_misc.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/benchutils.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/conftest.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/record_baseline.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/benchmarks/workloads.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_array.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_bits.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_circular.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_constants.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/bps.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/coding.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/compiler.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/filters.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/graphs.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/llr.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/selftest.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/algebraic.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/bps_anchor.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/bps_min_d2.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/cs_block.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/iir.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/interpolate.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/ldpc.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/llr.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_cuda/src/selftest.cu +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_dispersion.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_fft.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_fiber.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_interpolation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_numba_frequency.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_numba_interpolation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_overlap_save.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_peaks.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_random.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/_sequences.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/_common.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/allan.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/drift.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/fm_noise.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/interferometry.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/linewidth/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/linewidth/dsh.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/linewidth/phase.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/linewidth/result.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/analysis/trajectory.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/backend.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/_galois.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/_gf2.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/_ldpc_tables.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/_numba_loops.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/algebraic.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/base.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/convolutional.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/crc.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/exit.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/interleaving.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/ldpc.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/linear.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/performance.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/polar.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/product.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/ratematch.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/shaping.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/coding/turbo.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/core/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/core/_signal_input.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/core/frame.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/core/generation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/core/preamble.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/core/signal.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_block/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_block/_blind.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_block/_dd.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_block/_engine.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_common.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_numba_loops.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_sequential/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_sequential/_blind.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_sequential/_dd.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/_sequential/_setup.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/linear.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/pilots.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/polarization.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/equalization/result.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/fiber/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/fiber/compensation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/fiber/estimation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/linear.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/filtering/pulses.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/frequency.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/impairments/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/impairments/fiber_channel.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/impairments/frontend.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/impairments/noise.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/impairments/source.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/io.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/logger.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/_demap.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/_lattice.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/_numba_llr.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/bits.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/constellation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/gray.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/llr.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/mapping/shaping.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/math.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/metrics/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/metrics/_common.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/metrics/awgn.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/metrics/error_rates.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/metrics/information.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/metrics/quality.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/multirate.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/plotting/waveform.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/py.typed +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/_common.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/_numba_loops.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/bps.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/carrier_phase.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/corrections.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/estimates.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/pilots.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/pll.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/tikhonov.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/recovery/viterbi_viterbi.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/smoothing.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/spectral.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/timing/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/timing/_numba_loops.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/timing/clock_recovery.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/commkit/timing/synchronization.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/scripts/sanitize.sh +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/analysis/test_allan.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/analysis/test_drift.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/analysis/test_fm_noise.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/analysis/test_interferometry.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/analysis/test_linewidth.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/analysis/test_trajectory.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_algebraic.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_coding_base.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_convolutional.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_crc.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_exit.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_gf2.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_interleaving.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_ldpc.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_ldpc_exit.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_ldpc_kernel.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_ldpc_tables.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_linear_codes.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_performance.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_polar.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_product.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_ratematch.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_shaping.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/coding/test_turbo.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/coding.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/conversions.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/kernel_utils.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/memory.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/metrics.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/periodic.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/reference_impl.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/scoring.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/signals.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/theory.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/common/user_block.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/conftest.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_frame.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_generation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_preamble.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_psqam.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_signal.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_signal_input.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/core/test_signal_mimo.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_blind.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_block.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_bps_kernel.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_cold_start.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_cpr.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_cs_kernel.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_equalizer_oracles.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_linear.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_mimo.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_polarization.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_result.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_sequential.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_state.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/equalization/test_winit.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/impairments/test_fiber_channel_linear.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/impairments/test_fiber_channel_nonlinear.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/impairments/test_frontend.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/impairments/test_noise.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/impairments/test_source.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/mapping/test_bits.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/mapping/test_constellation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/mapping/test_gray.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/mapping/test_lattice.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/mapping/test_llr.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/metrics/test_awgn.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/metrics/test_common.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/metrics/test_error_rates.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/metrics/test_information.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/metrics/test_quality.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_analysis.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_coding.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_constellation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_frequency.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_recovery.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_timing.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plotting/test_plot_waveform.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plugins/__init__.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plugins/precision_trace.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/plugins/transfer_trace.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_bps.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_carrier_phase.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_corrections.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_joint.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_pilots.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_pll.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_recovery_oracles.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_tikhonov.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/recovery/test_viterbi_viterbi.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_api_contracts.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_array.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_backend.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_bit_packing.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_cuda_infra.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_dispersion.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_fiber.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_filtering.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_frequency.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_import_hygiene.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_interpolation.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_io.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_logger.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_math.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_multirate.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_peaks.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_pulse_shaping.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_receiver_chain.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_signal_pipeline.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_smoothing.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_spectral.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/test_working_memory.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/timing/test_clock_recovery.py +0 -0
- {commkit-3.9.0 → commkit-3.10.0}/tests/timing/test_synchronization.py +0 -0
|
@@ -40,10 +40,11 @@ jobs:
|
|
|
40
40
|
|
|
41
41
|
notebooks:
|
|
42
42
|
name: Notebooks carry no outputs
|
|
43
|
-
# Outputs (plots are base64 PNGs) would bloat
|
|
44
|
-
# nbstripout git filter strips
|
|
45
|
-
# 'uv run nbstripout --install'
|
|
46
|
-
#
|
|
43
|
+
# Outputs (plots are base64 PNGs) and local kernel metadata would bloat or
|
|
44
|
+
# churn the repository. The nbstripout git filter strips both on commit
|
|
45
|
+
# once a clone runs 'uv run nbstripout --install' and
|
|
46
|
+
# 'git config filter.nbstripout.extrakeys "metadata.kernelspec metadata.language_info.version"';
|
|
47
|
+
# this required check catches a clone without it before anything reaches main.
|
|
47
48
|
runs-on: ubuntu-latest
|
|
48
49
|
steps:
|
|
49
50
|
- uses: actions/checkout@v4
|
|
@@ -52,7 +53,7 @@ jobs:
|
|
|
52
53
|
uses: astral-sh/setup-uv@v5
|
|
53
54
|
|
|
54
55
|
- name: Every committed notebook is stripped
|
|
55
|
-
run: uvx nbstripout@0.9.1 --verify $(git ls-files '*.ipynb')
|
|
56
|
+
run: uvx nbstripout@0.9.1 --verify --extra-keys "metadata.kernelspec metadata.language_info.version" $(git ls-files '*.ipynb')
|
|
56
57
|
|
|
57
58
|
test:
|
|
58
59
|
name: Test (Python ${{ matrix.python-version }} | ${{ matrix.resolution }})
|
|
@@ -31,7 +31,8 @@ Always use `uv`. Python 3.12+.
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
uv sync --all-extras # environment incl. GPU packages
|
|
34
|
-
uv run nbstripout --install # once per clone: strip
|
|
34
|
+
uv run nbstripout --install # once per clone: strip outputs and local metadata on commit
|
|
35
|
+
git config filter.nbstripout.extrakeys "metadata.kernelspec metadata.language_info.version"
|
|
35
36
|
uv run pytest # CPU + GPU tests (default --device=all)
|
|
36
37
|
uv run pytest --device=cpu # what CI runs
|
|
37
38
|
uv run pytest --run-slow # also the long statistical validation (marker slow)
|
|
@@ -83,6 +84,7 @@ Dependencies point downward only:
|
|
|
83
84
|
| Presentation | `plotting` | everything; **nothing imports plotting** (no `debug_plot`: plot functions consume results or recompute through public functions) |
|
|
84
85
|
|
|
85
86
|
- **Responsibilities:** `filtering` holds signal-chain filters with a real frequency response; `smoothing` display and estimation smoothers only; `analysis` laser and phase characterization; `metrics` is the reporting layer.
|
|
87
|
+
- **Plot styling comes from the theme.** Plot functions take colors, fonts and sizes from `matplotlib.rcParams`, so they work under `apply_default_theme(dark=True)`, `dark=False` or any other style: cycle colors `C0`, `C1`, ... for curves and fitted annotations; `_reference_line()` (`plotting/theme.py`: the light red `_accent()`, its shade chosen by the background's luminance, a long dash, three quarters of `lines.linewidth`) for reference lines and guides, set apart from the faint grid; `_foreground()` (the text color) for markers that must contrast with the background and `_background()` for their edges; `image.cmap` for density images and spectrograms (a `cmap=None` default), with empty cells masked; `_line_width(scale)` and `_marker_area(scale)` relative to `lines.linewidth` and `lines.markersize`. Never a named or hex color, a `fontsize` or a fixed width or size outside `theme.py`; `"gray"` is the one neutral literal, for faint structure (rings, shading, legend keys). `tests/plotting/test_plot_theme.py` scans the sources for them.
|
|
86
88
|
- **Plot axes in SI units** are labelled with the base unit in brackets (`Frequency [Hz]`, `Time [s]`) and get `_set_eng_formatter` (`plotting/theme.py`): at each draw it picks one SI prefix from the visible ticks and writes it into the label's unit (`Frequency [GHz]`), with plain numbers on the ticks. Pass data in SI units and never pre-scale it or prefix the label by hand; log axes keep a prefix per tick, as no single one fits decades.
|
|
87
89
|
- **Codes are storable:** `io` stores a code as its class and constructor fields, so those fields are numbers, strings, tuples, host arrays, constellations or other codes.
|
|
88
90
|
- **Splitting modules:** promote a flat module to a package only when it exceeds about 1000 lines *and* has two or more separable concerns. Never create a `utils/` package or one-function files.
|
|
@@ -156,7 +158,7 @@ Dependencies point downward only:
|
|
|
156
158
|
- A size names its unit: `num_symbols`, `num_blocks` (codewords of a FEC code), `info_bits` (a code's information length where it is a parameter), `blocks_per_frame`, `num_variables`, `num_segments`. In `coding`, `length` and `n` mean the codeword length in bits and `k` the information length, nothing else.
|
|
157
159
|
- A seeded part of a factory takes `<part>_rng` (`payload_rng`), with the semantics of `rng`.
|
|
158
160
|
- `method=` strings name only a numerical flavor of one algorithm (`method="maxlog" | "exact"`); algorithms are objects.
|
|
159
|
-
- Output scaling has three names: `normalize` (bool) measures the power and rescales to the library's convention; `correct_power` (bool) applies the exact, known gain of a rate change without measuring; `<thing>_normalization` (a string) chooses how coefficients are scaled (`taps_normalization="unit_energy" | "unity_gain"`).
|
|
161
|
+
- Output scaling has three names: `normalize` (bool) measures the power and rescales to the library's convention; `correct_power` (bool) applies the exact, known gain of a rate change without measuring; `<thing>_normalization` (a string) chooses how coefficients are scaled (`taps_normalization="unit_energy" | "unity_gain"`). A plot never rescales data under these names: `relative` (bool) draws a curve relative to its own peak (unit peak amplitude, 0 dB at the maximum) so curves of any scaling compare, and `annotations` (bool) draws the guides (fits, reference levels and markers): `True` by default where they belong to the result drawn, `False` where they are an optional reading aid (`plot_filter_response`, `plot_psd`). Guides are tagged with a `gid` and drawn once per axis when every overlay shares them (`_guide` in `plotting/theme.py`).
|
|
160
162
|
- A search window is `search_range`, a `(start, stop)` pair in the axis's unit, or `search_band`, a half-width in Hz around a nominal frequency.
|
|
161
163
|
- Values are in SI units without a suffix (`linewidth` in Hz, `drift_rate` in rad/s, `taus` in s). A result holding one quantity in two units suffixes the SI one (`lags` in samples, `lag_s`). A conventional non-SI unit goes into the name: `_db`, `_dbm`, `_deg`, `_nm`, `_km`, `_ps_nm_km`, `_ppm`, `_db_hz`. Normalized quantities say so (`normalized_bandwidth`). No second name for one quantity in another unit (no `center_frequency_ghz`); `center_wavelength_nm` is a different, derived quantity.
|
|
162
164
|
|
|
@@ -263,7 +265,7 @@ Docstrings describe the code as it is; a change in behavior updates them in the
|
|
|
263
265
|
- **End-to-end chains** in `tests/test_receiver_chain.py` run several impairments and their receiver, scored against the source bits or AWGN theory, each with one correction left out as a failing baseline.
|
|
264
266
|
- **Warnings are failures**: a WARNING from the `commkit` logger fails the test unless it is marked `allow_warnings` (it provokes a suspect result on purpose) or asserts the log through `caplog`. A WARNING that reports what the caller asked for is a log-level bug, fixed in the library.
|
|
265
267
|
- **API changes never change expected values.** A signature change only changes how tests call the code; numerical changes land in their own commit with independent validation.
|
|
266
|
-
- **Examples** are Jupyter notebooks in `examples/`, committed without outputs (the `nbstripout` filter, see [Commands](#2-commands)). `tests/test_examples.py` executes each one, so an API change updates the notebooks in the same commit.
|
|
268
|
+
- **Examples** are Jupyter notebooks in `examples/`, committed without outputs or local kernel metadata (the `nbstripout` filter, see [Commands](#2-commands)). `tests/test_examples.py` executes each one, so an API change updates the notebooks in the same commit.
|
|
267
269
|
- They form a course: one topic per notebook, `NN-lowercase-words.ipynb`, in teaching order (signals and DSP, channel and metrics, coding, receiver algorithms, fiber systems, characterization). Each opens with what it covers and links the notebooks it builds on, and ends with a link to the next. A new notebook takes its place in the order and updates `examples/README.md` and its neighbors' links.
|
|
268
270
|
- Every claim in the text matches what the cells print: run the notebook and read its numbers before committing. Keep each under about 20 s on the CPU.
|
|
269
271
|
- Plots of hand-computed arrays go through `to_device(x, "cpu")`, so the notebooks run unchanged on the GPU.
|
|
@@ -4,6 +4,37 @@ Notable changes to CommKit, newest first. Performance figures are from the refer
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [3.10.0] - 2026-11-20
|
|
8
|
+
|
|
9
|
+
Plots for both backgrounds and for comparisons: `apply_default_theme(dark=False)` adds a light theme, and every plot takes its colors, color maps and sizes from the current style, so guides stay visible on white and under a style of your own. `relative=True` draws filter responses, spectra, spectrograms and eyes relative to their peaks, `annotations=True` adds -3 dB, half-symbol-rate, symbol-instant and final-value guides, and `plot_filter_response` draws an FIR filter as `fir_filter` applies it. The group delay of linear-phase filters is exact, so its plot is flat instead of spiking at the stopband zeros. Eight notebooks show the new features.
|
|
10
|
+
|
|
11
|
+
### Changes that may need code updates
|
|
12
|
+
|
|
13
|
+
- The plot functions take every color, color map and size from `matplotlib.rcParams` instead of fixed values, so their guides and markers stay visible on a white background. Plots drawn without `apply_default_theme()` change look: density images (`plot_constellation`, `plot_eye_diagram`) and `plot_spectrogram` use the style's `image.cmap` (Matplotlib's default is viridis) where they used inferno and viridis; reference lines take the text color instead of white; ideal and reference points take the text color, edged in the background color, instead of lime; annotation colors are cycle colors (`C2`, `C3`, ...). Pass `cmap=` to keep a map. Empty cells of the density images are clear, showing the background. `apply_default_theme()` sets the `afmhot` map, so themed density images and spectrograms change from inferno and viridis to it.
|
|
14
|
+
- `plot_filter_response` draws an FIR filter as `fir_filter` applies it, aligned on tap `(L - 1) // 2`, in every panel: the phase and group delay are measured from that tap (zero group delay for a linear-phase filter of odd length, where they showed the causal delay of `(L - 1) / 2` samples), and the step response and an impulse response of explicit length start at `-(L - 1) // 2`. The impulse panel of an even-length filter moves by half a sample, to where `fir_filter` puts it. Pass `causal=True` for the former phase and group delay. IIR filters are unchanged.
|
|
15
|
+
- `plot_filter_response` counts samples and cycles per sample when neither `sps` nor `sampling_rate` is given (`sps` defaulted to 1 and labelled samples as symbol periods); with `sps` alone, frequency is in symbol rates, matching the time axis in symbol periods.
|
|
16
|
+
- `plot_eye_diagram` scales I and Q of a channel by one factor, the larger of their peaks, so an I/Q imbalance shows; each was scaled to its own peak.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `apply_default_theme(dark=False)`: dark text on white, with Matplotlib's `tab10` cycle and the `afmhot_r` color map; `dark=True`, the default, keeps the black theme, now with `afmhot`. The two maps are each other's reverse, and the low end of each matches its background, so the sparse edges of a density plot fade into it. A second call switches between the two variants.
|
|
21
|
+
- `plot_filter_response(relative=True)` removes the taps' scale for comparisons: the impulse response relative to its peak magnitude, and the step response and magnitude relative to the peak gain (0 dB at the maximum of `|H(f)|`, which also works for high-pass and band-pass filters). Phase and group delay do not depend on the gain and are unchanged.
|
|
22
|
+
- `plot_filter_response(annotations=True)` draws guides: a dashed line 3 dB below the magnitude's peak and, with `sps`, one at half the symbol rate; markers at the symbol instants of the impulse response, where a Nyquist pulse has its zero crossings; the final value of the step response. `causal=True` draws the causal convolution.
|
|
23
|
+
- `plot_psd(relative=True)` draws each spectrum relative to its peak, and `annotations=True` a line 3 dB below it. The vertical label reads `Power [dB]` for `scaling="spectrum"`.
|
|
24
|
+
- `plot_spectrogram(relative=True)` draws levels relative to the peak, and `dynamic_range_db=` clips the colors that many dB below it, so deep cells do not stretch the scale over the noise.
|
|
25
|
+
- `plot_eye_diagram(relative=False)` draws the samples' own amplitude, to compare levels between eyes.
|
|
26
|
+
- `plot_channel_correction(annotations=True)`, the default, draws the 0 dB target of ZF on the combined response of the direct paths.
|
|
27
|
+
- Reference lines and guides (the training start of equalizer and carrier-phase plots, ±π wrap boundaries, slope and intercept guides, the LLR consistency diagonal, the new guides above) share one style: a light red (a deeper shade on a light background), at full opacity and three quarters of the line width, with a long dash, also where a guide belongs to one curve (the -3 dB line of an unnormalized response, a step's final value). They were white or gray, as faint as the grid.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- The group-delay panel of `plot_filter_response` drew a linear-phase FIR filter's constant delay as spikes next to its stopband zeros, with every tick reading the same value: the autoscaled axis spanned only the rounding of the computed delay (about 1e-7 relative where `|H|` is near 1e-6). `filter_response` now returns exactly `(L - 1) / 2` samples for conjugate-symmetric or antisymmetric taps wherever the delay is defined, and the plot's frequency panels span at least 0.1 dB, 0.01 rad and 0.01 samples, so any flat response draws flat.
|
|
32
|
+
|
|
33
|
+
### Development
|
|
34
|
+
|
|
35
|
+
- Notebook 00 shows the light theme; notebook 02 the 3 dB guide on an RRC spectrum, spectra at different powers relative to their peaks, and a spectrogram's dynamic range; notebook 03 where the window method's cutoff lies (-6 dB) against the -3 dB point, aligned and causal group delay, and what `cutoff` means in each IIR family; notebook 04 the pulses on symbol-rate axes with the symbol-instant and half-symbol-rate guides; notebook 10 an I/Q imbalance in the eye diagram; notebook 16 the ZF target on the combined response; notebook 20 the aligned group delay of the dispersion compensator; notebook 22 eyes at three received powers on one absolute scale.
|
|
36
|
+
- `tests/plotting/test_plot_theme.py` scans the plot modules for literal colors, font sizes, line widths, marker sizes and color maps.
|
|
37
|
+
|
|
7
38
|
## [3.9.0] - 2026-11-20
|
|
8
39
|
|
|
9
40
|
Your own Signal-aware functions: `commkit.core.SignalInput`, the helper behind every function that takes an array or a Signal, is public, with one typed method per property or default of the Signal. Value objects with array fields accept device arrays, `estimate_timing` on the GPU is twice as fast, and the rest is structure: shared helpers in place of copies, estimators that build their own result classes, and the words properties and defaults for what a Signal provides. Results are unchanged apart from the fixes below.
|
|
@@ -639,7 +670,8 @@ See the [GitHub release](https://github.com/lokgar/commkit/releases/tag/v1.1.0)
|
|
|
639
670
|
|
|
640
671
|
First release. See the [GitHub release](https://github.com/lokgar/commkit/releases/tag/v1.0.0).
|
|
641
672
|
|
|
642
|
-
[Unreleased]: https://github.com/lokgar/commkit/compare/v3.
|
|
673
|
+
[Unreleased]: https://github.com/lokgar/commkit/compare/v3.10.0...HEAD
|
|
674
|
+
[3.10.0]: https://github.com/lokgar/commkit/compare/v3.9.0...v3.10.0
|
|
643
675
|
[3.9.0]: https://github.com/lokgar/commkit/compare/v3.8.0...v3.9.0
|
|
644
676
|
[3.8.0]: https://github.com/lokgar/commkit/compare/v3.7.1...v3.8.0
|
|
645
677
|
[3.7.1]: https://github.com/lokgar/commkit/compare/v3.7.0...v3.7.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: commkit
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.10.0
|
|
4
4
|
Summary: A Python library for high-performance digital communications research.
|
|
5
5
|
Project-URL: Homepage, https://github.com/lokgar/commkit
|
|
6
6
|
Project-URL: Repository, https://github.com/lokgar/commkit
|
|
@@ -98,17 +98,24 @@ long = ck.filtering.fir_taps(sampling_rate=1e6, num_taps=101, cutoff=100e3)
|
|
|
98
98
|
response = ck.filtering.filter_response(long, sampling_rate=1e6)
|
|
99
99
|
print(response.frequencies, response.response, response.group_delay)
|
|
100
100
|
|
|
101
|
-
ck.plotting.apply_default_theme()
|
|
101
|
+
ck.plotting.apply_default_theme() # dark=False for dark text on white
|
|
102
102
|
_, ax = ck.plotting.plot_filter_response(
|
|
103
|
-
short, sampling_rate=1e6, quantity="magnitude", label="21 taps"
|
|
103
|
+
short, sampling_rate=1e6, quantity="magnitude", label="21 taps",
|
|
104
|
+
relative=True, annotations=True,
|
|
104
105
|
)
|
|
105
106
|
ck.plotting.plot_filter_response(
|
|
106
107
|
long, sampling_rate=1e6, quantity="magnitude", ax=ax,
|
|
107
|
-
label="101 taps", legend=True, show=True,
|
|
108
|
+
label="101 taps", legend=True, relative=True, annotations=True, show=True,
|
|
108
109
|
)
|
|
109
110
|
```
|
|
110
111
|
|
|
111
|
-
|
|
112
|
+
`relative=True` draws each magnitude relative to its peak, 0 dB, so taps of
|
|
113
|
+
any scaling compare, and `annotations=True` adds a dashed line at -3 dB. An FIR
|
|
114
|
+
filter is drawn as `fir_filter` applies it, aligned on its centre tap;
|
|
115
|
+
`causal=True` shows the causal convolution's delay. `plot_psd` and
|
|
116
|
+
`plot_spectrogram` take `relative=True` too, the spectrogram also
|
|
117
|
+
`dynamic_range_db=`. See notebook 03 for filter and smoothing comparisons
|
|
118
|
+
and notebook 04 for pulses on symbol-rate axes (`sps=`). The multi-panel
|
|
112
119
|
equalizer, timing, recovery and coding diagnostics take `quantity=` in the
|
|
113
120
|
same way: draw a second result on the returned axis with its own `label=`,
|
|
114
121
|
and `annotations=False` to leave out repeated fits and guides.
|
|
@@ -202,7 +209,8 @@ With [`uv`](https://github.com/astral-sh/uv), use `uv pip install` in place of `
|
|
|
202
209
|
git clone https://github.com/lokgar/commkit.git
|
|
203
210
|
cd commkit
|
|
204
211
|
uv sync --all-extras
|
|
205
|
-
uv run nbstripout --install # once per clone:
|
|
212
|
+
uv run nbstripout --install # once per clone: strip outputs and local kernel metadata on commit
|
|
213
|
+
git config filter.nbstripout.extrakeys "metadata.kernelspec metadata.language_info.version"
|
|
206
214
|
|
|
207
215
|
uv run pytest # CPU and GPU tests
|
|
208
216
|
uv run pytest --device=cpu # what CI runs
|
|
@@ -62,17 +62,24 @@ long = ck.filtering.fir_taps(sampling_rate=1e6, num_taps=101, cutoff=100e3)
|
|
|
62
62
|
response = ck.filtering.filter_response(long, sampling_rate=1e6)
|
|
63
63
|
print(response.frequencies, response.response, response.group_delay)
|
|
64
64
|
|
|
65
|
-
ck.plotting.apply_default_theme()
|
|
65
|
+
ck.plotting.apply_default_theme() # dark=False for dark text on white
|
|
66
66
|
_, ax = ck.plotting.plot_filter_response(
|
|
67
|
-
short, sampling_rate=1e6, quantity="magnitude", label="21 taps"
|
|
67
|
+
short, sampling_rate=1e6, quantity="magnitude", label="21 taps",
|
|
68
|
+
relative=True, annotations=True,
|
|
68
69
|
)
|
|
69
70
|
ck.plotting.plot_filter_response(
|
|
70
71
|
long, sampling_rate=1e6, quantity="magnitude", ax=ax,
|
|
71
|
-
label="101 taps", legend=True, show=True,
|
|
72
|
+
label="101 taps", legend=True, relative=True, annotations=True, show=True,
|
|
72
73
|
)
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
`relative=True` draws each magnitude relative to its peak, 0 dB, so taps of
|
|
77
|
+
any scaling compare, and `annotations=True` adds a dashed line at -3 dB. An FIR
|
|
78
|
+
filter is drawn as `fir_filter` applies it, aligned on its centre tap;
|
|
79
|
+
`causal=True` shows the causal convolution's delay. `plot_psd` and
|
|
80
|
+
`plot_spectrogram` take `relative=True` too, the spectrogram also
|
|
81
|
+
`dynamic_range_db=`. See notebook 03 for filter and smoothing comparisons
|
|
82
|
+
and notebook 04 for pulses on symbol-rate axes (`sps=`). The multi-panel
|
|
76
83
|
equalizer, timing, recovery and coding diagnostics take `quantity=` in the
|
|
77
84
|
same way: draw a second result on the returned axis with its own `label=`,
|
|
78
85
|
and `annotations=False` to leave out repeated fits and guides.
|
|
@@ -166,7 +173,8 @@ With [`uv`](https://github.com/astral-sh/uv), use `uv pip install` in place of `
|
|
|
166
173
|
git clone https://github.com/lokgar/commkit.git
|
|
167
174
|
cd commkit
|
|
168
175
|
uv sync --all-extras
|
|
169
|
-
uv run nbstripout --install # once per clone:
|
|
176
|
+
uv run nbstripout --install # once per clone: strip outputs and local kernel metadata on commit
|
|
177
|
+
git config filter.nbstripout.extrakeys "metadata.kernelspec metadata.language_info.version"
|
|
170
178
|
|
|
171
179
|
uv run pytest # CPU and GPU tests
|
|
172
180
|
uv run pytest --device=cpu # what CI runs
|
|
@@ -96,7 +96,10 @@ def filter_response(
|
|
|
96
96
|
Notes
|
|
97
97
|
-----
|
|
98
98
|
The group delay is the sum of the section delays for SOS filters. It is
|
|
99
|
-
undefined at a zero or pole and is returned as ``nan`` there.
|
|
99
|
+
undefined at a zero or pole and is returned as ``nan`` there. For FIR
|
|
100
|
+
taps that are conjugate symmetric or antisymmetric (linear phase, to
|
|
101
|
+
within a few rounding steps) it is exactly ``(L - 1) / 2`` samples
|
|
102
|
+
wherever it is defined. Values
|
|
100
103
|
indistinguishable from zero in the coefficient precision are also marked
|
|
101
104
|
undefined. Frequency grids and phase wrapping use float64; coefficient
|
|
102
105
|
arithmetic follows the coefficient dtype.
|
|
@@ -179,9 +182,31 @@ def filter_response(
|
|
|
179
182
|
with np.errstate(divide="ignore", invalid="ignore"):
|
|
180
183
|
response *= h / d
|
|
181
184
|
delay += xp.where(valid, xp.real(hn / h - dn / d), xp.nan)
|
|
185
|
+
if (kind == "fir" or (kind == "ba" and a is not None and a.size == 1)) and (
|
|
186
|
+
_linear_phase(b, xp)
|
|
187
|
+
):
|
|
188
|
+
# Exactly (L - 1) / 2 wherever the response is not zero. The ratio
|
|
189
|
+
# above carries rounding that grows as 1 / |H| next to the stopband
|
|
190
|
+
# zeros (about 1e-7 relative at -130 dB), which an autoscaled plot of
|
|
191
|
+
# the constant delay magnifies into spikes.
|
|
192
|
+
delay = xp.where(xp.isnan(delay), delay, xp.full_like(delay, (b.size - 1) / 2))
|
|
182
193
|
return FilterResponse(f, response, delay / scale)
|
|
183
194
|
|
|
184
195
|
|
|
196
|
+
def _linear_phase(taps: ArrayType, xp: Any) -> bool:
|
|
197
|
+
"""Whether ``taps`` are conjugate symmetric or antisymmetric, up to a few
|
|
198
|
+
rounding steps: a linear-phase FIR filter, whose group delay is
|
|
199
|
+
``(L - 1) / 2`` at every frequency where its response is not zero."""
|
|
200
|
+
if taps.size < 2:
|
|
201
|
+
return True
|
|
202
|
+
mirrored = xp.conj(taps[::-1])
|
|
203
|
+
eps = xp.finfo(xp.result_type(taps.dtype, xp.float32)).eps
|
|
204
|
+
tol = 4 * eps * xp.max(xp.abs(taps))
|
|
205
|
+
return bool(
|
|
206
|
+
xp.max(xp.abs(taps - mirrored)) <= tol or xp.max(xp.abs(taps + mirrored)) <= tol
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
|
|
185
210
|
_IIR_DECAY = 1e-5
|
|
186
211
|
_IIR_FALLBACK_SAMPLES = 500
|
|
187
212
|
_IIR_MAX_SAMPLES = 100_000
|
|
@@ -6,8 +6,10 @@ that draws a Signal, an array or a result object (an estimate, an
|
|
|
6
6
|
that needs a calculation calls the corresponding public compute function;
|
|
7
7
|
device arrays are reduced on the device and only what is drawn is transferred.
|
|
8
8
|
Tick labels use SI prefixes.
|
|
9
|
-
:func:`apply_default_theme` sets the library's Matplotlib style
|
|
10
|
-
package changes no Matplotlib settings.
|
|
9
|
+
:func:`apply_default_theme` sets the library's Matplotlib style, dark or
|
|
10
|
+
light; importing the package changes no Matplotlib settings. The plot
|
|
11
|
+
functions take colors, fonts and sizes from ``matplotlib.rcParams``, so they
|
|
12
|
+
follow that theme or any other style.
|
|
11
13
|
|
|
12
14
|
- :mod:`~commkit.plotting.waveform`, :mod:`~commkit.plotting.eye`,
|
|
13
15
|
:mod:`~commkit.plotting.constellation`, :mod:`~commkit.plotting.spectral`:
|
|
@@ -27,6 +27,7 @@ from .theme import (
|
|
|
27
27
|
_finish,
|
|
28
28
|
_get_axis,
|
|
29
29
|
_panel_grid,
|
|
30
|
+
_reference_line,
|
|
30
31
|
_require,
|
|
31
32
|
_series_label,
|
|
32
33
|
_set_eng_formatter,
|
|
@@ -125,9 +126,8 @@ def plot_carrier_phase_decomposition(
|
|
|
125
126
|
if num_train_symbols > 0:
|
|
126
127
|
axi.axvline(
|
|
127
128
|
num_train_symbols / float(symbol_rate),
|
|
128
|
-
color="white",
|
|
129
|
-
ls="--",
|
|
130
129
|
label=f"DD start ({num_train_symbols})",
|
|
130
|
+
**_reference_line(),
|
|
131
131
|
)
|
|
132
132
|
|
|
133
133
|
_set_eng_formatter(axi, "x")
|
|
@@ -206,8 +206,8 @@ def plot_frequency_drift(
|
|
|
206
206
|
)
|
|
207
207
|
|
|
208
208
|
if reference_amplitude is not None:
|
|
209
|
-
axi.axhline(reference_amplitude,
|
|
210
|
-
axi.axhline(-reference_amplitude,
|
|
209
|
+
axi.axhline(reference_amplitude, label="±amplitude", **_reference_line())
|
|
210
|
+
axi.axhline(-reference_amplitude, **_reference_line())
|
|
211
211
|
|
|
212
212
|
_set_eng_formatter(axi, "x")
|
|
213
213
|
_set_eng_formatter(axi, "y")
|
|
@@ -356,7 +356,7 @@ def plot_frequency_noise_psd(
|
|
|
356
356
|
axi.loglog(
|
|
357
357
|
f_c[shown],
|
|
358
358
|
b_c[shown],
|
|
359
|
-
color="
|
|
359
|
+
color="C5",
|
|
360
360
|
ls="--",
|
|
361
361
|
label=r"$\beta$-separation line",
|
|
362
362
|
)
|
|
@@ -370,7 +370,7 @@ def plot_frequency_noise_psd(
|
|
|
370
370
|
b_c[pos],
|
|
371
371
|
S_c[0, pos],
|
|
372
372
|
where=a_c[pos].tolist(),
|
|
373
|
-
color="
|
|
373
|
+
color="C5",
|
|
374
374
|
alpha=0.4,
|
|
375
375
|
lw=0,
|
|
376
376
|
label=r"$\beta$-area (integrated region)",
|
|
@@ -385,7 +385,7 @@ def plot_frequency_noise_psd(
|
|
|
385
385
|
fm, mm = _log_cell_median(fp, m_i, np.isfinite(m_i))
|
|
386
386
|
else:
|
|
387
387
|
fm, mm = fp, m_i
|
|
388
|
-
axi.loglog(fm, mm, color="
|
|
388
|
+
axi.loglog(fm, mm, color="C3", label="Fitted model", zorder=3)
|
|
389
389
|
|
|
390
390
|
used_label = "Fit bins"
|
|
391
391
|
if used is not None:
|
|
@@ -398,7 +398,7 @@ def plot_frequency_noise_psd(
|
|
|
398
398
|
fp[sel],
|
|
399
399
|
S_c[0, pos][sel],
|
|
400
400
|
".",
|
|
401
|
-
color="
|
|
401
|
+
color="C2",
|
|
402
402
|
ls="none",
|
|
403
403
|
label=used_label,
|
|
404
404
|
)
|
|
@@ -406,14 +406,14 @@ def plot_frequency_noise_psd(
|
|
|
406
406
|
# Dense mask: highlight the log-binned median over the accepted
|
|
407
407
|
# region instead of splattering one marker per bin.
|
|
408
408
|
fg, sg = _log_cell_median(fp, S_c[0, pos], sel)
|
|
409
|
-
axi.loglog(fg, sg, color="
|
|
409
|
+
axi.loglog(fg, sg, color="C2", label="Fit region")
|
|
410
410
|
|
|
411
411
|
if floor is not None:
|
|
412
412
|
floors = np.atleast_1d(np.asarray(floor, dtype=np.float64))
|
|
413
413
|
floor_mean = float(np.mean(floors))
|
|
414
414
|
axi.axhline(
|
|
415
415
|
floor_mean / np.pi,
|
|
416
|
-
color="
|
|
416
|
+
color="C4",
|
|
417
417
|
ls=":",
|
|
418
418
|
label=r"White-FM floor $\Delta\nu/\pi$",
|
|
419
419
|
)
|
|
@@ -430,7 +430,7 @@ def plot_frequency_noise_psd(
|
|
|
430
430
|
axi.axvspan(
|
|
431
431
|
float(fp[dom].min()),
|
|
432
432
|
float(fp[dom].max()),
|
|
433
|
-
color="
|
|
433
|
+
color="C4",
|
|
434
434
|
alpha=0.18,
|
|
435
435
|
lw=0,
|
|
436
436
|
label="Plateau (model within 10 % of floor)",
|
|
@@ -444,12 +444,12 @@ def plot_frequency_noise_psd(
|
|
|
444
444
|
axi.axvspan(
|
|
445
445
|
lo,
|
|
446
446
|
band[1],
|
|
447
|
-
color="
|
|
447
|
+
color="C2",
|
|
448
448
|
alpha=0.4,
|
|
449
449
|
label="Analysis band [f_min, f_max]",
|
|
450
450
|
)
|
|
451
451
|
for edge in (lo, float(band[1])):
|
|
452
|
-
axi.axvline(edge, color="
|
|
452
|
+
axi.axvline(edge, color="C2")
|
|
453
453
|
|
|
454
454
|
_set_eng_formatter(axi, "x")
|
|
455
455
|
axi.set_xlabel("Frequency [Hz]")
|
|
@@ -534,9 +534,8 @@ def plot_allan_deviation(
|
|
|
534
534
|
axi.loglog(
|
|
535
535
|
tau,
|
|
536
536
|
guide,
|
|
537
|
-
color="gray",
|
|
538
|
-
ls=":",
|
|
539
537
|
label=r"$\tau^{-1/2}$ (white-FM)",
|
|
538
|
+
**_reference_line(),
|
|
540
539
|
)
|
|
541
540
|
|
|
542
541
|
_set_eng_formatter(axi, "x")
|
|
@@ -633,9 +632,8 @@ def plot_increment_variance(
|
|
|
633
632
|
)
|
|
634
633
|
axi.axhline(
|
|
635
634
|
float(np.mean(ic)),
|
|
636
|
-
color="gray",
|
|
637
|
-
ls=":",
|
|
638
635
|
label=r"Intercept (noise $2\sigma_\phi^2$)",
|
|
636
|
+
**_reference_line(),
|
|
639
637
|
)
|
|
640
638
|
|
|
641
639
|
_set_eng_formatter(axi, "x")
|
|
@@ -25,8 +25,10 @@ from ..core.signal import Reference
|
|
|
25
25
|
from ..logger import logger
|
|
26
26
|
from .theme import (
|
|
27
27
|
_finish,
|
|
28
|
+
_foreground,
|
|
28
29
|
_get_axis,
|
|
29
30
|
_panel_grid,
|
|
31
|
+
_reference_line,
|
|
30
32
|
_select,
|
|
31
33
|
_series_label,
|
|
32
34
|
_square_figsize,
|
|
@@ -223,7 +225,6 @@ def plot_error_rate(
|
|
|
223
225
|
yerr=[c.fer[seen] - low[seen], high[seen] - c.fer[seen]],
|
|
224
226
|
fmt="none",
|
|
225
227
|
ecolor=color,
|
|
226
|
-
capsize=3,
|
|
227
228
|
)
|
|
228
229
|
a.semilogy(x[~seen], high[~seen], "v", color=color)
|
|
229
230
|
for panel in panels:
|
|
@@ -420,7 +421,7 @@ def plot_llr_distribution(
|
|
|
420
421
|
if span[0] > span[1]:
|
|
421
422
|
span = [-lim, lim]
|
|
422
423
|
if annotations:
|
|
423
|
-
ax_cons.plot(span, span,
|
|
424
|
+
ax_cons.plot(span, span, label="consistent", **_reference_line())
|
|
424
425
|
ax_cons.set_xlabel("LLR L")
|
|
425
426
|
ax_cons.set_ylabel("log p(L | b = 0) / p(L | b = 1)")
|
|
426
427
|
ax_cons.set_title("Consistency")
|
|
@@ -631,13 +632,13 @@ def plot_exit_chart(
|
|
|
631
632
|
axi.plot(
|
|
632
633
|
chart.trajectory[:, 0],
|
|
633
634
|
chart.trajectory[:, 1],
|
|
634
|
-
color=
|
|
635
|
+
color=_foreground(),
|
|
635
636
|
alpha=0.8,
|
|
636
637
|
label="trajectory",
|
|
637
638
|
)
|
|
638
639
|
if not chart.converges:
|
|
639
640
|
x, y = chart.trajectory[-1]
|
|
640
|
-
axi.plot([x], [y], "o", color="
|
|
641
|
+
axi.plot([x], [y], "o", color="C3", label="stalls")
|
|
641
642
|
axi.set_xlim(0, 1)
|
|
642
643
|
axi.set_ylim(0, 1)
|
|
643
644
|
axi.set_aspect("equal")
|
|
@@ -18,8 +18,13 @@ from ..mapping import Constellation
|
|
|
18
18
|
from ..math import rms
|
|
19
19
|
from ..smoothing import smooth_density_2d
|
|
20
20
|
from .theme import (
|
|
21
|
+
_background,
|
|
22
|
+
_density_image,
|
|
21
23
|
_draw_channels,
|
|
22
24
|
_finish,
|
|
25
|
+
_foreground,
|
|
26
|
+
_line_width,
|
|
27
|
+
_marker_area,
|
|
23
28
|
_square_figsize,
|
|
24
29
|
)
|
|
25
30
|
|
|
@@ -90,16 +95,15 @@ def plot_ideal_constellation(
|
|
|
90
95
|
sc = ax.scatter(
|
|
91
96
|
real,
|
|
92
97
|
imag,
|
|
93
|
-
s=
|
|
98
|
+
s=_marker_area(10 / 6),
|
|
94
99
|
c=np.asarray(pmf, dtype=np.float64),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
linewidths=0.5,
|
|
100
|
+
edgecolors=_foreground(),
|
|
101
|
+
linewidths=_line_width(0.25),
|
|
98
102
|
zorder=10,
|
|
99
103
|
)
|
|
100
104
|
plt.colorbar(sc, ax=ax, label="P(sₘ)")
|
|
101
105
|
else:
|
|
102
|
-
ax.scatter(real, imag, s=
|
|
106
|
+
ax.scatter(real, imag, s=_marker_area(10 / 6), zorder=10)
|
|
103
107
|
for point, bits in zip(const, constellation.bit_labels, strict=True):
|
|
104
108
|
label = "".join(str(int(b)) for b in bits)
|
|
105
109
|
ax.annotate(
|
|
@@ -117,8 +121,8 @@ def plot_ideal_constellation(
|
|
|
117
121
|
|
|
118
122
|
# Center lines
|
|
119
123
|
ax.grid(False)
|
|
120
|
-
ax.axhline(0, color=
|
|
121
|
-
ax.axvline(0, color=
|
|
124
|
+
ax.axhline(0, color=_foreground(), alpha=0.4, zorder=0)
|
|
125
|
+
ax.axvline(0, color=_foreground(), alpha=0.4, zorder=0)
|
|
122
126
|
|
|
123
127
|
# Limits and Aspect
|
|
124
128
|
max_range = np.max(np.abs(const))
|
|
@@ -149,7 +153,7 @@ def plot_constellation(
|
|
|
149
153
|
samples: ArrayType | Signal,
|
|
150
154
|
*,
|
|
151
155
|
bins: int = 100,
|
|
152
|
-
cmap: str =
|
|
156
|
+
cmap: str | None = None,
|
|
153
157
|
ax: Any | None = None,
|
|
154
158
|
overlay_ideal: bool = False,
|
|
155
159
|
overlay_reference: bool = False,
|
|
@@ -175,8 +179,9 @@ def plot_constellation(
|
|
|
175
179
|
channel).
|
|
176
180
|
bins : int, default 100
|
|
177
181
|
Histogram bins per axis.
|
|
178
|
-
cmap : str,
|
|
179
|
-
Colormap of the density.
|
|
182
|
+
cmap : str, optional
|
|
183
|
+
Colormap of the density; ``None`` uses the theme's ``image.cmap``.
|
|
184
|
+
Empty cells are left clear, showing the background.
|
|
180
185
|
ax : matplotlib.axes.Axes, optional
|
|
181
186
|
Axes to draw on; ``None`` creates a figure.
|
|
182
187
|
overlay_ideal : bool, default False
|
|
@@ -251,7 +256,7 @@ def plot_constellation(
|
|
|
251
256
|
imshow_kwargs["vmax"] = vmax
|
|
252
257
|
imshow_kwargs.update(kwargs)
|
|
253
258
|
|
|
254
|
-
ax.imshow(h, **imshow_kwargs)
|
|
259
|
+
ax.imshow(_density_image(h), **imshow_kwargs)
|
|
255
260
|
|
|
256
261
|
# Overlay the constellation, scaled from its unit average power (under
|
|
257
262
|
# its pmf) to the row' RMS.
|
|
@@ -263,18 +268,18 @@ def plot_constellation(
|
|
|
263
268
|
ax.scatter(
|
|
264
269
|
const.real,
|
|
265
270
|
const.imag,
|
|
266
|
-
c=
|
|
267
|
-
edgecolors=
|
|
268
|
-
linewidths=
|
|
269
|
-
s=
|
|
271
|
+
c=_foreground(),
|
|
272
|
+
edgecolors=_background(),
|
|
273
|
+
linewidths=_line_width(0.75),
|
|
274
|
+
s=_marker_area(0.9),
|
|
270
275
|
zorder=10,
|
|
271
276
|
marker="o",
|
|
272
277
|
)
|
|
273
278
|
|
|
274
279
|
# Add center lines
|
|
275
280
|
ax.grid(False)
|
|
276
|
-
ax.axhline(0, color=
|
|
277
|
-
ax.axvline(0, color=
|
|
281
|
+
ax.axhline(0, color=_foreground(), alpha=0.4, zorder=0)
|
|
282
|
+
ax.axvline(0, color=_foreground(), alpha=0.4, zorder=0)
|
|
278
283
|
|
|
279
284
|
ax.set_xlabel("In-Phase (I)")
|
|
280
285
|
ax.set_ylabel("Quadrature (Q)")
|
|
@@ -307,10 +312,10 @@ def plot_constellation(
|
|
|
307
312
|
axis.scatter(
|
|
308
313
|
symbols.real,
|
|
309
314
|
symbols.imag,
|
|
310
|
-
c=
|
|
311
|
-
edgecolors=
|
|
312
|
-
linewidths=
|
|
313
|
-
s=
|
|
315
|
+
c=_foreground(),
|
|
316
|
+
edgecolors=_background(),
|
|
317
|
+
linewidths=_line_width(0.75),
|
|
318
|
+
s=_marker_area(0.9),
|
|
314
319
|
zorder=10,
|
|
315
320
|
marker="o",
|
|
316
321
|
)
|
|
@@ -17,7 +17,9 @@ from ..smoothing import moving_average
|
|
|
17
17
|
from .theme import (
|
|
18
18
|
_decimate_minmax,
|
|
19
19
|
_finish,
|
|
20
|
+
_guide,
|
|
20
21
|
_panel_grid,
|
|
22
|
+
_reference_line,
|
|
21
23
|
_select,
|
|
22
24
|
_series_label,
|
|
23
25
|
_set_eng_formatter,
|
|
@@ -133,9 +135,8 @@ def plot_equalizer_result(
|
|
|
133
135
|
if annotations and n_train > 0:
|
|
134
136
|
ax_conv.axvline(
|
|
135
137
|
n_train,
|
|
136
|
-
color="white",
|
|
137
|
-
linestyle="--",
|
|
138
138
|
label=f"DD start ({n_train})",
|
|
139
|
+
**_reference_line(),
|
|
139
140
|
)
|
|
140
141
|
ax_conv.legend()
|
|
141
142
|
|
|
@@ -214,6 +215,7 @@ def plot_channel_correction(
|
|
|
214
215
|
nfft: int = 1024,
|
|
215
216
|
sampling_rate: float = 1.0,
|
|
216
217
|
quantity: str | None = None,
|
|
218
|
+
annotations: bool = True,
|
|
217
219
|
label: str | None = None,
|
|
218
220
|
legend: bool | None = None,
|
|
219
221
|
ax=None,
|
|
@@ -249,6 +251,10 @@ def plot_channel_correction(
|
|
|
249
251
|
Sampling rate in Hz, for the frequency axis.
|
|
250
252
|
quantity : {"channel", "equalizer", "combined"}, optional
|
|
251
253
|
Plot only that response. ``None`` draws all three panels per path.
|
|
254
|
+
annotations : bool, default True
|
|
255
|
+
Draw the 0 dB target of ZF on the combined response (on the
|
|
256
|
+
diagonal paths for MIMO), against which the MMSE mask shows its
|
|
257
|
+
attenuation. ``False`` leaves only the responses.
|
|
252
258
|
label : str, optional
|
|
253
259
|
Label for a selected response, for comparisons on one axis.
|
|
254
260
|
legend : bool, optional
|
|
@@ -332,6 +338,8 @@ def plot_channel_correction(
|
|
|
332
338
|
20 * np.log10(np.abs(responses[name]) + 1e-12),
|
|
333
339
|
label=label,
|
|
334
340
|
)
|
|
341
|
+
if annotations and name == "combined" and i == j:
|
|
342
|
+
_guide(axi, 0.0, gid="commkit-zf-target")
|
|
335
343
|
if quantity is None:
|
|
336
344
|
axi.set_title(f"{row_label} {names[name]}".strip())
|
|
337
345
|
else:
|