The Sunpy library in Python allows to manipulate and visualize the solar data acquired by different professional instruments. This article presents an example of use of this library, in the form of an introduction.
The observation of the Sun requires to have an adequate material allowing, at least, to filter the important luminous flux which arrives to us. It is also sometimes necessary to rely on the cooperation of the weather. However, several professional observatories capture images of the Sun continuously, such as the SDO2 for example. These data are then analyzed by scientists.
In 2011, a group of scientists and developers at NASA’s Goddard Space Flight Center developed a library, named Sunpy, that aims to provide a comprehensive environment for data analysis in the field of solar physics 3.
Sunpy is an open-source library in Python that relies on many well-known modules, such as Numpy, Matplotlib, Pandas, Scipy. It is also a project that is an integral part of Astropy, that we have already met here : Python for astronomy and spectroscopy : Rapid spectrum analysis.
Let’s take a few moments to discover and manipulate this library.
In the example below, the acquisition time is not known. It has therefore been estimated as close as possible.