Package Overview
Spatial-VTK is organized around the order you will usually move through a project: prepare your inputs, set project defaults, review data quality, calculate metrics, analyze spatial patterns, and make figures or dashboards.
This page is a map of the package. Use it to decide where to start, then go to the examples or API reference when you want runnable code or exact function signatures.
Workflow At A Glance
Step |
Module |
What You Use It For |
|---|---|---|
1 |
|
Read waveform inputs, prepare metadata, and build inventories. |
2 |
|
Set paths, bounds, metric choices, synthetic limits, and run scenarios. |
3 |
|
Build QC tables, summarize retained records, and prepare manual-review queues. |
4 |
|
Calculate observed/synthetic metric values, residuals, and GOF scores. |
5 |
|
Find station, event, path, geology, polygon, and corridor patterns. |
6 |
|
Make context figures, QC figures, waveform figures, maps, and dashboards. |
7 |
|
Run the same workflows from the terminal with |
io
Use io when you are turning your own files into tables Spatial-VTK can use.
Common tasks:
prepare station and event metadata with consistent column names
build observed/synthetic waveform inventories
preprocess waveform files once with configured filters or resampling
read catalog tables and synthetic model aliases
write artifact manifests for generated outputs
reshape metric tables for downstream workflows
Main areas:
io.metadataandio.inventoryfor prepared station, event, and waveform tablesio.waveforms,io.preprocessing, andio.synthetic_formatsfor waveform preprocessing and synthetic file helpersio.artifactsandio.plansfor reproducible output paths and metric plans
config
Use config when you want one place to define the project settings you reuse.
Common tasks:
resolve project paths and output folders
define named map bounds such as
study_areachoose metric groups, transforms, passbands, components, and models
set synthetic maximum frequency limits
apply optional
run_scenariosfor repeatable variations
Start with Configuration if you are setting up a project config file.
qc
Use qc when you need to decide which records are reliable enough to keep.
Common tasks:
build trace and record inventories
apply reject rules and passband-specific checks
summarize retained and rejected records
export manual-review queues for the QC picker
Main areas:
qc.buildfor QC inventory and filtering logicqc.reviewfor manual-review tablesqc.summaryfor retention summaries and reject-rule helpers
metrics
Use metrics when you are ready to calculate waveform metrics and compare
observed and synthetic records.
Common tasks:
calculate amplitude, duration, spectral, intensity, delay, and correlation metrics
compute residuals, log residuals, Anderson GOF scores, and Olsen-Mayhew GOF scores
run metric calculations locally, in batches, or with SLURM
enrich metric tables with station, event, path, and geologic metadata
prepare standard outputs for spatial analysis, plotting, and dashboards
Main areas:
metrics.calculatefor metric math and table preparationmetrics.workflowfor file-based task planning, batching, merging, and SLURM scriptsmetrics.plotfor metric-specific diagnostic figures
spatial
Use spatial when you want to understand where model performance changes
across stations, events, paths, regions, or geologic settings.
Calculation tools:
station bias and event-centered residual fields
Moran’s I, permutation Moran tests, and distance-bin correlations
spatial holdout tests and residual-feature clustering
REDCAP spatial clustering
PCA spatial modes
bootstrap contrasts and geology-class joins
observed/synthetic spatial-pattern comparisons
Path, polygon, and corridor tools:
source-station geometry and distance/azimuth path summaries
GeoJSON station, event, and path classifications
polygon crossing, begins-in-polygon, and ends-in-polygon selections
boundary corridors built from keyword parameters
corridor path classification by membership, side, and path length
Plot and map tools:
correlograms, semivariograms, holdout diagnostics, and cluster summaries
PCA variance/loadings plots and PCA mode maps
station-bias maps, score maps, residual grids, and event residual maps
corridor and polygon-path maps
visualize
Use visualize when you want figures or interactive outputs rather than new
tables.
Common tasks:
make basic station/event context maps and coverage figures
make QC and retention figures
make waveform record sections and trace-comparison figures
prepare dashboard datasets from long metric tables
launch Streamlit/Folium dashboards for metrics and QC review
Main areas:
visualize.contextfor project overview figuresvisualize.qcfor QC and retention figuresvisualize.waveformsfor record sections and waveform comparisonsvisualize.dashboardfor dashboard tables and Streamlit apps
cli
Use cli when you want to run package workflows from a terminal. The public
command is svtk.
Common command groups:
svtk configfor config discovery and inspectionsvtk iofor metadata and inventory preparationsvtk qcfor QC review-queue exportssvtk metricsfor metric task planning, execution, merging, and outputssvtk plot,svtk map, andsvtk visualizefor file-backed figuressvtk dashboardfor Streamlit dashboard launchers
See CLI API for command examples.
Where To Go Next
If you are checking what files you need, go to Data Formats.
If you are setting up paths and defaults, go to Configuration.
If you want a guided workflow, go to Examples and Tutorials.
If you need function signatures, go to Python API.
If you need terminal commands, go to CLI API.