Abstract Vectors

JUDI provides abstract vector types that encapsulate seismic related objects. In particula, JUDI defines thre main types for seismic data judiVector, full time-space wavefields judiWavefield and extended source weights judiWeights.

At the core of JUDI's vector types is the abstract type judiMultiSourceVector that represent a dimensionalized Vector{Array} where each sub-array correspond to a single source. All JUDI vector types inhert from this abstract type that implements most of the arithmetic and julia core utilities. As an abstract types, judiMultiSourceVector should not be instantiated but new concrete types based on it should be created if one desire to create its own JUDI multi-source vector type.

All sub-type of judiMultiSourceVector must implement the following methods to be compatible with JUDI. The following JUDI core types are examples of sub-types.

judiVector

The class judiVector is the basic data structure for seismic shot records or seismic sources. From JUDI's perspective, both are treated the same and can be multiplied with modeling operators.

Construction:

In the most basic way, judiVectors are contstructed from a Geometry object (containing either source or receiver geometry) and a cell array of data:

JUDI.judiVectorMethod
judiVector
    nsrc::Integer
    geometry::Geometry
    data::Vector

Abstract vector for seismic data. This vector-like structure contains the geometry and data for either
receiver data (shot records) or source data (wavelets).

Constructors

Construct vector from Geometry structure and cell array of shot records or wavelets. The data keyword
can also be a single (non-cell) array, in which case the data is the same for all source positions:

judiVector(geometry, data)

Construct vector for observed data from SeisBlock. segy_depth_key is the SegyIO keyword
that contains the receiver depth coordinate:

judiVector(SeisBlock; segy_depth_key="RecGroupElevation")

Construct vector for observed data from out-of-core data container of type SeisCon:

judiVector(SeisCon; segy_depth_key="RecGroupElevation")

Examples

(1) Construct data vector from Geometry structure and a cell array of shot records:

dobs = judiVector(rec_geometry, shot_records)

(2) Construct data vector for a seismic wavelet (can be either cell arrays of individual
wavelets or a single wavelet as an array):

q = judiVector(src_geometry, wavelet)

(3) Construct data vector from SeisBlock object:

using SegyIO
seis_block = segy_read("test_file.segy")
dobs = judiVector(seis_block; segy_depth_key="RecGroupElevation")

(4) Construct out-of-core data vector from SeisCon object (for large SEG-Y files):

using SegyIO
seis_container = segy_scan("/path/to/data/directory","filenames",["GroupX","GroupY","RecGroupElevation","SourceDepth","dt"])
dobs = judiVector(seis_container; segy_depth_key="RecGroupElevation")
source

Access fields (in-core data containers):

# Access i-th shot record
x.data[i]

# Extract judiVector for i-th shot
x1 = x[i]

# Access j-th receiver location of i-th shot
x.geometry.xloc[i][j]

Access fields (out-of-core data containers):

# Access data container of i-th shot
x.data[i]

# Read data from i-th shot into memory
x.data[i][1].data

# Access out-of-core geometry
x.geometry

# Load OOC geometry into memory
Geometry(x.geometry)

Operations:

In-core judiVectors can be used like regular Julia arrays and support common operations such as:

x = judiVector(geometry, data)

# Size (as if all data was vectorized)
size(x)

# Norms
norm(x)

# Inner product
dot(x, x)

# Addition, subtraction (geometries must match)
y = x + x
z = x - y

# Scaling
α = 2f0
y = x * α

# Concatenate
y = vcat(x, x)

judiWavefield

Abstract vector class for wavefields.

Construction:

JUDI.judiWavefieldType

judiWavefield nsrc::Integer dt::AbstractFloat data

Abstract vector for seismic wavefields.

Constructors

Construct wavefield vector from an info structure, a cell array of wavefields and the computational
time step dt:

judiWavefield(nsrc, dt, data)
source

Access fields:

# Access wavefield from i-th shot location
u.data[i]

Operations:

Supports some basic arithmetric operations:

# Size 
size(u)

# Norms
norm(u)

# Inner product 
dot(u, y)

# Addition, subtraction
v = u + u
z = u - v

# Absolute value
abs(u)

# Concatenation
v = vcat(u, u)

judiRHS

Abstract vector class for a right-hand-side (RHS). A RHS has the size of a full wavefield, but only contains the data of the source wavelet of shot records in memory, as well as the geometry information of where the data is injected during modeling.

Construction:

rhs = judiRHS(geometry, data)

A JUDI RHS can also be constructed by multplying a judiVector and the corresponding transpose of a judiProjection operator:

rhs1 = Ps'*q
rhs2 = Pr'*d_obs

where Ps and Pr are judiProjection operators for sources and receivers respectively and q and d_obs are judiVectors with the source and receiver data.

Access fields:

Accessible fields include:

# Source/receiver data
rhs.data

# Source/receiver geometry
rhs.geometry

# Info structure
rhs.info

judiWeights

Abstract vector class for extended source weights. The weights for each shot location have the dimensions of the model (namely model.n).

Construction:

JUDI.judiWeightsMethod
judiWeights
    nsrc
    weights

Abstract vector for weighting an extended source, which is injected at every grid point, as weighted by this vector. Constructors ============ Construct vector cell array of weights. The weights keyword
can also be a single (non-cell) array, in which case the weights are the same for all source positions: judiWeights(weights; nsrc=1)

source

Parameters:

  • weights: Cell array with one cell per shot location. Each cell contains a 2D/3D Julia array with the weights for the spatially extended source. Alternatively: pass a single Julia array which will be used for all source locations.

Access fields:

# Access weights of i-th shot locatoin
w.weights[i]

Operations:

Supports the same arithmetric operations as a judiVector.