org-arl / arlpy

ARL Python Tools
BSD 3-Clause "New" or "Revised" License
119 stars 37 forks source link

Arlpy donot plot correctly #12

Closed ZHANGGU closed 5 years ago

ZHANGGU commented 5 years ago

Hei

I can see arlpy.plot_ray will not show the rays who have the maks number of bottom bounces.

Some times, I can see it has some reasons coz no returning rays will be shown.

In my trial, I can see that the ray that has max bottom bounces is appearent correct.

On draging the plot, the hided plot is shown. see below zooming in 2018-10-31_15-31-39 2018-10-31_15-36-27

mchitre commented 5 years ago

Thanks for reporting and taking the time to annotate the plots.

However, I don't understand the issue. The 2 plots seem to be the same, other than zooming, and I don't understand what the red arrows point to. Could you share the code snippet of what you are trying to simulate, and what you expect as a plot, and I might be able to understand better.

ZHANGGU commented 5 years ago

In your uwapm.py, loop " for _, row in rays.iterrows():", where the rays who has the maximum bottom bounces are hided by the code c = int(255*_np.abs(row.bottom_bounces)/max_amp) # c=255 once the rays of maximum bottom bounces c = _bokeh.colors.RGB(c, c, c) # color for plotting will be white

This is what I am pointing out: the rays of maximum bottom bounces will be hided by plotting the color of WHITE. Once dragging the plot, the WHITE ray will be shown some how.

Do you give any reasons?

PS: I see that some returning rays if all rays are computed, and this method can hide the returning rays.

mchitre commented 5 years ago

Ah! I understand what you mean. The color map is such that some rays become white. I'll change the color map in the next release to fix this.

ZHANGGU commented 5 years ago

Thanks. It is not easy :-) once you turn on plotting all rays, there comes another issue. Coz the plot func is reused for plotting all rays, too. For all rays, there are returning rays ( see the figure), and I do not know why it happens and how to void those, do you have any advice? Per today, this method will not show the returnning rays. 2018-11-01_07-14-14

mchitre commented 5 years ago

I don't understand what you mean by "returning rays". The way Bellhop calculates eigenrays is to send out a fan of rays and pick the ones that pass close to the receiver. As a result, you often get 2 closely spaced rays going on each side of the receiver. Is that way you are referring to?

Also, would help for me to see your code snippet to understand what you are simulating.

ZHANGGU commented 5 years ago

See the picture as below, it is a ray from computation of all rays (1000m to Rx) not just eigen rays. This ray computation shows that it returns after 430 m. How to void such returning rays which exist among the all ray computations. 2018-11-01_07-14-14

mchitre commented 5 years ago

Ok, I understand what you mean by "returning rays" now. They should not exist, there's probably some bug in decoding the ray file. Can you give me a sample script that can replicate this, so I can track down the bug and squash it?

ZHANGGU commented 5 years ago

Hei

Enclosed are env and bty files.

As talked, these returning rays come from BELLHOP computation, not your python.

I am confused, how they come and how to void those in the results

Thanks again

Regards

Guosong

From: Mandar Chitre [mailto:notifications@github.com] Sent: torsdag 1. november 2018 08:10 To: org-arl/arlpy arlpy@noreply.github.com Cc: ZHANGGU GUOSONG.ZHANG@HOTMAIL.COM; Author author@noreply.github.com Subject: Re: [org-arl/arlpy] Arlpy donot plot correctly (#12)

Ok, I understand what you mean by "returning rays" now. They should not exist, there's probably some bug in decoding the ray file. Can you give me a sample script that can replicate this, so I can track down the bug and squash it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Forg-arl%2Farlpy%2Fissues%2F12%23issuecomment-434952473&data=02%7C01%7C%7Cb23ae3fc2a1d4964164208d63fc8fda9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636766529805148615&sdata=K62sjK3P8Ag57TUDetzA7RSke5pIPowi7h0aJRbCLCg%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH-kfIjzUAcE-0sa3w2iS2eAsH1d6vRvks5uqp4zgaJpZM4YEN3d&data=02%7C01%7C%7Cb23ae3fc2a1d4964164208d63fc8fda9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636766529805148615&sdata=jTO8fDl1PE%2FuTN9%2F512aWBs8JoWYq6IqwoYVuGdNebM%3D&reserved=0.

ZHANGGU commented 5 years ago

The returning rays is due to the angle of incidence and the gradient of the bottom. those returning rays shall be removed by verifications not just his simple hiding method.

mchitre commented 5 years ago

I believe this is resolved, so closing the issue.