PyCPL and PyEsoRex: The ESO Common Pipeline Library in Python
2021-10-26, 09:00–09:30, Grand Ballroom

The ESO Common Pipeline Library (CPL) comprises a set of ISO-C libraries that provide a comprehensive, efficient and robust software toolkit to develop astronomical data-reduction recipes, which has been the fundamental tool for building data reduction pipelines for ESO VLT instruments since its original release in 2003, and which will continue to be the basis for ELT instrument pipelines. CPL was developed in C for reasons of efficiency and speed of execution, and because of its maturity and widespread use, it is well tested and understood. However, as the astronomical community’s preference moves more and more towards Python as the language of choice for algorithm prototyping and data reduction, there has emerged a need to provide access to CPL for users who wish to make use of the power of CPL from a Python environment.
The PyCPL project provides this access, making it possible to run existing CPL recipes from within a Python environment as well as developing new recipes in Python. These new recipes are built using the PyCPL library, a fully object-orientated, idiomatic Python interface to the powerful CPL library, while also allowing users and developers to take full advantage of the rest of the scientific Python ecosystem. In this demo we will show how both CPL and PyCPL recipes can be executed using PyEsoRex (the PyCPL equivalent of EsoRex), both on the command line and from within an interactive Python session. We will then give an example of PyCPL recipe development, demonstrating a range of PyCPL library features in the process. Finally we will highlight some of the interoperability features of PyCPL, which enable easy conversions between PyCPL objects and objects from commonly used Python libraries such as numpy, astropy and pandas.


Building accessible and friendly user interfaces, Image processing for the public and scientists