CHT: Catalogue Harmonizer. Basic version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake (deprecated) |
Fix Released
|
High
|
matley |
Bug Description
Provide an API to allow the user to harmonize a catalogue, i.e. to convert a measure set to a target scale.
At a first stage, regression output (emsr) are used as conversion formula. Each emsr is required to convert to the target scale. So the main algorithm will look like:
Given in input:
1) a measure set `M`
2) a target scale `s`
3) an ordered vector of emsr `EMSR` (that acts as conversion formula)
4) a "strict" flag `f` (optional, default to False)
the algorithm gives in output a set of magnitude values MV in the target scale
Algorithm outline:
Initialize MV as empty
for each measure m in M:
find the emsr in EMSR with the minumum index such that m is in native_
if an emsr is not found and f is True:
find an emsr in EMSR such that the emsr.native_scale = m.native_scale.
apply the model implied by emsr to m, and append the result to MV
The API could like:
E.g.
harmonizer = Harmonizer("Mw")
harmonizer.
harmonizer.
harmonizer.
=> returns a list of float numbers, or an associative list where the first element is a measure and the second one is the measure in the target scale
summary: |
- CHT: Magnitude conversion + CHT: Catalogue Harmonizer |
summary: |
- CHT: Catalogue Harmonizer + CHT: Catalogue Harmonizer. Basic version |
description: | updated |
description: | updated |
description: | updated |
Changed in openquake: | |
status: | New → In Progress |
importance: | Undecided → High |
description: | updated |
Changed in openquake: | |
status: | In Progress → Fix Committed |
Changed in openquake: | |
status: | Fix Committed → Fix Released |