Common Midpoint

Simulating a common midpoint (CMP) survey is relatively easy in SeidarT. A typical CMP is likely to have a fixed linear array and multiple source points along the array, although there are many different techniques for achieving different results. This tutorial creates a single source point, but can easily be expanded to having multiple source points (and/or multiple array layouts) by duplicating the project file for each source location, changing the source location in the project file and rerunning the model, or by looping through an array of source locations in a Python script. The Fortran binary files corresponding to each model run will contain the source location in the filename so that each model doesn’t overwrite the previous model.

The general steps to create a single shot survey are:

  1. Build the project file

  2. Create the receiver file. This is a CSV delimited file with header fields X,Y,Z. The values can be the indices of the receiver (i.e. nodal point) or the distance from the origin - \(\Delta x_i \cdot \text{Indice}_{\text{rcx}}\). The origin is defined as the top left corner of the model PNG.

  3. Load the project file. This creates the model, domain, and material objects required for modeling.

  4. Create source function.

  5. Generate tensor coefficients for each material. The example below corresponds to a project file that already has tensor coefficients. These can be edited and loaded into the model objects.

  6. Run the model.

  7. Create the Array object.

  8. Visualize and/or save outputs.

Below is a simple template for a single shot survey for a 91 channel linear array at the surface. All of the files including the source code can be found in the Seidart-Recipes repo in src/seidart-recipes/single_source folder.

 1import numpy as np
 2from seidart.routines import prjbuild, prjrun, sourcefunction
 3from seidart.routines.arraybuild import Array
 4from seidart.visualization.im2anim import build_animation
 5
 6# Define the necessary files. Adjust the relative paths if necessary.
 7prjfile = 'single_source.prj'
 8rcxfile = 'receivers.xyz'
 9
10# Initiate the model and domain objects
11dom, mat, seis, em = prjrun.domain_initialization(prjfile)
12
13# Compute the permittivity coefficients and check to make sure the project file has all required values
14prjrun.status_check(
15    em, mat, dom, prjfile, seismic = False, append_to_prjfile = True
16)
17
18# Create the source function
19timevec, fx, fy, fz, srcfn = sourcefunction(em, 10, 'gaus1', 'e')
20
21# The non-complex equations aren't necessary but are also a solution to the PDE
22complex_values = False
23prjrun.runelectromag(em, mat, dom, use_complex_equations = complex_values)
24
25# Create the array object
26array_ex = Array('Ex', prjfile, rcxfile, is_complex = complex_values)
27# Add an AGC function for visualization
28array_ex.gain = int(em.time_steps/3)
29# We need to scale the axes
30array_ex.exaggeration = 0.1
31# Create the plot
32array_ex.sectionplot(
33    plot_complex = False
34)
35
36# Create the GIF so that we can view the wavefield
37build_animation(
38        prjfile,
39        'Ex', 10, 10, 0.3,
40        is_complex = complex_values,
41        is_single_precision = True
42)
43
44# --------------------------------------------------------------------------
45# We can do the same for the vertical electric field as above
46array_ez = Array('Ez', prjfile, rcxfile, is_complex = complex_values)
47array_ez.gain = int(em.time_steps/3)
48array_ez.exaggeration = 0.1
49array_ez.sectionplot(
50    plot_complex = False
51)
52build_animation(
53        prjfile,
54        'Ex', 10, 10, 0.3,
55        is_complex = complex_values,
56        is_single_precision = True,
57        plottype = 'energy_density'
58)