Peak ground motion example
This example reproduces the processing flow in _acceleration.py:
- read miniSEED records with
github.com/bclswl0827/mseedio, merge them, and linearly interpolate record gaps;
- remove the linear trend and mean;
- apply a 5% cosine taper;
- apply the default response-removal demean/taper and remove the instrument response for acceleration, velocity, and displacement;
- apply a four-pole 0.1–10 Hz Butterworth band-pass;
- convert metres to centimetres and calculate the peak three-component vector magnitude.
Run from the repository root:
go run ./examples/peak_ground_motion_example \
-inventory ./examples/_data/seiscomp.xml \
-east ./examples/_data/2026.211.16.53.54.0541.SHAKE.AS.00.EHE.D.mseed \
-north ./examples/_data/2026.211.16.53.54.0541.SHAKE.AS.00.EHN.D.mseed \
-vertical ./examples/_data/2026.211.16.53.54.0541.SHAKE.AS.00.EHZ.D.mseed
-format defaults to auto; seiscomp and stationxml can also be selected explicitly.
Response removal uses the fast power-of-two FFT by default. Add -obspy-fft
to use ObsPy's arbitrary FFT-length selection for numerical comparisons; that
mode requires substantially more CPU time in the pure Go implementation.