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

BUG: Change surface line min dist from turbulence to 0 #212

Merged
merged 1 commit into from
Jul 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions echofilter/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,10 @@ def __getitem__(self, index):
# Note any locations where the labels are not sane. These can be
# removed from the training loss.
sample["is_bad_labels"] = sample["d_surface"] >= sample["d_bottom"]
# Surface line should always be at least a little bit above the
# turbulence line.
sample["d_surface"] = np.minimum(
sample["d_surface"], sample["d_turbulence"] - 0.25
)
# Surface line can not be below turbulence line
sample["d_surface"] = np.minimum(sample["d_surface"], sample["d_turbulence"])
# Ensure the bottom line is always below the surface line as well
sample["d_bottom"] = np.maximum(sample["d_bottom"], sample["d_surface"] + 0.5)
sample["d_bottom"] = np.maximum(sample["d_bottom"], sample["d_surface"] + 0.02)

if sample["is_upward_facing"]:
min_top_depth = np.min(sample["depths"])
Expand Down