From 9768840f24c12ecb1f783eb7bbed6469d76fb94b Mon Sep 17 00:00:00 2001 From: derrick chambers Date: Wed, 4 Dec 2024 07:09:52 -0800 Subject: [PATCH] neubrex decimation check --- dascore/io/neubrex/utils_das.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dascore/io/neubrex/utils_das.py b/dascore/io/neubrex/utils_das.py index 1d2417c6..31138888 100644 --- a/dascore/io/neubrex/utils_das.py +++ b/dascore/io/neubrex/utils_das.py @@ -27,7 +27,8 @@ def _get_time_coord(acoustic): """Get the time coordinate.""" attrs = acoustic.attrs - assert attrs["TimeDecimationFilter"] == 0, "not yet implemented" + # We havent encountered a time decimated file yet; raise over guess + assert attrs["TimeDecimationFilter"] in {0, 1}, "not implemented" gps = unbyte(attrs["GPSTimeStamp(UTC)"]) cpu = unbyte(attrs["CPUTimeStamp(UTC)"]) @@ -42,7 +43,8 @@ def _get_dist_coord(acoustic): dist_len = acoustic.shape[1] attrs = acoustic.attrs - assert attrs["DistanceDecimationFilter"] == 0, "not yet implemented" + # We havent encountered a distance decimated file yet; raise over guess + assert attrs["DistanceDecimationFilter"] in {0, 1}, "not yet implemented" step = attrs["SpatialSamplingInterval"] units = dc.get_quantity(attrs["StartStopPositionUnit"])