Use log-log interpolation for hazard map and disaggregation calculations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake Engine |
Fix Released
|
High
|
Michele Simionato |
Bug Description
When deriving a hazard map or when doing a disaggregation calculation, the ground motion value associated to a probability of exceedance value, is computed by performing a liner interpolation between the two closest probability of exceedance values (see https:/
For more precise results the interpolation should be done in log space, that is instead of:
numpy.interp(poes, curve[::-1], imls)
we should use:
10 ** (numpy.
numpy.log10(imls)))
description: | updated |
description: | updated |
Changed in oq-engine: | |
assignee: | nobody → Michele Simionato (michele-simionato) |
milestone: | none → 1.0.1 |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in oq-engine: | |
status: | Fix Committed → Fix Released |
If a curve has zero values, or extremely small values, we use a cutoff to avoid issues with the logarithm. We choose 1e-30 as a reasonable value for the cutoff (notice that in postgres poes are stored as 32 bit floats and the minimum possible float is 1e-38).
See https:/ /github. com/gem/ oq-engine/ pull/1338 for the implementation.