Skip to content

Conversation

ptormene
Copy link
Member

@ptormene ptormene commented Aug 21, 2025

When we create the plot for assets in oq-impact, currently the whole set of stations is plotted, regardless from the fact they have been discarded or kept for the calculation. This looks confusing, and it makes impossible to determine from the plot if the filtering was correct with respect to the maximum distance specified for stations. With this PR I want to make it possible to clearly distinguish which stations have been taken into consideration.

After filtering stations, I am now storing into the datastore those that have been kept, so it is possible to distinguish them from the others when plotting the stations together with the assets.

If the stations_considered are not available in the datastore (as it is for old calculations), all stations will be displayed, with the label all stations in the legend. Otherwise, all stations will be displayed as discarded stations in the legend, then the considered stations will be plotted on top of them and labeled as considered stations.

@micheles, perhaps there is a better way to store the information about the stations that are kept, e.g. in the station_data object?

The image below shows an example using a maximum source-to-site distance smaller than the maximum distance of stations.
considered_stations

NOTE: Currently, if the maximum distance of stations is not provided, it is set automatically with the same value as the maximum source-to-site distance. However, doing so, we might have stations close to assets that are within the filtering radius (but very close to the threshold), that would be discarded. I suppose it would make sense to use by default a maximum distance of stations that is bigger, in order to avoid that.

@ptormene ptormene added this to the Engine 3.24.0 milestone Aug 21, 2025
@ptormene ptormene requested review from VSilva and micheles August 21, 2025 13:56
@ptormene ptormene self-assigned this Aug 21, 2025
@ptormene ptormene requested a review from raoanirudh August 22, 2025 12:32
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.

1 participant