gem/oq-engine — pull request #774 by larsbutler (2012-06-01 13:47:05+00:00)
Title: Site model

At long last, the site model feature:
https://bugs.launchpad.net/openquake/+bug/987827

This branch adds the option to all hazard calculators to use site-specific parameters (vs30, vs30 type, z1pt0, and z2pt5). Previously, these params were defined in general for the entire calculation.

When a calculation is run, we use st_distance_sphere on a given site of interest to determine the closest point of data in the site model. Note: I've found that for the `simple_fault_demo_hazard`, the computation increases dramatically. A lot of time is consumed by these queries, there may be some chance for optimizations here later on.

Also, this branch introduces the first use of nhlib inside oq-engine. In order to run tests on this branch, you'll need to have the latest nhlib in your python path.

The majority of the changes are in `openquake/calculators/hazard/general.py`, but I had to refactor many parts of the code to wire in this feature to each hazard calculator.