3.7. Amplitude Intensity Measures
- imcalculator.get_amplitude_ims()[source]
Computes amplitude-based intensity measures.
Peak Ground Acceleration (PGA), Peak Ground Velocity (PGV), and Peak Ground Displacement (PGD) are computed from the acceleration time series by successive trapezoidal integration.
- Parameters:
None
- Returns:
pga (float) – Peak ground acceleration (g).
pgv (float) – Peak ground velocity (m/s).
pgd (float) – Peak ground displacement (m).
Example
import numpy as np
from openquake.vmtk.imcalculator import imcalculator
acc = np.loadtxt("openquake/vmtk/tests/test_data/acceleration.txt")
im = imcalculator(acc, dt=0.005)
pga, pgv, pgd = im.get_amplitude_ims()
print(f"PGA = {pga:.4f} g, PGV = {pgv:.4f} m/s, PGD = {pgd:.4f} m")