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
All checks were successful
Build & Deploy Shannon / 🏗️ Build & Deploy Shannon (push) Successful in 1m3s
This commit is contained in:
@@ -146,17 +146,17 @@ def render():
|
||||
with col_img:
|
||||
st.image("Shannon.png", width=200)
|
||||
with col_title:
|
||||
st.markdown("# 📡 Shannon's Equation for Dummies")
|
||||
st.markdown("# Shannon's Equation for Dummies")
|
||||
st.markdown(
|
||||
"Exploration of Claude Shannon's channel capacity theorem — "
|
||||
"the fundamental limit of digital communications."
|
||||
)
|
||||
st.link_button("📖 Wiki: Claude Shannon", "https://en.wikipedia.org/wiki/Claude_Shannon")
|
||||
st.link_button("Wiki: Claude Shannon", "https://en.wikipedia.org/wiki/Claude_Shannon")
|
||||
|
||||
st.divider()
|
||||
|
||||
# ── Input Parameters ──
|
||||
st.markdown("### ⚙️ Input Parameters")
|
||||
st.markdown("### Input Parameters")
|
||||
|
||||
col_in1, col_in2 = st.columns(2)
|
||||
with col_in1:
|
||||
@@ -177,15 +177,15 @@ def render():
|
||||
cnr_values = [float(v.strip()) for v in cnr_input.split(",")]
|
||||
cnr_nyq = combine_cnr(*cnr_values)
|
||||
except (ValueError, ZeroDivisionError):
|
||||
st.error("❌ Invalid C/N values. Use comma-separated numbers (e.g., '12' or '12, 15').")
|
||||
st.error("Invalid C/N values. Use comma-separated numbers (e.g., '12' or '12, 15').")
|
||||
return
|
||||
|
||||
# ── Computed Results ──
|
||||
cnr_linear, br_inf, c_n0, br_bw = shannon_points(bw_input, cnr_nyq)
|
||||
br_unit = c_n0 # Spectral efficiency = 1
|
||||
|
||||
st.markdown("### 📊 Results")
|
||||
st.info(THEORY_HELP["c_n0"], icon="ℹ️") if st.checkbox("Show C/N₀ explanation", value=False) else None
|
||||
st.markdown("### Results")
|
||||
st.info(THEORY_HELP["c_n0"], icon=":material/info:") if st.checkbox("Show C/N₀ explanation", value=False) else None
|
||||
|
||||
m1, m2, m3, m4 = st.columns(4)
|
||||
m1.metric("C/N₀", f"{c_n0:.1f} MHz", help=THEORY_HELP["c_n0"])
|
||||
@@ -202,7 +202,7 @@ def render():
|
||||
st.divider()
|
||||
|
||||
# ── Sensitivity Analysis ──
|
||||
st.markdown("### 🔬 Sensitivity Analysis")
|
||||
st.markdown("### Sensitivity Analysis")
|
||||
|
||||
col_s1, col_s2, col_s3 = st.columns(3)
|
||||
with col_s1:
|
||||
@@ -229,12 +229,12 @@ def render():
|
||||
st.divider()
|
||||
|
||||
# ── Graphs ──
|
||||
st.markdown("### 📈 Interactive Graphs")
|
||||
st.markdown("### Interactive Graphs")
|
||||
|
||||
tab_bw, tab_pow, tab_map = st.tabs([
|
||||
"📶 Bandwidth Sensitivity",
|
||||
"⚡ Power Sensitivity",
|
||||
"🗺️ BR Factor Map",
|
||||
"Bandwidth Sensitivity",
|
||||
"Power Sensitivity",
|
||||
"BR Factor Map",
|
||||
])
|
||||
|
||||
with tab_bw:
|
||||
@@ -256,14 +256,14 @@ def render():
|
||||
)
|
||||
|
||||
# ── Help Section ──
|
||||
with st.expander("📘 Background Information"):
|
||||
with st.expander("Background Information"):
|
||||
help_topic = st.selectbox(
|
||||
"Choose a topic:",
|
||||
options=["shannon", "advanced", "help"],
|
||||
format_func=lambda x: {
|
||||
"shannon": "🧠 Shannon's Equation",
|
||||
"advanced": "🔧 Advanced (AWGN Model)",
|
||||
"help": "❓ How to use this tool",
|
||||
"shannon": "Shannon's Equation",
|
||||
"advanced": "Advanced (AWGN Model)",
|
||||
"help": "How to use this tool",
|
||||
}[x],
|
||||
)
|
||||
st.markdown(THEORY_HELP[help_topic])
|
||||
|
||||
Reference in New Issue
Block a user