sayedmohamed92 / TerraWare-HV

Processing and Inversion of spectral ratio (H/V) using the Diffuse Field Assumption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TerraWare HV

TerraWare HV


Software developed by Geotem Ingeniería in Python 3.7.x to compute the spectral ratio (H/V) using seismic noise data and also to compute the inversion of the H/V using the Diffuse Field Assumption. The inversion uses the Particle Swarm Optimization Algorithm (PSO) and an Occam gradient to smooth velocity variations between layers. The results the software provide are the shear and compressional velocity profiles estimated.

The processing of ambient noise vibrations is made with the stacking and the mean of the selected windows considering the diffuse field assumption.

The inversion of the H/V runs an external C++ executable file. The modeler of the H/V phenomena used in the inversion algorithm is the one described in Sánchez-Sesma, et al. 2011.

Getting Started

The code is developed and tested on Windows and Ubuntu using Python 3.7.x. You have two options of installation, through the creation of an Anaconda enviroment or using the pip method.

a) Anaconda enviroment installation

First we need to create an enviroment in the Anaconda prompt with the following specifications:

conda create -n terrawarehv python=3.7 numpy matplotlib=3.2.2 scipy=1.5.0 pandas=1.0.5 pyside2

Then we need to activate the enviroment

conda activate terrawarehv

b) Pip installation

In addition to Python and setting it as a Path variable, you need to install the following packages using pip.

pip install numpy==1.19.0
pip install matplotlib==3.2.2
pip install scipy==1.5.0
pip install pandas==1.0.5
pip install pyside2==5.15.0

Installation

Download or clone this repository, then open main.py file. For the anaconda option we need to activate the "terrawarehv" enviroment and run the file in it.

python main.py

Running the tests

Once the main window is opened, load the files in the folder "Ejemplos" with "Load V.A. file" option and double click a sounding to work on it. Then change the parameters and process it.


The processing parameters are described in the next table:

Processing Parameters Description
Normalización Type of normalization in frequencies
Window Type of tappered window
Traslape Overlap percentage
Factor de Taper Taper factor if the window is Tukey type
OneBit Applies a OneBit normalization in time
Quitar tendencia Remove mean trend of the signal
Muestreo tiempo Time sampling rate. Takes the signal default sampling rate
Muestreo frecuencia Frecuency sampling rate for the spectral ratio.
Segundos de ventana Window length in seconds
Konno-Ohmachi Konno-Ohmachi filter factor that goes from 0 to 90, being 90 the raw ratio and 0 the most smoothed ratio.
Frecuencias para H/V Range of frequencies to visualize the spectral ratio
Filtro de Butterworth Cut-off frequencies to apply a Butterworth filter if needed
H/V direccionales Spectral ratio of the N-S and E-W components
Espectros Amplitude spectrum of the raw signal

To invert the results of the spectral ratio, click on the "Inversion" tab. You also need to modify the parameters on the "Cargar Modelo Inicial" and "Parámetros de Inversión" dialog boxes. Make sure to select the Particle Swarm Optimization as the inversion method. Normally, the default PSO parameters work fine for near surface results.

PSO Parameters Description
Iteraciones Number of iterations of the Swarm (external loop)
Partículas Number of elements of the Swarm (internal loop)
Factor de inercia inicial Initial value of the inertia factor, normally ranges between 1 to 2.
Amortiguamiento Damping factor for the inertial term. Normally ranges between 0.5 (higher perturbation of the parameter space) to 0.9999+ (lower perturbation of the parameter space).
Coeficiente cognitivo Cognitive factor, controls the term that depends on the particle trajectory. Ranges between 1-2.
Coeficiente social Social factor, controls the term that depends on the swarm best result. Ranges between 1-2.
Factor de Velocidad Perturbation of the parameter space step factor
Gradiente de VP Poisson ratio gradient factor, the smaller the quantity the less smoothed the resulting Poisson ratio you'll get.
Gradiente de VS Shear velocity gradient factor, the smaller the quantity the less smoothed the resulting VS profile.
Gradiente de Densidad Density gradient factor, the smaller the quantity the less smoothed the resulting density profile.

The initial model parameters depend on the results you are expecting:

Initial Model Parameters Description
Espesor de la primera capa Since the thickness of the resulting layers are computed logarithmically we need to provide the first layer thickness in meters
Número de capas Number of expected layers. Suggested ranges are between 8 to 36. Remember that the more layers the algorithm takes more time to compute the results
Profundidad Expected depth of the results
Coef. de Poisson mínimo Minimum value of the Poisson ratio. (Poisson ratio normally ranges between 0.15 to 0.4999+ for geosciences)
Coef. de Poisson máximo Maximum value of the Poisson ratio. (Poisson ratio normally ranges between 0.15 to 0.4999+ for geosciences)
VS mínima Minimum value of the Shear velocity expected. (Shear velocity normally ranges between 100 to 3000 [m/s] for near surface applications)
VS máxima Maximum value of the Shear velocity expected. (Shear velocity normally ranges between 100 to 3000 [m/s] for near surface applications)
Densidad mínima Minimum value of the density expected. (Shear velocity normally ranges between 1000 to 3000 [kg/m3] for near surface applications)
Densidad máxima Minimum value of the density expected. (Shear velocity normally ranges between 1000 to 3000 [kg/m3] for near surface applications
Basamento If selected, forces the last layer to have the maximum value.

Modify the parameters until you get the results you expect.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Michelle Sainos Vizuett - Developer
  • Juan Carlos Colchado Casas - Developer
  • Francisco Huante Arana - Consultant
  • Alfredo Sánchez Galindo - Chief Software Manager
  • Francisco José Sánchez Sesma - External Consultant

About

Processing and Inversion of spectral ratio (H/V) using the Diffuse Field Assumption


Languages

Language:Python 99.8%Language:Gnuplot 0.2%Language:HTML 0.0%