Skip to content

Commit

Permalink
add support for nmea_time
Browse files Browse the repository at this point in the history
  • Loading branch information
ctuguinay committed Dec 30, 2024
1 parent 2959453 commit 5c967cf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions echopype/convert/set_groups_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ def set_nmea(self) -> xr.Dataset:
ds = xr.Dataset(
{
"NMEA_datagram": (
["time_nmea"],
["nmea_time"],
raw_nmea,
{"long_name": "NMEA datagram"},
)
},
coords={
"time_nmea": (
["time_nmea"],
"nmea_time": (
["nmea_time"],
time,
{
"axis": "T",
Expand Down
2 changes: 1 addition & 1 deletion echopype/echodata/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

logger = _init_logger(__name__)

POSSIBLE_TIME_DIMS = {"time1", "time2", "time3", "time4", "ping_time"}
POSSIBLE_TIME_DIMS = {"time1", "time2", "time3", "time4", "nmea_time", "ping_time"}
APPEND_DIMS = {"filenames"}.union(POSSIBLE_TIME_DIMS)
DATE_CREATED_ATTR = "date_created"
CONVERSION_TIME_ATTR = "conversion_time"
Expand Down
2 changes: 1 addition & 1 deletion echopype/tests/echodata/test_echodata_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_combine_echodata(raw_datasets):

eds = [echopype.open_raw(file, sonar_model, xml_file) for file in files]

append_dims = {"filenames", "time1", "time2", "time3", "ping_time"}
append_dims = {"filenames", "time1", "time2", "time3", "nmea_time", "ping_time"}

combined = echopype.combine_echodata(eds)

Expand Down
1 change: 1 addition & 0 deletions echopype/utils/coding.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@


DEFAULT_ENCODINGS = {
"nmea_time": DEFAULT_TIME_ENCODING,
"ping_time": DEFAULT_TIME_ENCODING,
"ping_time_transmit": DEFAULT_TIME_ENCODING,
"time1": DEFAULT_TIME_ENCODING,
Expand Down

0 comments on commit 5c967cf

Please sign in to comment.