.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/tutorials/timedomain.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_tutorials_timedomain.py: 09. Transient CSEM ================== The computation of ``emg3d`` happens in the frequency domain (or Laplace domain), each frequency requires a new computation. Using (inverse) Fourier transforms, we can also compute time-domain (transient) CSEM data with ``emg3d``. This is not (yet) implemented in easy, user-friendly functions. It does require quite some input and knowledge from the user, particularly with regards to the gridding. A good starting point to model time-domain data with ``emg3d`` is [WeMS21]_. You can find the paper and all the notebooks in the repo https://github.com/emsig/article-TDEM . The following is a simple example from the above article, the time-domain modelling of a fullspace. It based on the first example (Figures 3-4) of [MuWS08]_. Interactive frequency selection ------------------------------- The most important factor in fast time-domain computation is the frequency selection. You can find an interactive GUI for this in the repo https://github.com/emsig/frequency-selection . A screenshot of the GUI for the interactive frequency selection is shown in the following figure: .. figure:: ../../_static/images/GUI-freqselect.png :scale: 66 % :align: center :alt: Frequency-selection App :name: freqselect The GUI uses the 1D modeller ``empymod`` for a layered model, and internally the ``Fourier`` class of the 3D modeller ``emg3d``. The following parameters can be specified interactively: - points per decade - frequency range (min/max) - offset - Fourier transform (FFTLog or DLF with different filters) - signal (impulse or switch-on/-off) Other parameters have to be specified fix when initiating the widget. .. GENERATED FROM PYTHON SOURCE LINES 51-58 .. code-block:: default import emg3d import empymod import numpy as np import matplotlib.pyplot as plt plt.style.use('bmh') .. GENERATED FROM PYTHON SOURCE LINES 59-72 Model and Survey ---------------- Model ````` - Homogeneous fullspace of 1 Ohm.m. Survey `````` - Source at origin. - Receiver at an inline-offset of 900 m. - Both source and receiver are x-directed electric dipoles. .. GENERATED FROM PYTHON SOURCE LINES 72-80 .. code-block:: default src_coo = [0, 0, 0, 0, 0] source = emg3d.TxElectricDipole(src_coo) rec_coo = [900, 0, 0, 0, 0] resistivity = 1 # Fullspace resistivity depth = [] .. GENERATED FROM PYTHON SOURCE LINES 81-89 Fourier Transforms parameters ----------------------------- We only compute frequencies :math:`0.05 < f < 21` Hz, which yields enough precision for our purpose. This means, instead of 30 frequencies from 0.0002 - 126.4 Hz, we only need 14 frequencies from 0.05 - 20.0 Hz. .. GENERATED FROM PYTHON SOURCE LINES 89-110 .. code-block:: default # Define desired times. time = np.logspace(-2, 1, 201) # Initiate a Fourier instance Fourier = emg3d.Fourier( time=time, fmin=0.05, fmax=21, ft='fftlog', # Fourier transform to use ftarg={'pts_per_dec': 5, 'add_dec': [-2, 1], 'q': 0}, ) # Dense frequencies for comparison reasons freq_dense = np.logspace( np.log10(Fourier.freq_required.min()), np.log10(Fourier.freq_required.max()), 301, ) .. rst-class:: sphx-glr-script-out .. code-block:: none time [s] : 0.01 - 10 : 201 [min-max; #] Fourier : FFTLog > pts_per_dec : 5 > add_dec : [-2. 1.] > q : 0.0 Req. freq [Hz] : 0.000200364 - 126.421 : 30 [min-max; #] Calc. freq [Hz] : 0.0503292 - 20.0364 : 14 [min-max; #] .. GENERATED FROM PYTHON SOURCE LINES 111-113 Frequency-domain computation ---------------------------- .. GENERATED FROM PYTHON SOURCE LINES 113-173 .. code-block:: default # Automatic gridding settings. grid_opts = { 'center': src_coo[:3], # Source location 'domain': [[-200, 1100], [-50, 50], [-50, 50]], 'properties': resistivity, # Fullspace resistivity. 'min_width_limits': [20., 40.], # Restrict cell width within survey domain 'min_width_pps': 12, # Many points to have small min cell width 'stretching': [1, 1.3], #
 Wed Aug 31 21:38:46 2022 CEST OS Linux CPU(s) 4 Machine x86_64 Architecture 64bit RAM 15.5 GiB Environment Python File system ext4 Python 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:22:55) [GCC 10.3.0] numpy 1.22.4 scipy 1.9.0 numba 0.55.2 emg3d 1.8.0 empymod 2.2.0 xarray 2022.6.0 discretize 0.8.2 h5py 3.7.0 matplotlib 3.4.3 tqdm 4.64.0 IPython 8.4.0 Intel(R) oneAPI Math Kernel Library Version 2022.0-Product Build 20211112 for Intel(R) 64 architecture applications