14–17 Mar 2016
Darmstadtium
Europe/Amsterdam timezone
"Orbiting Towards the Future"

poliastro: : An Astrodynamics library written in Python with Fortran performance

16 Mar 2016, 17:00
20m
3.03 Germanium (Darmstadtium)

3.03 Germanium

Darmstadtium

Oral presentation at the conference 11: Open Source Tools Open Source (II)

Speaker

Mr Juan Luis Cano (Universidad Politécnica de Madrid)

Description

Python is a fast-growing language both for astronomic applications[[1]] and for educational purposes[[2]], but it is often critizised for its suboptimal performance and lack of type enforcement. In this paper we present **poliastro**, a pure Python library for Astrodynamics that overcomes these obstacles and serves as a proof of concept of Python strengths and its suitability to model complex systems and implement fast algorithms. ​ poliastro features core Astrodynamics algorithms (such as resolution of the Kepler and Lambert problems) written in pure Python and compiled using numba, a modern just-in-time Python-to-LLVM compiler. As a result, preliminary benchmarks suggest a performance increase close to the reference Fortran implementation, with negligible impact in the legibility of the Python source. We analyse the effects of these tools, along with the introduction of new ahead-of-time compilers for numerical Python and optional type declarations, in the interpreted and dynamic nature of the language. ​ poliastro relies on well-tested, community-backed libraries for low level astronomical tasks, such as astropy[[3]] and jplephem. We comment the positive outcomes of the new open development strategies[[4]] and the permissive, commercial-friendly licences omnipresent in the scientific Python ecosystem. ​ While recent approaches involve writing Python programs which are translated on the fly to lower level code, traditional Python libraries for scientific computing have succeeded because they leverage computing power to compiled languages. We briefly present tools to build wrappers to Fortran, C/C++, MATLAB and Java, which can be also useful for validation and verification, reusability of legacy code and other purposes. ​ [1]: http://arxiv.org/abs/1507.03989 ​ [2]: http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-us-universities/fulltext ​ [3]: http://arxiv.org/abs/1307.6212 ​ [4]: https://speakerdeck.com/astrofrog/astropy-and-the-open-source-revolution-in-astronomy
Applicant type First author

Primary author

Mr Juan Luis Cano (Universidad Politécnica de Madrid)

Co-authors

Mr Frazer McLean (CS GmbH) Mr Helge Eichhorn (Technische Universität Darmstadt Department of Computer Integrated Design)

Presentation materials