refactor: remove emojis from titles and buttons for a cleaner UI
All checks were successful
Build & Deploy Shannon / 🏗️ Build & Deploy Shannon (push) Successful in 1m3s

This commit is contained in:
Poidevin, Antoine (ITOP CM) - AF
2026-02-20 10:50:04 +01:00
parent 6a4ccc3376
commit ac6c0e1bdf
9 changed files with 112 additions and 113 deletions

View File

@@ -159,21 +159,21 @@ def render():
with col_img:
st.image("Satellite.png", width=200)
with col_title:
st.markdown("# 🛰️ Shannon & Friends in the Real World")
st.markdown("# Shannon & Friends in the Real World")
st.markdown("From theory to satellite communication link budget.")
wiki_cols = st.columns(4)
wiki_cols[0].link_button("📖 Harry Nyquist", "https://en.wikipedia.org/wiki/Harry_Nyquist")
wiki_cols[1].link_button("📖 Richard Hamming", "https://en.wikipedia.org/wiki/Richard_Hamming")
wiki_cols[2].link_button("📖 Andrew Viterbi", "https://en.wikipedia.org/wiki/Andrew_Viterbi")
wiki_cols[3].link_button("📖 Claude Berrou", "https://en.wikipedia.org/wiki/Claude_Berrou")
wiki_cols[0].link_button("Harry Nyquist", "https://en.wikipedia.org/wiki/Harry_Nyquist")
wiki_cols[1].link_button("Richard Hamming", "https://en.wikipedia.org/wiki/Richard_Hamming")
wiki_cols[2].link_button("Andrew Viterbi", "https://en.wikipedia.org/wiki/Andrew_Viterbi")
wiki_cols[3].link_button("Claude Berrou", "https://en.wikipedia.org/wiki/Claude_Berrou")
st.divider()
# ══════════════════════════════════════════════════════════════════════════
# SECTION 1: Satellite Link
# ══════════════════════════════════════════════════════════════════════════
st.markdown("## 📡 Satellite Link")
st.markdown("## Satellite Link")
col1, col2, col3 = st.columns(3)
with col1:
@@ -213,7 +213,7 @@ def render():
try:
sat_cir_list = [float(v.strip()) for v in sat_cir_input.split(",")]
except ValueError:
st.error("Invalid C/I values.")
st.error("Invalid C/I values.")
return
# Compute satellite link
@@ -224,11 +224,11 @@ def render():
sat_alt, sat_lat, sat_lon, gs_lat, gs_lon, availability,
)
except Exception as e:
st.error(f"Satellite link computation error: {e}")
st.error(f"Satellite link computation error: {e}")
return
# Display satellite link results
st.markdown("#### 📊 Satellite Link Results")
st.markdown("#### Satellite Link Results")
r1, r2, r3 = st.columns(3)
r1.metric("Output Power", fmt_power(sat["sig_power"]), help=REAL_WORLD_HELP["output_power"])
r2.metric("Antenna Gain", fmt_gain(sat["sat_gain_linear"]), help=REAL_WORLD_HELP["sat_gain"])
@@ -245,14 +245,14 @@ def render():
st.metric("Power Flux Density", fmt_pfd(sat["pfd_linear"]), help=REAL_WORLD_HELP["pfd"])
if sat["elevation"] <= 0:
st.warning("⚠️ Satellite is below the horizon (negative elevation). Results may not be meaningful.")
st.warning("Satellite is below the horizon (negative elevation). Results may not be meaningful.")
st.divider()
# ══════════════════════════════════════════════════════════════════════════
# SECTION 2: Radio Front End
# ══════════════════════════════════════════════════════════════════════════
st.markdown("## 📻 Radio Front End")
st.markdown("## Radio Front End")
col_r1, col_r2 = st.columns(2)
with col_r1:
@@ -268,10 +268,10 @@ def render():
cpe_ant_d, cpe_t_clear,
)
except Exception as e:
st.error(f"Receiver computation error: {e}")
st.error(f"Receiver computation error: {e}")
return
st.markdown("#### 📊 Receiver Results")
st.markdown("#### Receiver Results")
rx1, rx2 = st.columns(2)
rx1.metric("Antenna Area · G/T", f"{rcv['cpe_ae']:.2f} m² · {rcv['cpe_g_t']:.1f} dB/K",
help=REAL_WORLD_HELP["cpe_gain"])
@@ -290,7 +290,7 @@ def render():
# ══════════════════════════════════════════════════════════════════════════
# SECTION 3: Baseband Unit
# ══════════════════════════════════════════════════════════════════════════
st.markdown("## 💻 Baseband Unit")
st.markdown("## Baseband Unit")
col_b1, col_b2, col_b3 = st.columns(3)
with col_b1:
@@ -310,7 +310,7 @@ def render():
try:
cnr_imp_list = [float(v.strip()) for v in cir_input.split(",")]
except ValueError:
st.error("Invalid C/I values.")
st.error("Invalid C/I values.")
return
try:
@@ -319,10 +319,10 @@ def render():
sat["sat_cir"], bandwidth, rolloff, overheads, cnr_imp_list, penalties,
)
except Exception as e:
st.error(f"Baseband computation error: {e}")
st.error(f"Baseband computation error: {e}")
return
st.markdown("#### 📊 Baseband Results")
st.markdown("#### Baseband Results")
b1, b2, b3 = st.columns(3)
b1.metric("SNR in Available BW", f"{bb['cnr_bw']:.1f} dB in {bandwidth:.1f} MHz",
@@ -336,7 +336,7 @@ def render():
b4, b5 = st.columns(2)
with b4:
st.markdown("##### 🎯 Theoretical")
st.markdown("##### Theoretical")
st.metric(
"Theoretical BR",
f"{fmt_br(bb['br_nyq'])} · {bb['br_nyq_norm']:.0%}",
@@ -344,7 +344,7 @@ def render():
)
st.caption(f"Spectral Eff: {bb['spe_nyq']:.2f} bps/Hz · {bb['bits_per_symbol']:.2f} b/Symbol")
with b5:
st.markdown("##### 🏭 Practical")
st.markdown("##### Practical")
st.metric(
"Physical Layer BR",
f"{fmt_br(bb['br_rcv'])} · {bb['br_rcv_norm']:.0%}",
@@ -360,12 +360,12 @@ def render():
st.divider()
# ── Graphs ──
st.markdown("### 📈 Interactive Graphs")
st.markdown("### Interactive Graphs")
tab_bw, tab_pow, tab_map = st.tabs([
"📶 BW Sensitivity",
"Power Sensitivity",
"🗺️ BR Factor Map",
"BW Sensitivity",
"Power Sensitivity",
"BR Factor Map",
])
cnr_imp = combine_cnr(*cnr_imp_list)