Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARISTOTLE: plot shakemap #10112

Merged
merged 44 commits into from
Nov 26, 2024
Merged

ARISTOTLE: plot shakemap #10112

merged 44 commits into from
Nov 26, 2024

Conversation

ptormene
Copy link
Member

@ptormene ptormene commented Oct 31, 2024

Based on #10107

After pressing the "Retrieve rupture data" button, the average gmfs for PGA and MMI are displayed below the button, if the shakemap data is available from the USGS service.
In the same plots, I am also drawing the hypocenter and the boundaries of the rupture. I am keeping the surface of the rupture transparent, in order to avoid hiding/altering the colors of the gmfs.
Keeping the two maps in a single row made them look very small and hard to read, so I decided to plot them bigger and to display them one below the other.

image

@ptormene ptormene added this to the Engine 3.22.0 milestone Oct 31, 2024
@ptormene ptormene self-assigned this Oct 31, 2024
@ptormene ptormene marked this pull request as draft October 31, 2024 14:52
@ptormene ptormene marked this pull request as ready for review November 4, 2024 11:06
@@ -59,6 +78,51 @@ def get_country_iso_codes(calc_id, assetcol):
return id_0_str


def plt_to_base64(plt):
bio = io.BytesIO()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we are using base64? Is it required by the javascript side? Please add a comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a docstring explaining it

@ptormene ptormene merged commit 7ddfcde into master Nov 26, 2024
7 checks passed
@ptormene ptormene deleted the plotshakemap branch November 26, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants