pytroll / pytroll-schedule

Reception scheduling of polar weather satellites
http://pytroll-schedule.readthedocs.org/
GNU General Public License v3.0
9 stars 12 forks source link

New version slower in generating the schedule #25

Closed adybbroe closed 5 years ago

adybbroe commented 5 years ago

Code Sample, a minimal, complete, and verifiable piece of code


from trollsched.satpass import Pass
from datetime import datetime, timedelta
from satpy.utils import debug_on
debug_on()

rtime = datetime(2018, 10, 23, 0, 38, 27)
ftime = datetime(2018, 10, 23, 0, 46, 59, 400000) + timedelta(seconds=86)
viirs = Pass('NOAA-20', rtime, ftime, instrument='viirs')
print(viirs.boundary.bottom_lats.shape)
print(viirs.boundary.top_lons.shape)
print(viirs.boundary.right_lons.shape)
print(viirs.boundary.left_lats.shape)

Problem description

The latest version is quite somewhat slower in generating the scedules than it used to be. Comparing the latest version 0.5.0 with 0.3.3. I believe it is because the newer version is putting more points on the swath outline than previously

Expected Output

Version 0.3.3 produce this output

(23,)
(23,)
(6,)
(6,)

Actual Result, Traceback if applicable

The latest version produce this output

(65,)
(65,)
(17,)
(17,)

Versions of Python, package at hand and relevant dependencies

Thank you for reporting an issue !

adybbroe commented 5 years ago

With the new version we get this for an AVHRR pass:

(9,)
(9,)
(11,)
(11,)

And with 0.3.3:

(23,)
(23,)
(10,)
(10,)

And the points are nicely evenly distributed along the sides and top and bottom.

For a VIIRS pass we get:

(24,)
(24,)
(6,)
(6,)

And with 0.3.3:

(23,)
(23,)
(6,)
(6,)