From 8452f731d40f17654a2fc476df4fe8b8c2f6fcd0 Mon Sep 17 00:00:00 2001 From: Trygve Aspenes Date: Wed, 8 Jun 2022 09:12:11 +0200 Subject: [PATCH 1/3] on the way add slstr --- trollsched/boundary.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trollsched/boundary.py b/trollsched/boundary.py index 80ed61d..4e8998e 100644 --- a/trollsched/boundary.py +++ b/trollsched/boundary.py @@ -69,6 +69,10 @@ def get_instrument_points(self, overpass, utctime, elif instrument.startswith("mersi"): scan_angle = 55.4 instrument = "avhrr" + elif instrument.startswith("slstr"): + scan_angle_right = 46.5 + scan_angle_left = 22.1 + instrument = "slstr" else: scan_angle = 55.25 @@ -89,6 +93,8 @@ def get_instrument_points(self, overpass, utctime, sgeom = instrument_fun(scans_nb, scanpoints, scan_step=scan_step) elif instrument in ['mhs', 'atms', 'mwhs-2']: sgeom = instrument_fun(scans_nb, scanpoints) + elif instrument.startswith("slstr"): + sgeom = instrument_fun(scans_nb, scanpoints) else: logger.warning("Instrument not tested: %s", instrument) sgeom = instrument_fun(scans_nb) From 9195e6fbac63ef3a93a2f1005d8b21936da3cb15 Mon Sep 17 00:00:00 2001 From: Trygve Aspenes Date: Wed, 8 Jun 2022 15:56:06 +0200 Subject: [PATCH 2/3] Adding slstr instrument at nadir view with some simple coverage test --- trollsched/boundary.py | 2 -- trollsched/tests/test_satpass.py | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/trollsched/boundary.py b/trollsched/boundary.py index 4e8998e..c123b0e 100644 --- a/trollsched/boundary.py +++ b/trollsched/boundary.py @@ -70,8 +70,6 @@ def get_instrument_points(self, overpass, utctime, scan_angle = 55.4 instrument = "avhrr" elif instrument.startswith("slstr"): - scan_angle_right = 46.5 - scan_angle_left = 22.1 instrument = "slstr" else: scan_angle = 55.25 diff --git a/trollsched/tests/test_satpass.py b/trollsched/tests/test_satpass.py index b7179db..ebd1112 100644 --- a/trollsched/tests/test_satpass.py +++ b/trollsched/tests/test_satpass.py @@ -168,6 +168,13 @@ def get_mb_orbital(): tle2 = "2 38771 98.6992 96.5537 0002329 71.3979 35.1836 14.21496632434867" return Orbital("Metop-B", line1=tle1, line2=tle2) +def get_s3a_orbital(): + """ + From 2022-06-06 + """ + tle1 = "1 41335U 16011A 22157.82164820 .00000041 00000-0 34834-4 0 9994" + tle2 = "2 41335 98.6228 225.2825 0001265 95.7364 264.3961 14.26738817328255" + return Orbital("Sentinel-3A", line1=tle1, line2=tle2) class TestPass(unittest.TestCase): @@ -210,6 +217,7 @@ def setUp(self): self.n20orb = get_n20_orbital() self.n19orb = get_n19_orbital() self.mborb = get_mb_orbital() + self.s3aorb = get_s3a_orbital() self.euron1 = AREA_DEF_EURON1 self.antarctica = create_area_def( "antarctic", @@ -347,6 +355,16 @@ def test_swath_coverage(self): cov = mypass.area_coverage(self.euron1) self.assertAlmostEqual(cov, 0.786836, 5) + # Sentinel 3A slstr + tstart = datetime(2022, 6, 6, 19, 58, 0) + tend = tstart + timedelta(seconds=60) + + tle1 = "1 41335U 16011A 22156.83983125 .00000043 00000-0 35700-4 0 9996" + tle2 = "2 41335 98.6228 224.3150 0001264 95.7697 264.3627 14.26738650328113" + mypass = Pass('SENTINEL 3A', tstart, tend, instrument='slstr', tle1=tle1, tle2=tle2) + cov = mypass.area_coverage(self.euron1) + self.assertAlmostEqual(cov, 0.05305641490480109, 6) + def test_arctic_is_not_antarctic(self): tstart = datetime(2021, 2, 3, 16, 28, 3) From a8d3a76d29bce9d9f2e766122e2f9f482b126357 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 8 Jun 2022 14:01:17 +0000 Subject: [PATCH 3/3] Fixing style errors. --- trollsched/tests/test_satpass.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trollsched/tests/test_satpass.py b/trollsched/tests/test_satpass.py index ebd1112..06b69c1 100644 --- a/trollsched/tests/test_satpass.py +++ b/trollsched/tests/test_satpass.py @@ -168,6 +168,7 @@ def get_mb_orbital(): tle2 = "2 38771 98.6992 96.5537 0002329 71.3979 35.1836 14.21496632434867" return Orbital("Metop-B", line1=tle1, line2=tle2) + def get_s3a_orbital(): """ From 2022-06-06 @@ -358,7 +359,7 @@ def test_swath_coverage(self): # Sentinel 3A slstr tstart = datetime(2022, 6, 6, 19, 58, 0) tend = tstart + timedelta(seconds=60) - + tle1 = "1 41335U 16011A 22156.83983125 .00000043 00000-0 35700-4 0 9996" tle2 = "2 41335 98.6228 224.3150 0001264 95.7697 264.3627 14.26738650328113" mypass = Pass('SENTINEL 3A', tstart, tend, instrument='slstr', tle1=tle1, tle2=tle2)