From a4e8ac1f3ff55e14069dd1837e5a99d1c1fea31b Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Thu, 17 Oct 2024 18:35:34 +0200 Subject: [PATCH] Fix bogus dtype refactoring --- pygac/gac_klm.py | 4 ++-- pygac/lac_klm.py | 4 ++-- pygac/tests/test_klm.py | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pygac/gac_klm.py b/pygac/gac_klm.py index 7d08697..850987d 100644 --- a/pygac/gac_klm.py +++ b/pygac/gac_klm.py @@ -127,8 +127,8 @@ ("spacecraft_altitude_above_reference_ellipsoid", ">u2"), ("angular_relationships", ">i2", (153, )), ("zero_fill3", ">i2", (3, )), - ("earth_location", [("lats", ">i2"), - ("lons", ">i2")], (51,)), + ("earth_location", [("lats", ">i4"), + ("lons", ">i4")], (51,)), ("zero_fill4", ">i4", (2, )), # HRPT MINOR FRAME TELEMETRY ("frame_sync", ">u2", (6, )), diff --git a/pygac/lac_klm.py b/pygac/lac_klm.py index d202f6d..2d17df0 100644 --- a/pygac/lac_klm.py +++ b/pygac/lac_klm.py @@ -126,8 +126,8 @@ ("spacecraft_altitude_above_reference_ellipsoid", ">u2"), ("angular_relationships", ">i2", (153, )), ("zero_fill2", ">i2", (3, )), - ("earth_location", [("lats", ">i2"), - ("lons", ">i2")], (51,)), + ("earth_location", [("lats", ">i4"), + ("lons", ">i4")], (51,)), ("zero_fill3", ">i4", (2, )), # HRPT MINOR FRAME TELEMETRY ("frame_sync", ">u2", (6, )), diff --git a/pygac/tests/test_klm.py b/pygac/tests/test_klm.py index bc66920..2074a50 100644 --- a/pygac/tests/test_klm.py +++ b/pygac/tests/test_klm.py @@ -194,3 +194,14 @@ def test_calibrate_inactive_3b(self): """Test calibration of an inactive 3b.""" channels = self.reader.get_calibrated_channels() assert np.all(np.isnan(channels[:, :, 3])) + + +def test_gac_scanline_dtype(): + """Test the gac scanline size.""" + from pygac.gac_klm import scanline + assert scanline.itemsize == 4608 + +def test_lac_scanline_dtype(): + """Test the lac scanline size.""" + from pygac.lac_klm import scanline + assert scanline.itemsize == 15872