-
Notifications
You must be signed in to change notification settings - Fork 42
fixed transmission loss plotting #120
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -524,18 +524,18 @@ def plot_transmission_loss(tloss, env=None, **kwargs): | |
max_angle=45 | ||
) | ||
>>> tloss = pm.compute_transmission_loss(env) | ||
>>> pm.plot_transmission_loss(tloss, width=1000) | ||
>>> pm.plot_transmission_loss(tloss,env, width=1000) | ||
""" | ||
xr = (min(tloss.columns), max(tloss.columns)) | ||
if env is None: | ||
raise ValueError("Environment is required") | ||
xr = (env['rx_range'].min(), env['rx_range'].max()) | ||
yr = (-max(tloss.index), -min(tloss.index)) | ||
xlabel = 'Range (m)' | ||
if xr[1]-xr[0] > 10000: | ||
xr = (min(tloss.columns)/1000, max(tloss.columns)/1000) | ||
xr = (env['rx_range'].min()/1000, env['rx_range'].max()/1000) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the problem that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes,'tloss.columns' is incorrect , but it was calculated by Acoustic Toolbox in fortran. Could only fix it in original package There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair. I suggest that we still make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for long time till now thatInoticed your reply but there are lots of works for me, I would try refix it in spare time.🥲🥲🥲 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem, I understand. All of us have day jobs to take care of in addition to contributing to open source projects. |
||
xlabel = 'Range (km)' | ||
oh = _plt.hold() | ||
_plt.image(20*_np.log10(_fi.epsilon+_np.abs(_np.flipud(_np.array(tloss)))), x=xr, y=yr, xlabel=xlabel, ylabel='Depth (m)', xlim=xr, ylim=yr, **kwargs) | ||
if env is not None: | ||
plot_env(env, rx_plot=False) | ||
_plt.hold(oh) | ||
|
||
def pyplot_env(env, surface_color='dodgerblue', bottom_color='peru', tx_color='orangered', rx_color='midnightblue', | ||
|
Uh oh!
There was an error while loading. Please reload this page.