Skip to content

Commit

Permalink
Merge pull request #128 from frdcms/fix_viirs_geoloc_defn
Browse files Browse the repository at this point in the history
Fix typo in VIIRS geoloc definition
  • Loading branch information
djhoese authored May 31, 2023
2 parents 78e58ce + aee96c9 commit 9eadfef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyorbital/geoloc_instrument_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def viirs(scans_nb, scan_indices=slice(0, None),
"""

entire_width = np.arange(chn_pixels)
scan_points = entire_width[scan_indices.astype('int')]
scan_points = entire_width[scan_indices].astype('int')
scan_pixels = len(scan_points)

# Initial angle 55.84 deg replaced with 56.28 deg found in
Expand Down
10 changes: 10 additions & 0 deletions pyorbital/tests/test_geoloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ def test_viirs(self):
np.testing.assert_allclose(geom.fovs,
expected_fovs, rtol=1e-2, atol=1e-2)

def test_viirs_defaults(self):
"""Test the definition of the viirs instrument with default slicing."""
geom = viirs(1, chn_pixels=3)
expected_fovs = np.array([
np.tile(np.array([[0.98, -0., -0.98]]), [32, 1]),
np.tile(np.array([[0., -0., 0]]), [32, 1])], dtype=np.float64)

np.testing.assert_allclose(geom.fovs,
expected_fovs, rtol=1e-2, atol=1e-2)

def test_amsua(self):
"""Test the definition of the amsua instrument."""
geom = amsua(1)
Expand Down

0 comments on commit 9eadfef

Please sign in to comment.