Skip to content

Commit

Permalink
Update test for changes in Meirink calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
pdebuyl committed Oct 11, 2023
1 parent 69c5751 commit 714130c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions satpy/tests/reader_tests/test_seviri_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import xarray as xr

from satpy.readers.seviri_base import (
DATE_2000,
MEIRINK_EPOCH,
MEIRINK_COEFS,
NoValidOrbitParams,
OrbitPolynomial,
Expand Down Expand Up @@ -373,8 +373,8 @@ def test_get_meirink_slope_epoch(self, platform_id, channel_name):
coefs = {'coefs': {}}
coefs['coefs']['NOMINAL'] = {'gain': -1, 'offset': -1}
coefs['coefs']['EXTERNAL'] = {}
calibration_handler = SEVIRICalibrationHandler(platform_id, channel_name, coefs, 'MEIRINK', DATE_2000)
assert calibration_handler.get_gain_offset()[0] == MEIRINK_COEFS[platform_id][channel_name][0]/1000.
calibration_handler = SEVIRICalibrationHandler(platform_id, channel_name, coefs, 'MEIRINK-2013', MEIRINK_EPOCH)
assert calibration_handler.get_gain_offset()[0] == MEIRINK_COEFS['2013'][platform_id][channel_name][0]/1000.

@pytest.mark.parametrize('platform_id,time,expected', (
(321, datetime(2005, 1, 18, 0, 0), [0.0250354716, 0.0315626684, 0.022880986]),
Expand All @@ -392,5 +392,5 @@ def test_get_meirink_slope_2020(self, platform_id, time, expected):
coefs['coefs']['NOMINAL'] = {'gain': -1, 'offset': -1}
coefs['coefs']['EXTERNAL'] = {}
for i, channel_name in enumerate(['VIS006', 'VIS008', 'IR_016']):
calibration_handler = SEVIRICalibrationHandler(platform_id, channel_name, coefs, 'MEIRINK', time)
calibration_handler = SEVIRICalibrationHandler(platform_id, channel_name, coefs, 'MEIRINK-2013', time)
assert abs(calibration_handler.get_gain_offset()[0] - expected[i]) < 1e-6

0 comments on commit 714130c

Please sign in to comment.