Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I set the setup of a survey? #25

Closed
Ge0sz opened this issue Mar 23, 2021 · 2 comments
Closed

how can I set the setup of a survey? #25

Ge0sz opened this issue Mar 23, 2021 · 2 comments

Comments

@Ge0sz
Copy link

Ge0sz commented Mar 23, 2021

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

@ar4
Copy link
Owner

ar4 commented Mar 24, 2021

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?

@Ge0sz
Copy link
Author

Ge0sz commented Mar 24, 2021

Yes, thank you very much!

@Ge0sz Ge0sz closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants