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

arrival anomaly #28

Open
oldstylejoe opened this issue Mar 24, 2024 · 2 comments
Open

arrival anomaly #28

oldstylejoe opened this issue Mar 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@oldstylejoe
Copy link
Collaborator

First reported by Denton Woods on email:
I was doing a very simple isospeed profile run where the source and
receivers were at the same depth, with the receivers just marching out in
range in 10 cm increments. I was only looking at the direct path entries,
thus multiplying the delay variable by c should always equal the range. Most
of the time, that is true, but for some entries, they do not match up. In
fact, for those bad entries, they will be 10 cm farther. So instead of
seeing values for c*t of 10.0, 10.1, 10.2, 10.3, etc., I would see something
like 10.0 10.1, 10.3, 10.3. Out of curiosity, I checked out the commit
(ca51464) before pull request #26 was
merged in, and that fixed the issue. I can send you my .env file if that
would be helpful.

@oldstylejoe oldstylejoe added the bug Something isn't working label Mar 24, 2024
@oldstylejoe oldstylejoe self-assigned this Mar 24, 2024
@DentonW
Copy link

DentonW commented Mar 24, 2024

I have attached the .env file here and the results of running the latest and prior commits:
Bellhop-Eigenray.env.txt
BellhopCxx-Eigenray.arr.txt
BellhopCxx-Older-Eigenray.arr.txt

Since the direct path arrivals are easier to interpret and verify, I pulled those out of both arrival files:
BellhopCxx-DirectPath.txt
BellhopCxx-Older-DirectPath.txt

You can see that in BellhopCxx-DirectPath.txt, it has the time (7.99999980E-04 s) repeated on lines 13 and 14 for two different receiver ranges. There are other examples of this happening in the file, along with an NAN on line 47. The prior commit has correct values.

@oldstylejoe
Copy link
Collaborator Author

@DentonW I pushed a version to the DirectPath branch that fixes this issue. When bellhop finds a given ray segment that influences a receiver, bellhop linearly interpolates between the two ends of the segment to calculate things like delay time. The interpolation has a typo in the OAlib implementation that we faithfully copied over to bhc. When a user pointed it out, I then fixed wrong as you caught, sigh. The math is correct now so the delays should work as expected (great test, btw).
This is reopening problems with the interpolation going haywire in 3D, but that's a different issue.
Could you please verify that your issue is fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants