Skip to content

Commit 0aec47d

Browse files
committed
Update UI and ReadMe
1 parent b29b29a commit 0aec47d

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Scripts in this repository generate images of the night sky as seen in Glasgow,
44

55
If you just want to generate plots, rather than contribute to the code, you can do so for free at: https://starplot-glasgow.onrender.com
66

7+
![A Screenshot from the Web App](images/website_screenshot.png "A Screenshot from the Web App")
8+
79
# Examples
10+
Below are some examples of the two types of plots you can create.
811

912
![A Zenith Star Plot from Glasgow](images/glasgow_zenith.png "A Zenith Star Plot from Glasgow")
1013
_A Zenith Star Plot from Glasgow_

app.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
st.set_page_config(page_title="Glasgow Starplot Viewer", page_icon="🌌")
5555
st.title("🌌 Glasgow Starplot Viewer")
5656

57+
# Add a note about generation time
58+
st.info(
59+
"⚠️ Generating a chart can take up to **3 minutes** depending on your selections. "
60+
"Please be patient while the image is being created."
61+
)
62+
5763
# Sidebar: controls
5864
plot_type = st.sidebar.radio("Select Plot Type", ["Horizon", "Zenith"])
5965
obs_date = st.sidebar.date_input("Date", value=date.today())
@@ -62,7 +68,7 @@
6268

6369
# Extra option: fast vs HD
6470
quality = st.sidebar.radio("Quality", ["Fast (preview)", "HD (slower)"])
65-
RESOLUTION = 1200 if quality == "Fast (preview)" else 2400
71+
RESOLUTION = 600 if quality == "Fast (preview)" else 1200
6672

6773
# Session state
6874
if "chart_bytes" not in st.session_state:
@@ -102,8 +108,7 @@ def generate_chart(plt_type: str,
102108
tz = ZoneInfo("Europe/London")
103109
dt = datetime.combine(obs_date, obs_time).replace(tzinfo=tz)
104110

105-
with st.spinner("Generating chart, please wait..."):
106-
img_bytes = generate_chart(plot_type, dt, mag_limit, RESOLUTION)
111+
img_bytes = generate_chart(plot_type, dt, mag_limit, RESOLUTION)
107112

108113
st.session_state.chart_bytes = img_bytes
109114
st.success("✅ Chart generated!")

images/website_screenshot.png

251 KB
Loading

0 commit comments

Comments
 (0)