GEMScienceTools / gmpe-smtk

Python and OpenQuake-based Toolkit for Analysis of Strong Motions and Interpretation of GMPEs
GNU Affero General Public License v3.0
43 stars 33 forks source link

Residual refactor #100

Closed rizac closed 5 years ago

rizac commented 5 years ago

Implements a new ground motion database (GroundMotionTable in sm_table.py) and flat file parser (sm_table_parsers.py) which behave almost identically to the currently implemented GroundMotionDatabase (sm_database.py) with limited support for time series data but featuring the creation of custom databases from a user-defined flat file provided with a standard set of default columns (GMTableDescription in sm_table.py). Also, the selection of database records is made much more simpler and flexible exploiting PyTables and numexpr syntax (PyTables is added as new dependency in setup.py)

The new Residuals calculation has been modified to accept both database types as input. Tests were implemented to check consistency of the results

Finally, some cleanup / refactor of existing function has been also accomplished

g-weatherill commented 5 years ago

LGTM