What’s New in SunPy 1.1?¶
The SunPy project is pleased to announce the 1.1 release of the sunpy package.
The headline changes in 1.1 are:
coordinatessubpackage now supports four additional coordinate frames (HCI, HEE, GSE, and GEI).
A new subpackage
sunpy.data.data_managerhas been added to support versioned data for functions and methods.
Initial support for WISPR data from Parker Solar Probe in
The import times for
sunpyand some subpackages are significantly shorter, with no loss of functionality.
On this page, you can read about some of the big changes in this release:
SunPy 1.1 also includes a large number of smaller improvements and bug fixes, which are described in the Full Changelog.
By the numbers:
1137 commits have been added since 1.0
106 issues have been closed since 1.0
242 pull requests have been merged since 1.0
24 people have contributed since 1.0
10 new contributors
Supported versions of Python¶
Like SunPy 1.0, 1.1 comes with support for Python versions 3.6, 3.7 and support for 3.8 has been added.
New coordinate frames¶
coordinates subpackage now supports four additional coordinate frames of interest to solar physics:
See our coordinates documentation for a table of the currently supported coordinate systems and the corresponding frame classes.
Manager for Versioned Data Files¶
SunPy 1.1 provides a data manager for versioning and caching remote files. The objective of this is to provide a way for data required for functions, such as instrument correction routines, to depend on non-local data in a reliable way. The data manager also guarantees that a specific version of the code uses a specific data file, with the ability for users to specify updated files.
This works by providing the URL of a remote file and a SHA256 hash to the
sunpy.data.manager.require decorator which can be added to functions that require these specific data files from remote sources.
If the specified hash does not match that of the remote version, an exception is raised to make the user aware of any changes on the remote server or corruption of local files.
sunpy.data.cache can be used to avoid re-downloading files that already exist on a user’s local machine, thus saving disk space and internet bandwidth.
See Remote Data Manager for more details.
Support for SUVI Data¶
The Solar Ultraviolet Imager (SUVI) is a EUV instrument imaging the full disk of the Sun in six passbands, and is onboard the latest of the Geostationary Operational Environmental Satellite (GOES) missions.
SUVIMap provides SunPy map support for loading SUVI FITS image data, and the
SUVIClient adds support to search for SUVI data hosted by NOAA via
Fido. It supports searching for wavelength, level of data (level 2 data which consists of stacked level 1b images and original level 1b files), as well as GOES satellite number (>= GOES 16).
Initial Support for WISPR Images¶
Following the first data release from Parker Solar Probe, SunPy 1.1 supports loading WISPR imaging data into a
Due to the complex projections in the WISPR data this involved changing the way sunpy converts FITS headers into
It is expected that sunpy 2.0 will include more complete support for WISPR data.
Speeding up import times¶
We know that the initial import of
sunpy or its subpackages can feel like it takes a long time, particularly on slower machines.
Some of that import time can be the result of importing other modules or external packages that are required for specialized functionality that a user may not ever actually use.
We have identified the most egregious cases and deferred those imports of dependencies to when they are actually needed.
For example, the initial import of
sunpy.map is now ~40% faster, with no loss of functionality.
We will continue to look for ways to improve import times.
Notable Breaking Changes or Removed functionality¶
sunpy.timeseries.timeseriesbaseno longer automatically imports Matplotlib. (#3376)
Observer-based coordinate frames (
Helioprojective) no longer assume a default observer (Earth) if no observer is specified. These frames can now be used with no observer specified, but most transformations cannot be performed for such frames. This removal of a default observer only affects
sunpy.coordinates, and has no impact on the default observer in
The colormap stored in SunPy’s Map subclasses (ie.
map.plot_settings['cmap']) can now be colormap string instead of the full
matplotlib.colormap.Colormapobject. To get the full
Colormapobject use the new attribute
Fix a warning in
sunpy.map.GenericMap.rotatewhere the truth value of an array was being calculated. This changes the behavior of
angle=parameter is not an
Quantityobject to raise
Removed the step of repairing images (replacing non-finite entries with local mean) before coaligning them. The user is expected to do this themselves before coaligning images. If NaNs/non-finite entries are present, a warning is thrown. The function
sunpy.image.coalignment.repair_image_nonfiniteis deprecated. (#3287)