{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Synthetic Seismogram Widget" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using the Notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is the Jupyter Notebook, an interactive coding and computation environment. For this lab, you do not have to write any code, you will only be running it. \n", "\n", "To use the notebook:\n", "- \"Shift + Enter\" runs the code within the cell (so does the forward arrow button near the top of the document)\n", "- You can alter variables and re-run cells\n", "- If you want to start with a clean slate, restart the Kernel either by going to the top, clicking on Kernel: Restart, or by \"esc + 00\" (if you do this, you will need to re-run Step 0 before running any other cells in the notebook) \n", "\n", "Instructions as to how to set up Python and the iPython notebook on your personal computer are attached in the appendix of the lab" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 0: Import Necessary Packages" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Import the necessary packages\n", "from SimPEG.utils import download\n", "from geoscilabs.seismic.syntheticSeismogram import InteractLogs, InteractDtoT, InteractWconvR, InteractSeismogram\n", "from geoscilabs.seismic.NMOwidget import ViewWiggle, InteractClean, InteractNoisy, NMOstackthree" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1 Normal Incidence Seismogram" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Backgrounds: Normal Incidence Seismogram" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We begin by constructing a reflectivity series from the physical property model. The physical properties characterizing the model are:\n", "- density ($\\rho$) and \n", "- seismic velocity ($v$)\n", "\n", "The acoustic impedance of each layer is:\n", "$$\n", "Z_i = \\rho_i v_i\n", "$$\n", "\n", "From acoustic impedance, the down-going reflection coefficient for each interface is given by\n", "$$\n", "r_{i,i+1} = \\frac{Z_{i+1}-Z_i}{Z_{i+1}+Z_i}\n", "$$\n", "\n", "and the transmission coefficient is\n", "$$\n", "t_{i,i+1} = \\frac{2Z_{i}}{Z_{i+1}+Z_i}\n", "$$\n", "\n", "\n", "#### Figure 1. Normal incidence for two layers model." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The true reflectivity accounts for both reflection and transmission. For the reflection off of the first layer, these are equivalent. For the reflection off of the second interface, the reflection coefficient $r_{2,3}$ in multiplied by $t_{1,2}t_{2,1}$ to get the true reflectivity. In the below plot, this effect of the transmission coefficients can be included or not using the toggle \"usingT.\"\n", "\n", "\n", "#### Figure 2. Normal incidence for three layers model." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Setup for constructing a synthetic seismogram" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We will consider a model consisting of two horizontal layers over a half-space. Each layer has density $\\rho_i$ and seismic velocity $v_i$. In this notebook, we will start from the physical property model and walk through how to construct a synthetic, normal incidence seismogram. \n", "\n", "\n", "#### Figure 3. Three layer model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.1 Reflection coefficient and Reflectivity\n", "### From Physical Properties to a Reflectivity Series" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Parameters of the below widget are:**\n", "\n", "- *d2*: depth of the interface between layer 1 and 2\n", "- *d3*: depth of the interface between layer 2 and 3\n", "- *rho1*: density of the layer 1 ($kg/m^3$)\n", "- *rho2*: density of the layer 2 ($kg/m^3$)\n", "- *rho3*: density of the layer 3 ($kg/m^3$)\n", "- *v1*: velocity of the layer 1 ($m/s$)\n", "- *v2*: velocity of the layer 2 ($m/s$)\n", "- *v3*: velocity of the layer 3 ($m/s$)\n", "- *usingT*: switch for considering transmission coefficient for reflectivity" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "LogVal = InteractLogs(v1=1500,v2=1500,v3=1500)\n", "LogVal" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.2 Depth to Time conversion" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we have the reflectivity series as a function of depth. With seismic, we measure a signal as a function of time. So we must apply a conversion from depth to time. We do this by computing the time it takes for a signal to reach a given depth and return to the surface. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "InteractDtoT(LogVal)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.3 Constructing the ideal seismogram\n", "### Wavelet $\\otimes$ Reflectivity = Seismogram" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now that we have the reflectivity series in time, the next step is to choose the input pulse and construct our seismogram. For the following examples, we will use a Ricker Wavelet with peak frequency $f$. \n", "\n", "A seismogram is the convolution of the wavelet and reflectivity series. Here, you can adjust the peak frequency (wavF) of the wavelet and its amplitude (wavA). \n", "\n", "The geologic model used is:\n", "" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "InteractWconvR();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.4 Vertical Resolution" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When referring to vertical resolution, the question to ask is: \"Can the two arrivals (one from the top, and one from the bottom of the layer) be distinguished?\" \n", "\n", "Adjust the layer thickness for the middle layer (by adjusting d2 and/or d3) and the frequency of the input pulse to investigate vertical resolution. You can also add noise to the trace. \n", "\n", "The geologic model is:\n", "\n", "\n", "You can adjust all of the parameters. Have fun!\n", "\n", "GPG section: http://gpg.geosci.xyz/content/seismic/seismic_reflection_interpretation.html" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Parameters of the below widget are:**\n", "\n", "- d2: depth of the interface between layer 1 and 2\n", "- d3: depth of the interface between layer 2 and 3\n", "- rho1: density of the layer 1 ($kg/m^3$)\n", "- rho2: density of the layer 2 ($kg/m^3$)\n", "- rho3: density of the layer 3 ($kg/m^3$)\n", "- v1: velocity of the layer 1 ($m/s$)\n", "- v2: velocity of the layer 2 ($m/s$)\n", "- v3: velocity of the layer 3 ($m/s$)\n", "- wavef: peak frequency of the Ricker wavelet\n", "- waveA: amplitude of Ricker wavelet\n", "- AddNoise: swith for adding noise \n", "- usingT: switch for considering transmission coefficient for reflectivity" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "InteractSeismogram();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Constructing a Normal Incidence Seismic Trace from CMP gather data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2.1 Sketch the problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "No app for this section. " ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## 2.2 From CMP gather to a Seismic Trace" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Background: Fit A Hyperbola to the Data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Each reflection event in a CMP gather has a travel time that corresponds to a hyperbola: $$ t(x) = \\sqrt{\\frac{x^2}{v^2_{stacking}} + t_0^2} \\\\$$ where $x$ is offset between source and receiver, $v_{stacking}$ is stacking velocity, and $t_0$ is the intercept time: $$ t_0 = \\sqrt{\\frac{4d^2}{v^2_{stacking}}} \\\\$$ where $d$ is the thickness of the first layer.\n", "\n", "- For each reflection event hyperbola, perform a velocity analysis to find $v_{stacking}$. This is done by first choosing $t_o$. Then choose a trial value of velocity. \n", "\n", "- Calculate the Normal Moveout Correction: Using the hyperbolia corresponding to $v_{stacking}$, compute the normal moveout for each trace and then adjust the reflection time by the amount $\\triangle T$: $$ \\triangle T = t_0-t(x) \\\\ $$ \n", "\n", "Estimate $t_0$, and a plausible $v_{stack}$ by altering t0 and v using below widget. This hyperbola will be drawn as red hyperbola on the middle panel. On the right panel we apply stack with the velocity that you fit, and provice stacked trace.\n", "\n", "GPG section: (http://gpg.geosci.xyz/content/seismic/seismic_reflection_stacking.html#)" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "### Two common-mid-point (CMP) gathers: Clean and Noisy" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We have two CMP gathers generated from different geologic models. One data set is clean and the other is contaminated with noise. The seismic data were adapted from SeismicLab (http://seismic-lab.physics.ualberta.ca/). \n", "\n", "In this section, we will walk through how to construct a normal incidence seismogram from these data sets.\n", "\n", "We will do this in the following steps:\n", "- Plot the data\n", "- Perform the NMO correction and stack for the clean data\n", "- Perform the NMO correction and stack for the noisy data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 1: Plot the data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As you can see from clean CMP gather, you can recognize that we have only have one reflector, meaning there is a single interface seperating two geologic units visible in these data. \n", "(Note: The direct and any refracted arrivals have been removed). \n", "\n", "It is difficult to distinguish any reflectors in the noisy data. However, there is a single reflector in these data, and we will perform normal moveout (NMO) and stacking operations to construct a normal-incidence seismogram where this reflector is visible. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Define path to required data files\n", "synDataFilePath = 'https://github.com/geoscixyz/geosci-labs/raw/main/assets/seismic/syndata1.npy'\n", "obsDataFilePath = 'https://github.com/geoscixyz/geosci-labs/raw/main/assets/seismic/obsdata1.npy'\n", "timeFilePath= 'https://github.com/geoscixyz/geosci-labs/raw/main/assets/seismic/time1.npy'\n", "\n", "# Download the data\n", "synData = download(synDataFilePath,overwrite=True,verbose=False)\n", "obsData = download(obsDataFilePath,overwrite=True,verbose=False)\n", "timeData = download(timeFilePath,overwrite=True,verbose=False)\n", "\n", "# Plot the data\n", "ViewWiggle(synData, obsData)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2: Perform the NMO correction and stack for the clean data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Parameters of the below widget to fit observed reflection event are:**\n", "\n", "- *t0*: intercept time of the hyperbola \n", "- *v*: velocity of the hyperbola" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Fit hyperbola to clean data\n", "clean = InteractClean(synData,timeData)\n", "clean" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 3: Applying NMO correction to the Noisy Data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Compared to the previous data set, this one is quite noisy. There is a reflector in the data, and your goal is to construct a stacked trace where this reflection is visible. \n", "\n", "Estimate $t_0$, and a plausible $v_{stack}$ by altering t0 and v using below widget. This hyperbola will be drawn as red hyperbola on the middle panel. On the right panel we apply stack with the velocity that you fit, and provice stacked trace." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "noisy = InteractNoisy(obsData, timeData)\n", "noisy" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the previous step, you chose an intercept time (t0) and a stacking velocity (v). Running below cell will generate trhee stacked traces:\n", "- Left: using t0 and v-200 m/s that we fit from Step 3\n", "- Middle: using t0 and v that we fit from Step 3\n", "- Right: using t0 and v+200 m/s that we fit from Step 3" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "NMOstackthree(obsData, noisy.kwargs[\"t0\"], noisy.kwargs[\"v\"]-200., noisy.kwargs[\"v\"], noisy.kwargs[\"v\"]+200., timeData)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.3 Finding the best hyperbola: Semblance analysis" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "No app for this section" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "celltoolbar": "Raw Cell Format", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" }, "widgets": { "state": { "091ab9522a5b4ae9818067c2986df721": { "views": [ { "cell_index": 13 } ] }, "6229161896c24757a0e95b1f2fe29946": { "views": [ { "cell_index": 37 } ] }, "6e1735073a7f44ff8fe76a8aee02d15a": { "views": [ { "cell_index": 16 } ] }, "8946a2423c9c4a20a6f3fa30ebc66168": { "views": [ { "cell_index": 19 } ] }, "e0f7586accd74e47b616ac0e9c150ee1": { "views": [ { "cell_index": 23 } ] }, "f34fcf8766774a13b48f5c463dba8d22": { "views": [ { "cell_index": 40 } ] } }, "version": "1.2.0" } }, "nbformat": 4, "nbformat_minor": 1 }