OSOceanAcoustics / echopype

Enabling interoperability and scalability in ocean sonar data analysis
https://echopype.readthedocs.io/
Apache License 2.0
99 stars 76 forks source link

Write a Universal Align to `ping_time` Function #1367

Closed ctuguinay closed 3 months ago

ctuguinay commented 4 months ago

There are two functions in Echopype that align non-Echosounder data (Platform and Environment data) to Echosounder data time-wise: _var_time2_to_ping_time sel_interp, and harmonize_env_param_time. It would be good to have a standard function that does this time-wise alignment.

The function header can look something like this: def align_to_ping_time(external_da: xr.DataArray, external_time_name: str, ping_time_da: xr.DataArray).