Coder Social home page Coder Social logo

About the results about deepwave HOT 27 CLOSED

ar4 avatar ar4 commented on August 29, 2024
About the results

from deepwave.

Comments (27)

ar4 avatar ar4 commented on August 29, 2024

Greetings,

I ran your code and obtained a receiver_amplitudes of shape [250, 300, 2], as expected, and the result looked plausible. To be certain, I have pasted the code that I ran, and attached the output that I received. Does this code produce a receiver_amplitudes of shape [250, 300, 1] for you? If so, did you receive any warning messages while running it?
receiver0
receiver1

import deepwave as dp
import numpy as np
import torch as tr

data = np.ones([201, 301], np.float32)*2500

dx = 10 # 10m in each dimension
dt = 0.004 # 4ms --- Sampling Interval
nz = np.shape(data)[0]
ny = np.shape(data)[1]
nt = int(1 / dt) # 1s --- Sampling freq
r_spacing = dx*(ny-1)
s_spacing = dx
ymax = (ny-1)*dx
num_shots = int(np.floor(ymax / s_spacing))
coord_receivers = tr.linspace(0,ymax,2)
num_receivers_per_shot = int(len(coord_receivers))
num_sources_per_shot = 1
num_dims = 2
peak_freq = 4
peak_source_time = 1/peak_freq

model = tr.tensor(data)

"""
source and receiver position --- x_s -> Tensor of shape [num_shots, num_sources_per_shot, num_dimensions]
--- x_r -> Tensor of shape [num_shots, num_receivers_per_shot, num_dimensions]
"""

x_r = tr.zeros(num_shots,num_receivers_per_shot,num_dims)
for j in range(num_receivers_per_shot):
  x_r[:,j,1] = coord_receivers[j] #receiver potition

x_s = tr.zeros(num_shots, num_sources_per_shot, num_dims)
for j in range(num_sources_per_shot):
  x_s[:,0,1] = tr.linspace(ymax/2, ymax, num_shots) #sources potition
  x_s[:,0,0] = 100#tr.linspace(0,(nz-1)*dx, len(x_s[:,0,1])) #depth

source_amplitudes = (dp.wavelets.ricker(peak_freq, nt, dt,
peak_source_time).reshape(-1, 1, 1).repeat(1, num_shots, num_sources_per_shot))

prop = dp.scalar.Propagator({'vp': model}, dx)
receiver_amplitudes = prop(source_amplitudes, x_s, x_r, dt)

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

What was the input shape to print it like this? you used plt.imshow()? the shape of result is [nt, num_shots, num_receivers_per_shot], yes?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

I think you are asking what command I used to create the two plots in my previous message. I used plt.imshow(receiver_amplitudes[...,0]) and plt.imshow(receiver_amplitudes[...,1]) to produce them, plotting the data recorded by each of the two receivers.

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

so in our example x is the shot of each source and y the time, yes?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

Yes.

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

also, instead of x_s[:,0,0] = 100 for depth, can i use , x_s[:,0,0] = tr.linspace(0,(nz-1)*dx, len(x_s[:,0,1])) in order to have for each source different depth? the shots are made one after the other and not simultaneously ,yes?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

That should work, although note that the source will be moved to the nearest cell - if the cell size is 10x10m then a source located at (5, 5)m will be moved to (10,10)m, for example.

I am not sure what you are referring to when you ask about simultaneous shots. I can think of two possibilities:

  1. The num_sources_per_shot refers to how many sources will be used in each shot. If you wish for each shot to only contain one source (so no simultaneous sources) then this should be set to 1. It is set to 1 in the example code above, so the data in receiver_amplitudes[:,0,:] will only involve the source located at x_s[0,0,:], for example.
  2. You may also be asking about whether parallel processing is used to perform the propagation in parallel. It is.

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

Perfect, thank you!

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

How can i increase the duration of the time of recording? by increasing 'nt'?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

the coordinates -position of receiver and source should be in real distance or pixel?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

The result is the total displacement or there is a specific orientation for example horizontal-vertical? Thanks again :)

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

so it's acceleration?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

pressure is also a vector

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

ok, can you suggest any way to calculate displacement?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

You mean: ΔP=-x , where ΔP the differential pressure and x the displacement? Also, how can i separate the vertical or horizontal component if the pressure is scalar?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

I wanted to ask, if its scalar and it depicts the total, how can calculate the displacement in a direction for example vertically?

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

from deepwave.

Ge0sz avatar Ge0sz commented on August 29, 2024

Now yes! Thanks again

from deepwave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.