diff --git a/src/apis/gradient.jl b/src/apis/gradient.jl index 70346ea..e75846c 100644 --- a/src/apis/gradient.jl +++ b/src/apis/gradient.jl @@ -16,6 +16,7 @@ Bigger values speed up computation at the cost of using more memory. - `params::InputParameters{T, N}`: input parameters for the simulation, where T represents the data type and N represents the number of dimensions. They vary depending on the simulation kind (e.g., acoustic variable-density). - `matprop::MaterialProperties{T, N}`: material properties for the simulation, where T represents the data type and N represents the number of dimensions. They vary depending on the simulation kind (e.g., Vp only is required for an acoustic constant-density simulation). - `shots::Vector{<:Shot{T}}`: a vector whose elements are `Shot` structures. Each shot contains information about both source(s) and receiver(s). +- `misfit::Vector{<:AbstractMisfit{T}}`: a vector whose elements are misfit structures, i.e., subtypes of `AbstractMisfit`. See, for instance, [`L2Misfit`](@ref) and [`CCTSMisfit`](@ref). # Keyword arguments - `runparams::RunParameters`: a struct containing parameters related to forward calculations. See [`RunParameters`](@ref) for details. In case of a forward simulation, `gradparams` is set to `nothing`. @@ -64,6 +65,7 @@ Bigger values speed up computation at the cost of using more memory. - `wavesim::Union{WaveSimulation{T,N},Vector{<:WaveSimulation{T,N}}}`: input `WaveSimulation` object containing all required information to run the simulation. - `matprop::MaterialProperties{T, N}`: material properties for the simulation, where T represents the data type and N represents the number of dimensions. They vary depending on the simulation kind (e.g., Vp only is required for an acoustic constant-density simulation). - `shots::Vector{<:Shot{T}}`: a vector whose elements are `Shot` structures. Each shot contains information about both source(s) and receiver(s). +- `misfit::Vector{<:AbstractMisfit{T}}`: a vector whose elements are misfit structures, i.e., subtypes of `AbstractMisfit`. See, for instance, [`L2Misfit`](@ref) and [`CCTSMisfit`](@ref). # Keyword arguments - `runparams::RunParameters`: a struct containing parameters related to forward calculations. See [`RunParameters`](@ref) for details. In case of a forward simulation, `gradparams` is set to `nothing`. diff --git a/src/apis/misfit.jl b/src/apis/misfit.jl index aa7fffd..b4acdde 100644 --- a/src/apis/misfit.jl +++ b/src/apis/misfit.jl @@ -9,6 +9,7 @@ Receivers traces are stored in the receivers for each shot. - `params::InputParameters{T, N}`: input parameters for the simulation, where T represents the data type and N represents the number of dimensions. They vary depending on the simulation kind (e.g., acoustic variable-density). - `matprop::MaterialProperties{T, N}`: material properties for the simulation, where T represents the data type and N represents the number of dimensions. They vary depending on the simulation kind (e.g., Vp only is required for an acoustic constant-density simulation). - `shots::Vector{<:Shot{T}}`: a vector whose elements are `Shot` structures. Each shot contains information about both source(s) and receiver(s). +- `misfit::Vector{<:AbstractMisfit{T}}`: a vector whose elements are misfit structures, i.e., subtypes of `AbstractMisfit`. See, for instance, [`L2Misfit`](@ref) and [`CCTSMisfit`](@ref). # Keyword arguments - `parall::Symbol = :threads`: controls which backend is used for computation: @@ -52,6 +53,7 @@ Receivers traces are stored in the receivers for each shot. See also [`build_wav - `wavesim::Union{WaveSimulation{T,N},Vector{<:WaveSimulation{T,N}}}`: input `WaveSimulation` object containing all required information to run the simulation. - `matprop::MaterialProperties{T, N}`: material properties for the simulation, where T represents the data type and N represents the number of dimensions. They vary depending on the simulation kind (e.g., Vp only is required for an acoustic constant-density simulation). - `shots::Vector{<:Shot{T}}`: a vector whose elements are `Shot` structures. Each shot contains information about both source(s) and receiver(s). +- `misfit::Vector{<:AbstractMisfit{T}}`: a vector whose elements are misfit structures, i.e., subtypes of `AbstractMisfit`. See, for instance, [`L2Misfit`](@ref) and [`CCTSMisfit`](@ref). # Keyword arguments - `parall::Symbol = :threads`: controls which backend is used for computation: diff --git a/src/inversion/misfits/CCTSMisfit.jl b/src/inversion/misfits/CCTSMisfit.jl index b442978..80145c7 100644 --- a/src/inversion/misfits/CCTSMisfit.jl +++ b/src/inversion/misfits/CCTSMisfit.jl @@ -1,3 +1,13 @@ + +@doc """ + +$(TYPEDEF) + +Cross-correlation time-shift misfit. + +$(TYPEDFIELDS) + +""" struct CCTSMisfit{T, D, OA <: AbstractArray{T, D}} <: AbstractMisfit{T} dt::T std::T diff --git a/src/inversion/misfits/L2Misfit.jl b/src/inversion/misfits/L2Misfit.jl index 3515d0e..986fac2 100644 --- a/src/inversion/misfits/L2Misfit.jl +++ b/src/inversion/misfits/L2Misfit.jl @@ -1,4 +1,13 @@ +@doc """ + +$(TYPEDEF) + +L2-norm misfit. + +$(TYPEDFIELDS) + +""" struct L2Misfit{T, D, OA <: AbstractArray{T, D}, IM <: AbstractMatrix{T}} <: AbstractMisfit{T} observed::OA invcov::IM