GEMScienceTools / gmpe-smtk

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

Adds IMS and response spectra tests #69

Closed g-weatherill closed 6 years ago

g-weatherill commented 6 years ago
  1. Adds preliminary test suite for intensity measures and response spectra (more to follow).
  2. More changes for Python 2 & 3 compatibility (Addresses: https://github.com/GEMScienceTools/gmpe-smtk/issues/59)
  3. Change ResponseSpectrum to replace evaluate method with __call__. Closes https://github.com/GEMScienceTools/gmpe-smtk/issues/59

From this point onward response spectra should be called with

nigam_jennings = rsp.NigamJennings(x_record, x_time_step, periods, damping=0.05, units="cm/s/s")
sax, time_series, acc, vel, dis = nigam_jennings()

or

sax, time_series, acc, vel, dis = rsp.NigamJennings(x_record, x_time_step, periods, damping=0.05, units="cm/s/s")()