gem/oq-hazardlib — pull request #142 by monellid (2013-11-01 10:36:26+00:00)
Title: Implement Non Parametric source and generalized hazard curve calculator

Such pull request implement a new source typology ('NonParametricSeismicSource' see: https://bugs.launchpad.net/oq-hazardlib/+bug/1247029) and a generalized hazard curve calculator following the strategy described in https://bugs.launchpad.net/oq-hazardlib/+bug/1247040.

I'm sorry for the length of the diff, but many changes are due simply to class renaming and test fixing.

The major change is that now classes representing seismic sources such as point, area, simple fault, complex fault and characteristic fault defines a constructor which requires a temporal occurrence model (while in the current implementation this is passed to the 'iter_ruptures' method). This means that the source definition changes and this will break the oq-engine and oq-nrmllib.

This pr is meant to expose a possible way to implement https://bugs.launchpad.net/oq-hazardlib/+bug/1247040. If this is accepted, then work on the oq-engine side has to be done.

I want to notice that even if a temporal occurrence model is required to instantiate a seismic source, this does not mean that the existing NRML source model files need to be changed. An approach would be to assume that, if not specified, the temporal occurrence model of a source is 'Poissonian' (as it is basically now). The parser would have anyhow to pass such information in the class definition.