SCECcode / pycsep

Tools to help earthquake forecast model developers build and evaluate their forecasts
https://docs.cseptesting.org
BSD 3-Clause "New" or "Revised" License
49 stars 23 forks source link

Basemaps downloading requires a timeout option #258

Open pabloitu opened 3 months ago

pabloitu commented 3 months ago

Querying a webservice for basemaps requires to have a timeout specification

https://github.com/SCECcode/pycsep/blob/5f84ea97101de0439deb1e3f5c383874c7bb3801/csep/utils/plots.py#L2727

so it can default to stock_img and does not freeze runtime of there is any connection problem.

The download time of a basemap can be significant (2-20 sec). However, many times it is required to plot the same catalog (or the same region) multiple times. It would make sense to cache the download basemap.