add_depth#
- echopype.consolidate.add_depth(ds: Union[Dataset, str, Path], echodata: Optional[Union[EchoData, str, Path]] = None, depth_offset: Optional[Union[Number, DataArray]] = None, tilt: Optional[Union[Number, DataArray]] = None, downward: bool = True, use_platform_vertical_offsets: bool = False, use_platform_angles: bool = False, use_beam_angles: bool = False) Dataset #
Create a depth data variable based on data in Sv dataset, Echodata object, and/or user input depth offset and tilt data.
- Parameters
- dsxr.Dataset or str or pathlib.Path
Source Sv dataset to which a depth variable will be added.
- echodataOptional[EchoData, str, pathlib.Path], default None
EchoData object from which the Sv dataset originated.
- depth_offsetOptional[Union[Number, xr.DataArray]], default None
Offset along the vertical (depth) dimension to account for actual transducer position in water, since echo_range is counted from transducer surface. If provided as an xr.DataArray, it must have a single dimension corresponding to time. The data array should represent the depth offset in meters at each time step.
- tiltOptional[Union[Number, xr.DataArray]], default None.
Transducer tilt angle [degree]. 0 corresponds to a transducer pointing vertically. If provided as an xr.DataArray, it must have a single dimension corresponding to time. The data array should represent the tilt angle in degrees at each time step.
- downwardbool, default True
The transducers point downward.
- use_platform_vertical_offsets: bool, default `False`
If True, use Echodata Platform group vertical offset values to compute transducer depth. Currently only implemented for EK60/EK80 sonar models. If depth_offset is specified, Platform vertical offset values will not be used.
- use_platform_angles: bool, `False`
If True, use Echodata Platform group angle values to compute echo_range scaling values. Currently only implemented for EK60/EK80 sonar models. If tilt is specified, Platform group angle values will not be used. In the current implementation cannot be used in tandem with use_beam_angles.
- use_beam_angles: bool `False`
If True, use Echodata Beam group angle values to compute echo_range scaling values. Currently only implemented for EK60/EK80 sonar models. If tilt is specified, Beam group angle values will not be used. In the current implementation cannot be used in tandem with use_platform_angles.
- Returns
- The input dataset with a depth variable (in meters) added.