add_location#
- echopype.consolidate.add_location(ds: Union[Dataset, str, Path], echodata: Union[EchoData, str, Path], datagram_type: Optional[str] = None, nmea_sentence: Optional[str] = None)#
Add geographical location (latitude/longitude) to the Sv dataset.
This function interpolates the location from the Platform group in the original data file based on the time when the latitude/longitude data are recorded and the time the acoustic data are recorded (ping_time).
- Parameters
- dsxr.Dataset or str or pathlib.Path
An Sv or MVBS dataset or path to a file containing the Sv or MVBS dataset for which the geographical locations will be added to
- echodataEchoData or str or pathlib.Path
An
EchoData
object or path to a file containing theEchoData
object holding the raw data- datagram_typeOptional[str], default None
Datagram type to use for latitude and longitude. If None (default), latitude and longitude derived from NMEA datagrams will be used. Can be “MRU1” or “IDX”. Can only be used for data for EK sonar models.
- nmea_sentenceOptional[str], default None
NMEA sentence to select a subset of location data. Only applied if latitude and longitude derived from NMEA datagram are used (default).
- Returns
- The input dataset with the location data added