Skip to content

Commit dce6526

Browse files
committed
revert to default behaviour
1 parent 3649e73 commit dce6526

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

src/jop_prop2DAcoIsoDenQ_DEO2_FDTD.jl

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function JetProp2DAcoIsoDenQ_DEO2_FDTD(;
3535
wavelet = WaveletCausalRicker(f=5.0),
3636
freesurface = false,
3737
imgcondition = "standard",
38+
RTM_weight = 0.5,
3839
nthreads = Sys.CPU_THREADS,
3940
reportinterval = 500)
4041
# active and passive earth model properties. The active set is in the model-space
@@ -175,6 +176,7 @@ function JetProp2DAcoIsoDenQ_DEO2_FDTD(;
175176
nbx_inject = nbx_inject,
176177
wavelet = wavelet,
177178
freesurface = freesurface,
179+
RTM_weight,
178180
imgcondition = get(icdict, lowercase(imgcondition), WaveFD.ImagingConditionStandard()),
179181
nthreads = nthreads,
180182
reportinterval = reportinterval,
@@ -363,7 +365,11 @@ Defaults for arguments are shown inside square brackets.
363365
* `imgcondition` ["standard"] Selects the type of imaging condition used. Choose from "standard", "FWI",
364366
and "RTM". "FWI" and "RTM" will perform Kz wavenumber filtering prior to the imaging condition
365367
in order to promote long wavelengths (for FWI), or remove long wavelength backscattered energy (for
366-
RTM). Note the true adjoint only exists for "standard" imaging condition currently.
368+
RTM). "MIX" mixes the FWI imaging condition using the parameter RTM_weight. Note the true adjoint
369+
only exists for "standard" imaging condition currently.
370+
* `RTM_weight` determines the balance of short wavelengths and long wavelengths in the imaging condition.
371+
A value of 0.0 is equivalent to the FWI imaging condition, a value of 0.5 is equivalent to the standard
372+
imaging condtion, and a value of 1.0 is equivalent to the RTM imaging condition.
367373
* `nthreads [Sys.CPU_THREADS]` The number of threads to use for OpenMP parallelization of the modeling.
368374
* `reportinterval [500]` The interval at which information about the propagtion is logged.
369375
@@ -727,10 +733,21 @@ function JopProp2DAcoIsoDenQ_DEO2_FDTD_df′!(δm::AbstractArray, δd::AbstractA
727733
end
728734

729735
δm_ginsu = Dict{String,Array{Float32,2}}()
736+
737+
# Temporary model updates if mixed imaging condition used.
738+
if kwargs[:imgcondition] === WaveFD.ImagingConditionWaveFieldSeparationMIX()
739+
δm_RTM = Dict{String,Array{Float32,2}}()
740+
δm_All = Dict{String,Array{Float32,2}}()
741+
end
742+
730743
for prop in keys(kwargs[:active_modelset])
731744
δm_ginsu[prop] = zeros(Float32, nz_ginsu, nx_ginsu)
745+
if kwargs[:imgcondition] === WaveFD.ImagingConditionWaveFieldSeparationMIX()
746+
δm_RTM[prop] = zeros(Float32, nz_ginsu, nx_ginsu)
747+
δm_All[prop] = zeros(Float32, nz_ginsu, nx_ginsu)
748+
end
732749
end
733-
750+
734751
ginsu_interior_range = interior(kwargs[:ginsu])
735752

736753
# Get receiver interpolation coefficients
@@ -804,10 +821,23 @@ function JopProp2DAcoIsoDenQ_DEO2_FDTD_df′!(δm::AbstractArray, δd::AbstractA
804821
end
805822

806823
# born accumulation
807-
if kwargs[:imgcondition] === WaveFD.ImagingConditionStandard() || kwargs[:imgcondition] === WaveFD.ImagingConditionWaveFieldSeparationFWI() || kwargs[:imgcondition] === WaveFD.ImagingConditionWaveFieldSeparationFWI()
824+
if kwargs[:imgcondition] !== WaveFD.ImagingConditionWaveFieldSeparationMIX()
825+
# Standard born accumulation for FWI, RTM, or standard imaging condition
808826
cumtime_im += @elapsed WaveFD.adjointBornAccumulation!(p, kwargs[:modeltype], kwargs[:imgcondition], δm_ginsu, wavefields)
809827
else
810-
cumtime_im += @elapsed WaveFD.adjointBornAccumulation!(p, kwargs[:modeltype], kwargs[:imgcondition], δm_ginsu, wavefields,0.0)
828+
# Born accumulation for mix imaging condition
829+
imcon = WaveFD.ImagingConditionStandard()
830+
cumtime_im += @elapsed WaveFD.adjointBornAccumulation!(p, kwargs[:modeltype], imcon, δm_All, wavefields)
831+
832+
imcon = WaveFD.ImagingConditionWaveFieldSeparationRTM()
833+
cumtime_im += @elapsed WaveFD.adjointBornAccumulation!(p, kwargs[:modeltype], imcon, δm_RTM, wavefields)
834+
835+
weightAll = 1.0f0 - kwargs[:RTM_weight]
836+
weightShort = 2.0f0*kwargs[:RTM_weight] - 1.0f0
837+
838+
for prop in keys(kwargs[:active_modelset])
839+
δm_ginsu[prop] = (δm_All[prop] .* weightAll) .+ (δm_RTM[prop] .* weightShort)
840+
end
811841
end
812842
end
813843
end

0 commit comments

Comments
 (0)