What’s New in sunpy 6.0?#

The SunPy Project is pleased to announce the 6.0 release of the sunpy core package.

On this page, you can read about some of the big changes in this release.

sunpy 6.0 also includes a large number of smaller improvements and bug fixes, which are described in the Full Changelog.


Updates to minimum dependencies#

The minimum required version of Python has been updated to 3.10.

The minimum required versions of core dependencies have been updated:

  • astropy >= 5.2.0

The minimum required versions of these optional dependencies has also been updated:

  • asdf >= 2.12.0

  • asdf-astropy >= 0.2.0

  • beautifulsoup4 >= 4.11.0

  • cdflib >= 0.4.4

  • dask >= 2022.5.2

  • h5netcdf >= 1.0.0

  • h5py >= 3.7.0

  • lxml >= 4.9.0

  • opencv-python >=

  • pandas >= 1.4.0

  • reproject >= 0.9.0

  • requests >= 2.28

  • scikit-image >= 0.19.0

  • scipy >= 1.8.0

  • spiceypy >= 5.0.0

  • tqdm >= 4.64.0

  • zeep >= 4.1.0

Overhaul of the extra groups#

The extra groups have been overhauled to make it easier to install sunpy with only the dependencies you need. The following extra group have been added:

  • “core” - installs only the dependencies that are required to import sunpy or any of its subpackages.

  • “scikit-image” - installs the scikit-image package used for image processing. This dependency is no longer included in the “image” extra group.

Additionally, the “all” extra group is a meta group that includes all optional dependencies. The “dask” extra group has also been removed.

Removal of sunpy.database#

The sunpy.database module has not been actively maintained for over a year now and has a number of outstanding issues. It has been deprecated since sunpy 4.1, and since there have been no major objections from the community since then we have completely removed sunpy.database in sunpy 6.0. If you are interested in seeing a replacement for sunpy.database, either inside sunpy or as a third-party package, please join the discussion thread at https://community.openastronomy.org/t/deprecating-sunpy-database/495.

Arguments for reproject_to()#

Arguments for this method have been changed to be keyword only after the target WCS argument. This was raising a warning since sunpy 4.1.

Removal of sunpy.net.helioviewer.HelioViewerClient#

sunpy.net.helioviewer has been deprecated since sunpy v4.1 and has now been removed. Users should instead use the hvpy package. This package provides a Python wrapper around the Helioviewer API and is maintained by the Helioviewer Project. The hvpy package supersedes the sunpy.net.helioviewer module.

Arguments for sunpy.timeseries.GenericTimeSeries.peek() are now keywords only#

The arguments for sunpy.timeseries.GenericTimeSeries.peek() have been changed to be keyword only. This means that you must now specify the arguments by name, rather than by position and has been done to make the API more consistent. This has been raising a warning since sunpy 4.1 and is now an error.

Fix filename sanitization for downloaded files from the VSO#

The VSOClient has been sanitizing filenames to ensure that they are valid on all platforms. However, we have now fixed the sanitization to be more conservative, to follow the NFKC Unicode normalization, which is the recommended normalization for filenames on most platforms. This now does not replace periods, does not change letter case and do not leave Unicode characters decomposed. An example of this is that the filename will now be replaced with instead of being left out of the filename. Another example is that the filename “aia.lev1.171A_2020_06_07T06_33_09.35Z.image_lev1.fits” used to be replaced with “aia_lev1_171a_2020_06_07t06_33_09_35z_image_lev1.fits” and now will not be.

Deprecate positional arguments in sunpy.map.GenericMap.plot()#

The arguments for sunpy.map.GenericMap.plot() have been changed to being keyword only. Pass them as keyword arguments (e.g., ..., title=True, ...) instead.

Support for ADvanced Adaptive Prediction Technique (ADAPT)#

A new map source has been added (sunpy.map.sources.ADAPTMap) to support the ADAPT data files. In addition, a new client (sunpy.net.dataretriever.ADAPTClient) has been added to search and download ADAPT files.

Please note that there are several data arrays within the ADAPT FITS files and Map will, by default, try to read them all and fail. In these cases, you must specify the header-data Pair you want to read. For these data, it will always be the first one. You can specify this by passing the hdus keyword argument to Map,

>>> sunpy.map.Map("adapt40311_03k012_202401020800_i00005600n1.fts.gz", hdus=0)