Skip to content

Commit

Permalink
Assemble AD2CP timestamp with nanosecond precision (#1436)
Browse files Browse the repository at this point in the history
* assemble ad2cp timestamp at ns instead of us

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add noqa

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
leewujung and pre-commit-ci[bot] authored Feb 2, 2025
1 parent f64e8c3 commit 9132303
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion echopype/convert/parse_ad2cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ def timestamp(self) -> np.datetime64:
microsec100 = self.data["microsec100"]
try:
return np.datetime64(
f"{year:04}-{month:02}-{day:02}T{hour:02}:{minute:02}:{seconds:02}.{microsec100:04}"
f"{year:04}-{month:02}-{day:02}T{hour:02}:{minute:02}:{seconds:02}.{microsec100:04}", # noqa
"ns",
) # type: ignore
except ValueError:
return np.datetime64("NaT") # type: ignore
Expand Down

0 comments on commit 9132303

Please sign in to comment.