Skip to content

Commit

Permalink
Merge pull request #133 from mraspaud/refactor-to-xarray-from-the-start
Browse files Browse the repository at this point in the history
Fix bogus dtype refactoring
  • Loading branch information
mraspaud authored Oct 18, 2024
2 parents fe08b31 + a4e8ac1 commit e03401a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pygac/gac_klm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, )),
Expand Down
4 changes: 2 additions & 2 deletions pygac/lac_klm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, )),
Expand Down
11 changes: 11 additions & 0 deletions pygac/tests/test_klm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e03401a

Please sign in to comment.