3.7. Amplitude Intensity Measures
- imcalculator.get_amplitude_ims(highpass_hz=0.05)[source]
Computes amplitude-based intensity measures.
Peak Ground Acceleration (PGA) is the peak of the record. Peak Ground Velocity (PGV) and Peak Ground Displacement (PGD) are the peaks of the drift-corrected velocity and displacement histories of
get_vel_disp_history.- Parameters:
highpass_hz (float or None, optional) – Corner frequency (Hz) of the high-pass filter applied before integration. Default is 0.05 Hz.
Noneintegrates the record without drift correction, which inflates PGD (and to a lesser extent PGV) through baseline drift.- 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")