PSHA Tool
Probabilistic Seismic Hazard Analysis | by Albert Pamonag
psha.apeconsultancy.net
Modules
| Module | Description |
|---|---|
| Declustering | Remove aftershocks using Gardner-Knopoff windows |
| Completeness Analysis | Magnitude-time density with completeness thresholds |
| Gutenberg-Richter | Recurrence parameter estimation (a, b-value) via MLE |
| UHS Generator | Interpolate Sa from OpenQuake hazard curves |
| DSHA | Deterministic Seismic Hazard Analysis |
| Deaggregation | 3D magnitude-distance-epsilon contribution |
| Response Spectrum | Smoothed design spectrum + BSDS Level I |
| Return Period | POE / lambda / MRP conversions |
| Spectra Plotter | Overlay and envelope multiple spectra |
Quick Start
- Upload earthquake catalog in Declustering
- Run Completeness and Gutenberg-Richter
- Upload OpenQuake outputs in UHS Generator and Deaggregation
- Generate design spectra in Response Spectrum
- Check the QAQC Log for audit trail
Declustering - Gardner-Knopoff Method
Remove aftershocks using magnitude-dependent space-time windows. Compare three windowing methods.
Completeness Analysis
Stepp (1972) completeness analysis with automated detection and manual override. Outputs for whole catalogue and by depth class.
Gutenberg-Richter Recurrence
Estimate a-value and b-value using Maximum Likelihood Estimation.
Magnitude-Frequency Distribution
Completeness-corrected MFD for OpenQuake source models (ArbitraryMFD / TruncatedGRMFD).
Maximum Magnitude Estimation
Estimate Mmax using Kijko-Sellevol and Cumulative Moment methods from declustered catalogue.
Uniform Hazard Spectrum (UHS) Generator
Interpolate spectral accelerations from OpenQuake hazard curve CSVs.
Deterministic Seismic Hazard Analysis (DSHA)
Calculate ground motion for maximum magnitude from fault sources.
Deaggregation Explorer
3D magnitude-distance-epsilon contribution and source deaggregation from OpenQuake output.
Return Period Calculator
Convert between POE, Annual Exceedance Rate, and Mean Return Period.
Common Return Periods
| Scenario | Lambda | MRP (yr) |
|---|---|---|
| 10% in 50 yr | 0.002107 | 475 |
| 2% in 50 yr | 0.000404 | 2475 |
| 5% in 50 yr | 0.001026 | 975 |
| 10% in 75 yr | 0.001405 | 712 |
| 2% in 75 yr | 0.000270 | 3712 |
| 50% in 30 yr | 0.023105 | 43 |
Catalogue Convert to HMTK
Upload earthquake catalogue (CSV/XLSX) and convert to HMTK format for OpenQuake analysis.
Catalogue Check
Upload earthquake catalogue and generate analysis plots without converting to HMTK first.
Catalogue QAQC
Quality control checks before merging catalogues: duplicate detection, magnitude consistency, temporal gaps.
Depth Distribution & Nodal Planes
Hypocentral depth histogram and PMF table for OpenQuake source model input.
Focal Mechanisms & Nodal Planes
View fault parameters per SSM source within 300 km. Select a fault to see its geometry, MFD, and nodal plane parameters.
Select Fault Source (within 300 km)
SSM Source Model Visualizer
Visualize PHIVOLCS-GEM seismic source model: fault traces, area zones, and MFD parameters.
Crustal Sources
Subduction Interface
Subduction Slab
Or upload custom SSM XML files:
GMPE Comparison
Philippine GMPE reference (PHIVOLCS-GEM-Oct2020) with distance-attenuation comparison plots.
Tectonic Region
GMPEs
Parameters
AT2 Converter
Upload PEER .AT2 ground-motion files, resample to a target time step, and download in ChiChi-like text format.
PEER to TXT
Upload PEER .AT2 ground-motion files and download as plain text in sec acc format (fixed-point, no scientific notation).
Ground Motion Classification
Compute PGA, PGV, PGD, Central Period (Tc), and Normalized Velocity (PGVn) with frequency and bandwidth classification.
Option 1 — Upload PEER .AT2 records
Option 2 — Upload Batch GM Excel (.xlsx)
Expected column order (no header row):
station, record id, —, db, event, date, Mw, station name, VS30, site class, R (km), PGA (g), PGV (cm/s), PGD (cm), …
DEEPSOIL Results Extractor
Upload DEEPSOIL output Excel files to extract PGA, PGV, and PGD from Layer 1.
DEEPSOIL to TXT
Upload DEEPSOIL .xlsx output files and download the Layer 1 surface motion as plain text in sec acc format (fixed-point, no scientific notation).
Ground Motion Polar Plot
Upload two horizontal components (X and Y) of PEER AT2 input motion and/or DEEPSOIL surface output. Acceleration is double-integrated to displacement (cm) and visualized as the rotated PGD rose, displacement hodograph, compass-polar PGD, and the QuakeManager-style Polar Chart.
PEER Input (.AT2)
DEEPSOIL Output (.xlsx)
Displacement Polar Chart
Double-integrates acceleration to displacement (cm) and renders the QuakeManager-style
Polar Chart: POLAR_ENV (rotated peak-displacement envelope) and
2D_TRACE (particle-motion orbit). Upload up to 7 X/Y pairs
— each pair can be PEER (.AT2) or DEEPSOIL (.xlsx).
Change Log
PSHA Tool by Albert Pamonag
v2.0.0 (2026-04-05)
- Declustering: 3 windowing methods (Gardner-Knopoff, Grünthal, Uhrhammer) with checkboxes, distance-time window comparison plot, per-method before/after magnitude-time scatter, per-method CSV download
- Completeness: Stepp (1972) automated analysis with bilinear fit, manual completeness table override, "both" mode overlay, output for whole catalogue + shallow/mid/deep depth classes, viridis colormap
- Catalogue Convert: Upload CSV/XLSX, auto-detect format (USGS, PHIVOLCS Excel, generic), convert to HMTK tab-separated format with download
- Catalogue Check: 4 analysis plots (map, depth histogram, mag-time scatter, mag-time density) without converting to HMTK first
- Catalogue QAQC: Duplicate detection (sliding window), magnitude consistency checks, temporal gap analysis with events-per-year bar chart
- Max Magnitude: Observed Mmax estimation with cumulative moment release plot
- Depth & Nodal: Depth distribution histogram, depth PMF table, auto-generated OpenQuake hypoDepthDist XML snippet
- SSM Visualizer: Parse NRML 0.5 XML source models (SimpleFault, ComplexFault, MultiPoint), map with Philippines coastline, checkbox per-file selection, Mapbox interactive map with fault popups, 300km radius, per-TRT source tables
- GMPE Comparison: PHIVOLCS-GEM-Oct2020 reference with 7 plots: 3 per-TRT attenuation curves (Active Shallow Crust, Subduction Interface, Intra-Slab), logic tree weighted comparison, combined envelope, response spectrum (0-3s), per-TRT only spectrum
- Focal Mechanisms: Per-fault analysis from SSM within 300km: professional cross-section diagram (R_RUP, R_JB, R_EPI, R_HYPO), 3D Plotly fault plane with distance lines, 28-row parameter table with descriptions, GMPE requirements table (11 GMPEs), OpenQuake nodalPlaneDist XML
- Light/Dark theme: Toggle button in sidebar, persists via localStorage, Plotly charts adapt to theme
- OpenQuake HMTK localized: 12 tutorial notebooks extracted from OpenQuake with local dependencies (no openquake.engine needed for notebooks 1-8)
- Mapbox default: Satellite-streets style, API key configured
v1.1.0 (2026-03-29)
- Separated HTML/CSS/JS for easy manual editing
- Declustering: side-by-side original vs declustered comparison
- Mapbox GL interactive maps (if token provided)
- Modular page templates (templates/pages/*.html)
v1.0.0 (2026-03-29) - Initial Release
- Declustering module (Gardner-Knopoff method)
- Completeness analysis with magnitude-time density plots
- Gutenberg-Richter recurrence (MLE b-value estimation)
- UHS Generator from OpenQuake hazard curves
- DSHA module with configurable GMPE coefficients
- Deaggregation 3D explorer (magnitude-distance-epsilon)
- Response Spectrum with smoothed design + BSDS Level I
- Return Period Calculator (POE / lambda / MRP)
- Spectra Plotter with overlay and envelope
- QAQC audit log with checklist
- Flask + vanilla JS frontend (lightweight)
- Deployed on Railway at psha.apeconsultancy.net