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

Review/change handling of negative echo_range in calibration outputs #737

Closed
Tracked by #875
leewujung opened this issue Jun 21, 2022 · 5 comments
Closed
Tracked by #875
Assignees
Milestone

Comments

@leewujung
Copy link
Member

Right now we set all negative echo_range to 0 at the end of compute_range, which causes problems when trying to combine datasets (#578)

range_meter = range_meter.where(range_meter > 0, 0) # set negative ranges to 0

This issue is a reminder to review this and change/fix related operations in calibration.

@leewujung leewujung added this to the 0.6.1 milestone Jun 21, 2022
@leewujung leewujung moved this to Todo in Echopype Jun 21, 2022
@leewujung leewujung self-assigned this Jun 22, 2022
@leewujung leewujung modified the milestones: 0.6.1, 0.6.2 Jul 1, 2022
@leewujung leewujung modified the milestones: 0.6.2, 0.6.3 Aug 18, 2022
@leewujung leewujung modified the milestones: 0.6.3, 0.6.4 Oct 13, 2022
@leewujung leewujung modified the milestones: 0.6.4, 0.7.0 Dec 1, 2022
@leewujung
Copy link
Member Author

See #968 (comment) for the divide by zero warnings on ek80_bb_complex and ek80_cw_power range tests.

@leewujung leewujung modified the milestones: 0.7.0, 0.6.4.1 Mar 14, 2023
@emiliom
Copy link
Collaborator

emiliom commented Mar 14, 2023

I'm seeing the divide-by-zero error on compute_Sv with all kinds of raw files, including ek60 from the hake survey. In #968 (comment) I noted it for only those two ek80 tests, but I can now see that when running the full test, pytest somehow only spits out those warnings after those tests. When running each test individually, all ek tests produce the warning; the azfp test doesn't.

BTW, this warning doesn't happen with 0.6.3.

@emiliom
Copy link
Collaborator

emiliom commented Mar 15, 2023

@leewujung I've isolated the source of these log10 warnings. They're all in calibrate_ek.py.

Strictly speaking, something like this for both tvg_mod_range and prx would eliminate the warnings:

x = x.where(x > 0, eps)

where eps is a very small positive value (eg, 0.00001). But, I don't know what impact that would have on the calculations. On the other hand, those invalid log10 applications must be leading to nan or -inf values right now ...

What do you suggest?

@emiliom
Copy link
Collaborator

emiliom commented Mar 16, 2023

Can we close this now? I'm not 100% sure that the exact scope of the issue was addressed by #986

@leewujung
Copy link
Member Author

I think this is addressed -- reading the description again I am not sure why data combination has anything to do with the range dimension. But I am glad that the range computation was reviewed/revised when range computation was factored out, and the log10(0) or log10(neg values) warning issue was resolved.

@github-project-automation github-project-automation bot moved this from Todo to Done in Echopype Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants