What’s New in sunpy 5.1?#

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

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

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

This release of sunpy contains 361 commits in 102 merged pull requests closing 27 issues from 19 people, 7 of which are first-time contributors to sunpy.

  • 361 commits have been added since 5.0

  • 27 issues have been closed since 5.0

  • 102 pull requests have been merged since 5.0

  • 19 people have contributed since 5.0

  • 7 of which are new contributors

The people who have contributed to the code for this release are:

  • Alasdair Wilson

  • Albert Y. Shih

  • Brett J Graham *

  • David Stansby

  • Hannah Collier *

  • Jan Gieseler

  • Kurt McKee *

  • Laura Hayes

  • Nabil Freij

  • Paul Wright *

  • Samuel Badman *

  • Samuel J. Van Kooten *

  • Shane Maloney

  • Steven Christe

  • Stuart Mumford

  • Trestan Simon *

  • Will Barnes

Where a * indicates that this release contains their first contribution to sunpy.

Calculating the amount of solar eclipse#

In anticipation of the upcoming “Great North American Eclipse” on April 8, 2024, there is a new function sunpy.coordinates.sun.eclipse_amount() that returns how much of the Sun is occulted by the Moon at the specified observer location and time. The output can be used to determine the start/end times of partial eclipse and of totality.

Obtaining solar-eclipse information

Obtaining solar-eclipse information

Computations using SPICE kernels#

The SPICE observation geometry information system is being increasingly used by space missions to describe the locations of spacecraft and the time-varying orientations of reference frames. The new sunpy.coordinates.spice module enables the use of the SkyCoord API to perform SPICE computations such as the location of bodies or the transformation of a vector from one coordinate frame to another coordinate frame. Although SPICE kernels can define coordinate frames that are very similar to the frames that sunpy.coordinates already provides, there will very likely be slight differences. Using sunpy.coordinates.spice will ensure that the definitions are exactly what the mission specifies and that the results are identical to other implementations of SPICE (e.g., CSPICE or Icy).

Note

sunpy.coordinates.spice requires the optional dependency spiceypy to be installed.

Coordinates computations using SPICE kernels

Coordinates computations using SPICE kernels

Support for GONG Synoptic Data#

The Global Oscillation Network Group (GONG) are a network of observatories located around the Earth that produce photospheric magnetograms every hour. These magnetograms are used to derive synoptic maps which show a full-surface picture of the solar magnetic field. A new map source, GONGSynopticMap, has been added to support these synoptic data products. This means that GONG synoptic data products can now be loaded directly into Map objects. If you have pfsspy installed, this new map source will be used instead of the one built into pfsspy.

New Method for Determining Visibility of Helioprojective Coordinates#

A new method has been added to the Helioprojective frame to determine whether a coordinate is visible or not. Visibility is determined as whether or not the coordinate is behind the limb relative to the observer coordinate. See the documentation for is_visible() for more information.

Improved Support for WISPR Data#

The default colorbar limits and stretching for WISPRMap have been improved to better emphasize the coronal structures present in many images. Metadata handling has also been improved, including handling non-integer processing levels (e.g. “L2b”) and adding more intuitive labels for the different detectors (e.g. “inner” and “outer” instead of “1” and “2”).