HVSR site response-based shear-wave velocity estimation.
srnet/synthetics.py: synthetic HVSR generationsrnet/train.py: model trainingsrnet/infer.py: inference on synthetic or real HVSR curvessrnet/metrics.py: validation metricssrnet/plotting.py: plotting utilitiessrnet/convert.py: conversion fromHVSRDatato SRNet NPZ input formatsrnet/utils.py: common utility functions.
srnet/cli/srnet_synthetics.pysrnet/cli/srnet_train_mlp.pysrnet/cli/srnet_infer.pysrnet/cli/srnet_evaluate.pysrnet/cli/hvsrdata_to_srnet_npz.py
examples/srnet_workflow.ipynb: end-to-end workflowexamples/srnet_metrics_viz.ipynb: post-training metrics and proposal figures
From the SRNet repository root:
conda create -n srnet python=3.12 jupyter
conda activate srnetUpgrade packaging tools and install SRNet in editable mode (SRNetRoot is the root directory where this package is located after downloading or cloning):
cd $SRNetRoot
pip install -e .This installs the srnet Python package. The command-line scripts are installed as console commands from srnet.cli.
Core dependencies installed by the package include:
numpymatplotlibscipydisbatorchjupyteripykernel
You can create jupyter kernel, after activating the conda environment:
$ pip install --user ipykernel
$ python -m ipykernel install --user --name=srnet
A minimal smoke test is to generate a small synthetic dataset, train a short MLP run, and confirm that validation outputs are created.
srnet-synthetics \
--n-samples 1000 \
--n-layers 1 \
--outfile examples/test_synthetics.npz \
--qc-figure examples/test_synthetics_qc.pngsrnet-train-mlp \
--data examples/test_synthetics.npz \
--epochs 5 \
--batch-size 128 \
--outdir examples/test_mlp_resultsAfter the test run, you should see files such as:
examples/test_mlp_results/best_model.ptexamples/test_mlp_results/loss_curve.pngexamples/test_mlp_results/validation_predictions.npzexamples/test_mlp_results/validation_profiles.pngexamples/test_mlp_results/validation_profile_metrics.npz
