Skip to content

Commit 8864e65

Browse files
committed
Refactor documentation and examples: Update contributing guidelines, enhance tooltip descriptions, and improve comment formatting in various example scripts.
1 parent e913c73 commit 8864e65

File tree

9 files changed

+16
-51
lines changed

9 files changed

+16
-51
lines changed

docs/contributing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Development Workflow
8686

8787
# Exclude slow tests
8888
pytest tests/ -m "not slow"
89+
8990
- Run pre-commit checks: `pre-commit run -a`
9091

9192
4. **Submitting a pull request:**

docs/examples/constraints/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Constraint handling and optimization techniques for communication systems design
2727

2828
.. raw:: html
2929

30-
<div class="sphx-glr-thumbcontainer" tooltip="ax.text(0.5, 0.5, 'Spectral Mask Constraint Effects (Visualization placeholder)', ha='center', va='center', transform=ax.transAxes, fontsize=14) ax.set_title('Spectral Mask Constraint Effects', fontsize=16, fontweight='bold') plt.show()=============================================================================================================================================================== This example demonstrates how to combine multiple constraints in Kaira to satisfy complex signal requirements. We'll explore the composition utilities and see how constraints can be sequentially applied to meet practical transmission specifications.">
30+
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to combine multiple constraints in Kaira to satisfy complex signal requirements. We'll explore the composition utilities and see how constraints can be sequentially applied to meet practical transmission specifications.">
3131

3232
.. only:: html
3333

docs/examples/example_utils/index.rst

Lines changed: 0 additions & 36 deletions
This file was deleted.

examples/channels/plot_fading_channels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# Generate QPSK Signal
4343
# ------------------------------------
4444
# QPSK Signal Generation
45-
# =====================
45+
# ==============================
4646
#
4747
# Let's use Kaira's QPSKModulator to generate QPSK symbols.
4848

examples/constraints/plot_constraint_composition.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
"""
22
==========================================================================================================================================================================
33
Composing Constraints for Complex Signal Requirements
4-
==========fig, ax = plt.subplots(figsize=(12, 6), constrained_layout=True)
5-
ax.text(0.5, 0.5, 'Spectral Mask Constraint Effects\n(Visualization placeholder)',
6-
ha='center', va='center', transform=ax.transAxes, fontsize=14)
7-
ax.set_title('Spectral Mask Constraint Effects', fontsize=16, fontweight='bold')
8-
plt.show()===============================================================================================================================================================
4+
==========================================================================================================================================================================
95
106
This example demonstrates how to combine multiple constraints in Kaira to satisfy complex
117
signal requirements. We'll explore the composition utilities and see how constraints

examples/data/plot_data_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def majority_decoder(x, repeat=3):
306306
# Conclusion
307307
# ------------------
308308
# Data Generation Summary
309-
# ======================
309+
# ====================================
310310
#
311311
# This example demonstrated the data generation utilities in Kaira:
312312
#

examples/models_fec/plot_fec_blockwise_processing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Setting up
2424
# ----------------------
2525
# Block-wise Processing Configuration
26-
# ==================================
26+
# ========================================================
2727

2828
# First, we set a random seed to ensure reproducibility of results.
2929
torch.manual_seed(42)
@@ -371,10 +371,12 @@ def hamming_decode(codeword):
371371
# error correction (FEC) coding:
372372
#
373373
# Key points:
374+
#
374375
# - Block-wise processing is fundamental to many error correction schemes
375376
# - The `apply_blockwise` function provides a convenient way to apply operations
376377
# on blocks of data
377378
# - We demonstrated several practical applications of block-wise processing:
379+
#
378380
# - Simple parity-based error detection
379381
# - Complex operations that return multiple values
380382
# - Implementation of a (7,4) Hamming code for error correction
@@ -383,6 +385,7 @@ def hamming_decode(codeword):
383385
# like BCH, Reed-Solomon, and LDPC codes, which can correct multiple errors per block.
384386
#
385387
# References:
388+
#
386389
# - :cite:`lin2004error` - Provides detailed treatments of block coding and parity checks
387390
# - :cite:`moon2005error` - Covers mathematical methods for various error correction codes
388391
# - :cite:`golay1949notes` - Historical paper on efficient coding techniques

examples/models_fec/plot_fec_ldpc_advanced_visualization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# Belief Propagation Animation
6363
# --------------------------------------
6464
# Belief Propagation Message Passing Visualization
65-
# ===============================================
65+
# ==============================================================
6666

6767

6868
class BeliefPropagationVisualizer:
@@ -183,9 +183,9 @@ def visualize_iteration(self, iteration):
183183

184184
# %%
185185
# Performance Comparison with Different Parameters
186-
# ------------------------------------------------
186+
# ---------------------------------------------------------
187187
# LDPC Iteration Benefits Analysis
188-
# ===============================
188+
# ============================================
189189

190190

191191
def compare_ldpc_performance():

examples/models_fec/plot_fec_ldpc_simulation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Setting up
2828
# --------------------------------------
2929
# LDPC Code Configuration and Reproducibility Setup
30-
# =============================================
30+
# ============================================================
3131
#
3232
# First, we set a random seed to ensure reproducibility and
3333
# configure our visualization settings.
@@ -163,7 +163,7 @@
163163
# Performance Analysis
164164
# -----------------------------------
165165
# Error Rate Performance Visualization
166-
# ===================================
166+
# ===============================================
167167
#
168168
# Let's visualize the performance of our LDPC code with different numbers
169169
# of belief propagation iterations across various SNR levels.
@@ -190,7 +190,7 @@
190190
# Single Message Example
191191
# ------------------------------------
192192
# Individual Message Processing Demonstration
193-
# =========================================
193+
# ===================================================
194194
#
195195
# Let's walk through the encoding, transmission, and decoding process
196196
# for a single message to better understand the flow.
@@ -273,6 +273,7 @@
273273
# improves with increased SNR and more decoding iterations.
274274
#
275275
# Key Insights:
276+
#
276277
# - LDPC codes are widely used in modern communication systems due to
277278
# their excellent error-correcting capabilities that approach the
278279
# Shannon limit

0 commit comments

Comments
 (0)