Closed rafaelorozco closed 2 years ago
Varying Density values that trigger rho parameterization give an error. for example this density setup:
rho
using JUDI n = (120, 100) # (x,y,z) or (x,z) d = (10., 10.) o = (0., 0.) v = ones(Float32,n) .+ 0.5f0 v[:,Int(round(end/2)):end] .= 3.5f0 rho = ones(Float32,n) ; rho[1,1] = .09;# error but .1 makes rho go to b and then it is happy m = (1f0 ./ v).^2 nsrc = 2 # number of sources model = Model(n, d, o, m;rho=rho) nxrec = 120 xrec = range(0f0, stop=(n[1]-1)*d[1], length=nxrec) yrec = 0f0 # WE have to set the y coordiante to zero (or any number) for 2D modeling zrec = range(d[1], stop=d[1], length=nxrec) timeD = 1250f0 # receiver recording time [ms] dtD = 2f0 # receiver sampling interval [ms] recGeometry = Geometry(xrec, yrec, zrec; dt=dtD, t=timeD, nsrc=nsrc) xsrc = convertToCell(range(0f0, stop=(n[1]-1)*d[1], length=nsrc)) ysrc = convertToCell(range(0f0, stop=0f0, length=nsrc)) zsrc = convertToCell(range(d[1], stop=d[1], length=nsrc)) srcGeometry = Geometry(xsrc, ysrc, zsrc; dt=dtD, t=timeD) f0 = 0.01f0 # kHz wavelet = ricker_wavelet(timeD, dtD, f0) q = judiVector(srcGeometry, wavelet) opt = Options(subsampling_factor=2, dt_comp=1.0) Pr = judiProjection(recGeometry) F = judiModeling(model; options=opt) Ps = judiProjection(srcGeometry) dobs = Pr*F*adjoint(Ps)*q
errors out with this message.
julia> dobs = Pr*F*adjoint(Ps)*q ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/rorozcom3/.julia/packages/PyCall/7a7w0/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'ValueError'> ValueError('Unrecognized argument rho=rho(x, y)') File "/home/rorozcom3/.julia/packages/JUDI/XZMNj/src/pysource/interface.py", line 40, in forward_rec rec, _, _ = forward(model, src_coords, rec_coords, wavelet, save=False, File "/home/rorozcom3/.julia/packages/JUDI/XZMNj/src/pysource/propagators.py", line 57, in forward summary = op(**kw) File "/home/rorozcom3/.local/lib/python3.8/site-packages/devito/operator/operator.py", line 609, in __call__ return self.apply(**kwargs) File "/home/rorozcom3/.local/lib/python3.8/site-packages/devito/operator/operator.py", line 675, in apply args = self.arguments(**kwargs) File "/home/rorozcom3/.local/lib/python3.8/site-packages/devito/operator/operator.py", line 557, in arguments args = self._prepare_arguments(**kwargs) File "/home/rorozcom3/.local/lib/python3.8/site-packages/devito/operator/operator.py", line 442, in _prepare_arguments raise ValueError("Unrecognized argument %s=%s" % (k, v))
If this check is true and it gets parameterized by b then the error does not show up.
b
Varying Density values that trigger
rho
parameterization give an error. for example this density setup:errors out with this message.
If this check is true and it gets parameterized by
b
then the error does not show up.