CHT: Catalogue Harmonizer. Basic version

Bug #1007434 reported by matley
6
This bug affects 1 person
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_measures(emsr)
 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.add_conversion_from_model(emsr1)
harmonizer.add_conversion_from_model(emsr2)
harmonizer.harmonize(a_measure_list)

=> 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

matley (matley)
summary: - CHT: Magnitude conversion
+ CHT: Catalogue Harmonizer
matley (matley)
summary: - CHT: Catalogue Harmonizer
+ CHT: Catalogue Harmonizer. Basic version
description: updated
matley (matley)
description: updated
matley (matley)
description: updated
Changed in openquake:
status: New → In Progress
importance: Undecided → High
matley (matley)
description: updated
matley (matley)
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.