Open
Conversation
Updated the html based on the discussion
Fixing the error with "datetime.strptime"
update on aurora forecast
Updated the caption! & KP_comparsion
sahiljhawar
reviewed
Feb 11, 2026
Collaborator
sahiljhawar
left a comment
There was a problem hiding this comment.
- I have replaced
%d-%m-%Ywith%d.%m.%Y - Made changes to the caption
| else: | ||
| message_prefix = ( | ||
| f"""From {start_time.strftime("%Y-%m-%d %H:%M")} UTC to {end_time.strftime("%Y-%m-%d %H:%M")} UTC""" | ||
| f"""From {start_time.strftime("%H:%M (CET) %d-%m-%Y")} to {end_time.strftime("%H:%M (CET) %d-%m-%Y")} """ |
Collaborator
There was a problem hiding this comment.
Suggested change
| f"""From {start_time.strftime("%H:%M (CET) %d-%m-%Y")} to {end_time.strftime("%H:%M (CET) %d-%m-%Y")} """ | |
| f"""From {start_time.strftime("%H:%M (CET) %d.%m.%Y")} to {end_time.strftime("%H:%M (CET) %d.%m.%Y")} """ |
| ) | ||
| if observed_time != analysis.next_24h_forecast.index[0]: | ||
| obs_message_prefix = f""" (Observed Kp data available up to {datetime.strptime(observed_time.strip(), "%Y-%m-%dT%H:%M:%SZ").strftime("%Y-%m-%d %H:%M")} UTC)""" | ||
| obs_message_prefix = f""" (Observed Kp data available up to {datetime.strptime(observed_time.strip(), "%Y-%m-%dT%H:%M:%SZ").strftime("%H:%M CET %d-%m-%Y")})""" |
Collaborator
There was a problem hiding this comment.
Suggested change
| obs_message_prefix = f""" (Observed Kp data available up to {datetime.strptime(observed_time.strip(), "%Y-%m-%dT%H:%M:%SZ").strftime("%H:%M CET %d-%m-%Y")})""" | |
| obs_message_prefix = f""" (Observed Kp data available up to {datetime.strptime(observed_time.strip(), "%Y-%m-%dT%H:%M:%SZ").strftime("%H:%M CET %d.%m.%Y")})""" |
| <p class="forecast-caption">{self.FORECAST_IMAGE_CAPTION}</p> | ||
|
|
||
| ## **ALERT SUMMARY** | ||
| - **Alert sent at:** {datetime.now(timezone.utc).strftime("%H:%M CET %d-%m-%Y ")} |
Collaborator
There was a problem hiding this comment.
Suggested change
| - **Alert sent at:** {datetime.now(timezone.utc).strftime("%H:%M CET %d-%m-%Y ")} | |
| - **Alert sent at:** {datetime.now(timezone.utc).strftime("%H:%M CET %d.%m.%Y ")} |
| # Caption for the forecast plot (SWPC + Min-Max) | ||
| FORECAST_IMAGE_CAPTION = ( | ||
| "<strong>Caption:</strong> Kp index forecast: bar colours show activity level (green = quiet, yellow = moderate, " | ||
| "red = high). Red dashed line = SWPC (NOAA) official Kp forecast. Black vertical lines " |
Collaborator
There was a problem hiding this comment.
Suggested change
| "red = high). Red dashed line = SWPC (NOAA) official Kp forecast. Black vertical lines " | |
| "red = high). Red dashed line = SWPC (NOAA) Kp forecast. Error bar (white-black) represents the Min-Max spread of Kp forecast ensembles." |
| FORECAST_IMAGE_CAPTION = ( | ||
| "<strong>Caption:</strong> Kp index forecast: bar colours show activity level (green = quiet, yellow = moderate, " | ||
| "red = high). Red dashed line = SWPC (NOAA) official Kp forecast. Black vertical lines " | ||
| "on bars = Min–Max range (possible spread of Kp values; longer = more uncertainty)." |
Collaborator
There was a problem hiding this comment.
Suggested change
| "on bars = Min–Max range (possible spread of Kp values; longer = more uncertainty)." |
Co-authored-by: Sahil Jhawar <55475299+sahiljhawar@users.noreply.github.com>
sahiljhawar
reviewed
Feb 11, 2026
Collaborator
sahiljhawar
left a comment
There was a problem hiding this comment.
changes made during FLAG meeting
| kp_comparison = "=" if max_kp_at_finite_time == 9 else "≥" | ||
|
|
||
| ### {message_prefix} Kp is expected to be above {self.config.kp_alert_threshold} ({threshold_level}) with ≥ {prob_at_start_time * 100:.0f}% probability with {start_time_kp_min_status.replace("CONDITIONS", "")} to {end_time_kp_max_status}. | ||
| message = f"""<h2 style="color: #d9534f;">SPACE WEATHER ALERT - {end_time_kp_max_status} ({max_kp_at_finite_time_level}) with ≥ {prob_at_start_time * 100:.0f}% probability Predicted</h2> |
Collaborator
There was a problem hiding this comment.
Suggested change
| message = f"""<h2 style="color: #d9534f;">SPACE WEATHER ALERT - {end_time_kp_max_status} ({max_kp_at_finite_time_level}) with ≥ {prob_at_start_time * 100:.0f}% probability Predicted</h2> | |
| message = f"""<h2 style="color: #d9534f;">SPACE WEATHER ALERT - {end_time_kp_max_status} ({max_kp_at_finite_time_level}) with ≥ {prob_at_start_time * 100:.0f}% probability predicted</h2> |
| **Current Observed Conditions:** {observed_status.replace("CONDITIONS", "")} {obs_message_prefix} | ||
|
|
||
| ## **ALERT SUMMARY** | ||
| ### {message_prefix}, space weather conditions can reach {end_time_kp_max_status} with Kp {kp_comparison} {DECIMAL_TO_KP[max_kp_at_finite_time]} ({max_kp_at_finite_time_level}) with ≥ {prob_at_start_time * 100:.0f}% probability. |
Collaborator
There was a problem hiding this comment.
Suggested change
| ### {message_prefix}, space weather conditions can reach {end_time_kp_max_status} with Kp {kp_comparison} {DECIMAL_TO_KP[max_kp_at_finite_time]} ({max_kp_at_finite_time_level}) with ≥ {prob_at_start_time * 100:.0f}% probability. | |
| ### {message_prefix}, space weather conditions can reach {end_time_kp_max_status} with Kp {kp_comparison} {DECIMAL_TO_KP[max_kp_at_finite_time]} ({max_kp_at_finite_time_level}) with probability ≥ {prob_at_start_time * 100:.0f}%. |
kp_index_monitor, which creates html including video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.