detect_seafloor#
- echopype.mask.detect_seafloor(ds: Dataset, method: str, params: Dict) DataArray#
Dispatch seafloor detection to a chosen method and return a 1-D bottom line.
This function forwards
dsandparamsto the selected implementation (e.g.,"basic","blackwell"). Any optional arguments omitted inparamsare filled by that method’s defaults.- Parameters
- dsxr.Dataset
Dataset containing calibrated Sv and required coordinates (at minimum
ping_timeand a vertical coordinate such asdepth), plus any extra variables required by the chosen method.- methodstr
- Name of the detection method to use. Supported:
"basic"→ threshold-only detector"blackwell"→ Sv + split-beam angle detector
- paramsdict
Method-specific keyword arguments (see below). Unspecified keys use the method’s defaults.
- Returns
- xr.DataArray
1-D bottom depth per
ping_time(nochanneldimension). The output name and attributes are set by the called method.
- Raises
- ValueError
If
methodis not supported.
Examples
>>> detect_seafloor(ds, "basic", { ... "var_name": "Sv", "channel": "GPT 38 kHz ...", ... "threshold": -50, "offset_m": 0.5, "bin_skip_from_surface": 200 ... })
>>> detect_seafloor(ds, "blackwell", { ... "channel": "GPT 38 kHz ...", "threshold": (-75, 0.02, 0.02), ... "offset": 0.3, "r0": 0, "r1": 600, "wtheta": 28, "wphi": 52 ... })