NSF-Swift / satellite-overhead

An open-source tool for calculating satellite interference to radio astronomy observations.
https://pypi.org/project/sopp/
GNU Affero General Public License v3.0
0 stars 2 forks source link

Add caching for timescale and latlon objects #75

Closed 0xeb-bp closed 1 year ago

0xeb-bp commented 1 year ago

Added caching for the timescale and latlon objects within the SatellitePositionWithRespectToFacilityRetrieverRhodesmill class.

Caching latlon had a a minor improvement of approximately 5% decrease in runtime.

Looking into the profiled code output, I noticed the creation of Time objects in the Skyfield API is very expensive. Adding caching for these objects decreased runtime by 87%. A test of a 5 minute observation window was taking 386 seconds to complete, with the caching it took 47. The speed factor increase will be even larger for longer observation windows.