Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

cpt_vs_tool

This tool is designed to automate the Vs interpretation process from SCPT. interpretation_tool provides the all-in-one tool for interpreting Vs profiles from Zhang et al. (2026), Robertson (2012) and the layer-based regression approach. And lbr interpret Vs profiles from the conventional layer-based regression approach using only the travel time data.

Installation

pip install cpt-vs-tool

To run the example notebooks from a clone of the repository, install the package in editable mode with the notebook extras from the repository root:

pip install -e ".[notebooks]"

Example

import numpy as np
import pandas as pd
from cpt_vs_tool import compute_profiles, plot_profiles, compute_VsZ, a_coeff

cpt = pd.read_csv("avn_1.csv")
tt = pd.read_csv("avn_1_tt.csv")

p = compute_profiles(
    cpt["depth (m)"].to_numpy(),                # CPT depth
    cpt["qt (MPa)"].to_numpy(),                 # qt
    cpt["fs (MPa)"].to_numpy(),                 # fs
    dGWT=31.0,                                  # groundwater 
    TT_depth=tt["depth (m)"].to_numpy(),        # travel time depth
    Meas_TT=tt["traveltime (ms)"].to_numpy(),   # travel time measurement
    geology="Qal1",                             # surficial geology
)

plot_profiles(p)
print(compute_VsZ(p))

Pass TT_depth=None, Meas_TT=None when there is no travel time data; only Zhang et al. (geo) and Robertson (2012) are then computed. Use LBR for layer-based regression of travel time data alone.

User Guide

  1. Purely interpret the traveltime data into stepped Vs profiles from SCPT, please use the layer-based regression lbr tool.
  2. Interpretation tool interpret Vs profile using Zhang et al. (2026) (geo) - only CPT data, Zhang et al. (2026) (site-specific) - CPT and travel time data, Robertson (2012) and lbr.
  3. Regression and data files for the mand utility tools are included in the dev/ folder.

Repository Structure

cpt_vs_tool/
├── pyproject.toml            # package metadata and dependencies (PyPI: cpt-vs-tool)
├── requirements.txt          # editable install of the package + notebook extras
├── LICENSE                   # BSD-3-Clause
├── src/cpt_vs_tool/          # the installable package
│   ├── __init__.py           # public API (from cpt_vs_tool import ...)
│   └── vs.py                 # all functions (CPT processing, Zhang et al. / Robertson models, layer-based regression)
├── tests/                    # pytest suite + sample data (avn_1)
├── .github/workflows/        # main.yml: build, test and publish to PyPI on a tag push
├── interpretation_tool/      # example: scpt_tool_v1.ipynb + sample data (avn_1)
├── lbr/                      # example: layerbasedregression.ipynb + sample data
└── dev/                      # model development (not needed to use the tools)
    ├── src_files/            # VSPDB query (vspdb_2_query.ipynb) and the CPT, travel time, groundwater and geology tables  
    ├── groundwater/          # groundwater table depths from Ma et al. (2026) and USGS topography, with validation  
    ├── data_observation/     # data_observation.ipynb + residual data (cpt_res_data_r3.csv, tt_res_data_r3.csv)  
    ├── regression/           # model regression: v6_mle.ipynb (maximum likelihood) and bayesian_pymc.ipynb  
    ├── results/              # results_comparison_gui.ipynb: compares the CPT-Vs models with the measured profiles  
    ├── sl_validation/        # sl_validation.ipynb: all-in-one tool applied to the Perris and UCD validation sites  
    └── utilities/            # geology.ipynb: Wills et al. (2015) surficial geology / Vs30 query (wills_shp/ shapefile)  

The tool notebooks import from the installed cpt_vs_tool package (see Installation), and all notebooks read their data through relative paths, so run them from inside their own folder. pip install -r requirements.txt is equivalent to pip install -e ".[notebooks]"; the dev/ notebooks need additional packages (e.g. pymc, geopandas).

Update Log

See CHANGELOG.md for the full history of updates.

Citations

Zhang, ZS, SJ Brandenberg, JP Stewart (2026). Algorithm for interpreting velocity profiles from seismic Cone Penetration Test data, 13th National Conference on Earthquake Engineering, Portland, OR, EERI

Zhang, ZS, SJ Brandenberg, JP Stewart (2027). CPT-Based Vs Estimation with or without Travel Time Measurements, ASCE2027, Philadelphia, PA, ASCE

Metadata

Release files for cpt-vs-tool 0.1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cpt-vs-tool 0.1.0b2
File Size Uploaded Provenance Actions
cpt_vs_tool-0.1.0b2.tar.gz 28.6 kB With provenance Details for cpt_vs_tool-0.1.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cpt-vs-tool 0.1.0b2
File Interpreter ABI Platform Actions
cpt_vs_tool-0.1.0b2-py3-none-any.whl Python 3 none any Details for cpt_vs_tool-0.1.0b2-py3-none-any.whl

Total release size: 40.4 kB

Release files / cpt_vs_tool-0.1.0b2.tar.gz

Download URL cpt_vs_tool-0.1.0b2.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
859abfab81477d4cea604dc94e8263524b520a44bc1b1b65fad91cf5f825cecf
BLAKE2b-256 checksum
How to use checksums
988b28e25379cee26f5b4595828f588257881ba3ada01aa119410f24ab8aa115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / cpt_vs_tool-0.1.0b2-py3-none-any.whl

Download URL cpt_vs_tool-0.1.0b2-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6be9e8c78e35ea4e1528deb1bdc3fe7efb500db85b00b8029cbad31fa107eb70
BLAKE2b-256 checksum
How to use checksums
01d4c3a49495644c3b51d89f507d7be13912b3e7fc9659c72769b57c031c20d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for cpt-vs-tool 0.1.0b2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cpt_vs_tool-0.1.0b2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page