ar4 / deepwave

Wave propagation modules for PyTorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how can I set the setup of a survey?

Ge0sz opened this issue · comments

commented

Greetings,
I have a problem with setting the source and receiver coordinates. I want to 2 receivers (in the start and end) and multiple sources in between. How do we set the position of them? Also, can we set the source to be in depth? Thanks in advance

Greetings,

The x_s and x_r variables that you see in the examples are the source and receiver coordinates, respectively. In the FWI example you will find that these coordinates are set using these lines:

# Create arrays containing the source and receiver locations
# x_s: Source locations [num_shots, num_sources_per_shot, num_dimensions]
# x_r: Receiver locations [num_shots, num_receivers_per_shot, num_dimensions]
x_s = torch.zeros(num_shots, num_sources_per_shot, num_dims)
x_s[:, 0, 1] = torch.arange(num_shots).float() * source_spacing
x_r = torch.zeros(num_shots, num_receivers_per_shot, num_dims)
x_r[0, :, 1] = torch.arange(num_receivers_per_shot).float() * receiver_spacing
x_r[:, :, 1] = x_r[0, :, 1].repeat(num_shots, 1)

I hope it is clear what these lines are doing, and how you can modify them to suit your needs.

You provide the coordinates with the same number of dimensions as you are using in your model. So, for a 2D experiment, you would provide 2 values for each coordinate. Thus, yes, you can specify the depth.

In your case, you would probably do something like:

x0 = <x coordinate of beginning of survey relative to the start of the model>
x1 = <x coordinate of end of survey relative to the start of the model>
zs = <depth of shots>
num_shots = <number of shots in survey>
x_r = torch.zeros(num_shots,2,2);
x_r[:,0,1] = x0
x_r[:,1,1] = x1 
x_s = torch.zeros(num_shots, 1, 2)
x_s[:,0,0] = zs
x_s[:,0,1] = torch.linspace(x0, x1, num_shots)

Does that answer your question?

commented

Yes, thank you very much!