sunpy 5.0.0
5.0.0 (2023-06-14)
Breaking Changes
- ~sunpy.net.dataretriever.XRSClient now provides the re-processed GOES-XRS 8-15 data from NOAA. These files are now all NetCDF and not FITS files. (#6737)
- Changed the output of
sunpy.map.sample_at_coords
to return the sampled values as ~astropy.units.Quantity with the appropriate units instead of merely numbers. (#6882)
Deprecations
- Using sunpy.map.header_helper.meta_keywords is deprecated. Please see
Meta Keywords Table
for the list of metadata keywords used by ~sunpy.map.Map. (#6743) - The utility function
sunpy.map.extract_along_coord
is deprecated. Usesunpy.map.pixelate_coord_path
, and then pass its output tosunpy.map.sample_at_coords
. (#6840) - Parsing SDO/EVE level 0CS average files is deprecated, and will be removed in sunpy 6.0. Parsing this data is untested, and we cannot find a file to test it with. If you know where level 0CS 'averages' files can be found, please get in touch at https://community.openastronomy.org/c/sunpy/5. (#6857)
- Fully deprecated sunpy.database, with an expected removal version of sunpy 6.0. (#6869)
sunpy.io.cdf
,sunpy.io.file_tools
andsunpy.io.jp2
sub-modules have been deprecated, and will be removed in version 5.1. This because they are designed for internal use only, and removing it from the public API gives the developers more flexibility to modify it without impacting users. (#6895)
New Features
-
A pure Python
sunpy
wheel is now published on PyPI with each release.pip
will now default to installing the pure Python wheel instead of the source distribution on platforms other than Linux (x86-64) and macOS (x86-64 and ARM64). This should mean simpler and faster installs on such platforms, which includes the Raspberry Pi as well as some cloud computing services.This wheel does not contain the
sunpy.io.ana
compiled extension. If you need this extension (not available on Windows) you can install thesunpy
source distribution withpip install --no-binary sunpy "sunpy[all]"
. (#6175) -
Added three tutorials which replicate ~sunpy.map.CompositeMap functionality (
sphx_glr_generated_gallery_plotting_AIA_HMI_composite.py
,sphx_glr_generated_gallery_plotting_masked_composite_plot.py
,sphx_glr_generated_gallery_plotting_three_map_composite.py
). (#6459) -
~sunpy.map.GenericMap.exposure_time now looks for the exposure time in the
XPOSURE
key first and then theEXPTIME
key. (#6557) -
~sunpy.map.header_helper.make_fitswcs_header now includes the keyword argument
detector
for setting theDETECTOR
FITS keyword in the resulting header. (#6558) -
Adds two tutorials that demonstrate how to use LASCO data in overlaying maps (
sphx_glr_generated_gallery_plotting_lasco_overlay.py
) and how to create a custom mask for a LASCO C2 image (sphx_glr_generated_gallery_map_lasco_mask.py
). (#6576) -
Able to run the
sunpy
tests doingpython -m sunpy.tests.self_test
. (#6600) -
Able to detect gzip-compressed FITS files even if they don't have the
.gz
extension in the filename. ~sunpy.io.detect_filetype now looks for the right file signature while checking for gzipped FITS files. (#6693) -
Added
AttrAnd
andAttrOr
to the namespace insunpy.net.attrs
. This allows users to to avoid|
or&
when creating a query a larger query. (#6708) -
~sunpy.net.dataretriever.SUVIClient now provides GOES-18 SUVI data. (#6737)
-
The minimum required versions of several core dependencies have been updated:
- Python 3.9
- astropy 5.0.1
- numpy 1.21.0
The minimum required versions of these optional dependencies has also been updated:
- Matplotlib 3.5.0
- dask 2021.4.0
- pandas 1.2.0
- scikit-image 0.18.0
- scipy 1.7.0 (#6742)
-
Added the utility function
sunpy.map.pixelate_coord_path
to fully pixelate a coordinate path according to the pixels of a given map. (#6840) -
The minimum version of h5netcdf required by sunpy has been bumped to version 0.11.0. (#6859)
-
Able to download files from REST/TAP Data Providers from the VSO. (#6887)
-
Adding data unit into html repr for sunpy.map.Map (#6902)
-
Joined
HISTORY
keys with newline characters when parsingHISTORY
cards from FITS header. (#6911) -
Added the ability to query for the GOES-XRS 1 minute average data with the .XRSClient. (#6925)
-
Increased minimum version of parfive to 2.0.0.
We are aware the change in the
parfive
minimum version is a release earlier than our dependency policy allows for. However, due to significant issues thatparfive
v2.0.0 solves and changes to remote servers, we have decided to increase it to improve the user experience when downloading files. (#6942)
Bug Fixes
- Fixed the incorrect calculation in
~sunpy.map.header_helper.make_fitswcs_header
of the rotation matrix from a rotation angle when the pixels are non-square. (#6597) - Return code from
self_test
is now non-zero if it stops due to missing dependencies. (#6600) - Fixed an issue with loading old EIT fits files with sunpy.map.Map where the date could not be parsed. (#6605)
- Fixed a bug where the ~sunpy.map.GenericMap.exposure_time returned
None
when the exposure time key was set to zero. (#6637) - Fixed a bug that prevented specifying a ~astropy.coordinates.BaseCoordinateFrame (as opposed to a ~astropy.coordinates.SkyCoord) to
sunpy.map.GenericMap.draw_quadrangle
. (#6648) - HMI JPEG2000 files from Helioviewer could not be loaded due to a bug in setting the plotting normalization. This has been fixed. (#6710)
- The
data_manager
was not raising failed downloads correctly and would continue as if the file existed locally. Now it will raise any errors fromparfive
. (#6711) - ~sunpy.map.sources.XRTMap will now set the unit for XRT files if the
BUNIT
key is missing. (#6725) - ~sunpy.net.dataretriever.XRSClient update use the new url for which the GOES-XRS 8-15 data is provided by NOAA. (#6737)
- Updated ~sunpy.database to be compatible with
SQLAlchemy
versions >=2.0 (#6749) - When using
autoalign=True
when plotting maps, the result was misaligned by half a pixel. (#6796) sunpy.map.GenericMap.submap
can now handle a ~astropy.coordinates.BaseCoordinateFrame as input. (#6820)- Multi-line
HISTORY
andCOMMENT
keys metadata dictionaries are now correctly split into multiple history and comment cards when writing a FITS file. (#6911) - Pass in "max_splits" to Parfive to prevent multi connections to JSOC for JSOC only queries. (#6921)
- When converting an astropy.wcs.WCS object to a solar coordinate frame the
DATE-AVG
key will be used before theDATE-OBS
key, previously onlyDATE-OBS
was checked. (#6995) - sunpy.map.GenericMap.rotation_matrix now applies the default values if any FITS rotation matrix keywords are missing from the header. (#7004)
- Modified
sunpy.io.special.srs.read_srs
to correctly handle uppercase SRS files and supplementary sections occurring after the main data sections (I, IA, II). (#7035)
Documentation
- Added an example of how to search for multiple wavelengths attributes for AIA data using sunpy.net.attrs.AttrOr. (#6501)
- Added sunpy.map.PixelPair to the reference documentation. (#6620)
- Split the installation docs into a new Installation tutorial, and an installation guide. (#6639)
- Added an example (
sphx_glr_generated_gallery_time_series_goes_xrs_nrt_data.py
) to download GOES NRT data and load it into ~sunpy.timeseries.TimeSeries. (#6744) - Added an example gallery (
sphx_glr_generated_gallery_acquiring_data_querying_and_loading_SHARP_data.py
) for querying SHARP data and loading it into a ~sunpy.map.Map. (#6757) - Added an example (
sphx_glr_generated_gallery_units_and_coordinates_ParkerSolarProbe_trajectory.py
) to plot the trajectory of Parker Solar Probe. (#6771) - Created a "Showcase" section of the gallery, which includes a new example (
sphx_glr_generated_gallery_showcase_where_is_stereo.py
) and a relocated example (sphx_glr_generated_gallery_showcase_hmi_cutout.py
). (#6781) - Updated examples in the gallery to always explicitly create an Axes and use that for plotting, instead of using the Matplotlib pyplot API. (#6822)
- Added an example (
sphx_glr_generated_gallery_map_masking_hmi.py
) of how to mask a HMI map based on the intensity of AIA. (#6825) - Added an example (
sphx_glr_generated_gallery_plotting_mplcairo_plotting.py
) to blend two maps usingmplcairo
. (#6835) - Changed the reprojecting images to different observers example (
sphx_glr_generated_gallery_map_transformations_reprojection_different_observers.py
) to avoid using custom wcs headers where possible. (#6853) - Added a note in examples
sphx_glr_generated_gallery_map_transformations_autoalign_aia_hmi.py
andsphx_glr_generated_gallery_map_transformations_reprojection_align_aia_hmi.py
suggesting to use~sunpy.coordinates.Helioprojective.assume_spherical_screen
to retain off-disk HMI data. (#6855) - Moved the Helioviewer migration guide from the tutorial to guide section of the docs. (#6868)
- Moved the plotting section of the tutorial into the map section of the tutorial. (#6870)
- Reorganized "Units" section of the Tutorial into smaller sections and added a section about unit equivalencies. (#6879)
- Added clarifying detail (in the ~sunpy.time.TimeUTime docstring) for how the
utime
time format handles seconds on a day with a leap second. (#6894) - Fixed a series of broken URLS and typos in examples and documentation strings. (#6903)
- Improved the time tutorial. (#6920)
- Add a "how-to" guide section to the documentation. (#6926)
- Redesigned the landing page to highlight the different sections of the documentation. (#6938)
- Significantly revised and improved the
sunpy-tutorial-maps
part of the tutorial. This included moving the section on custom maps to thesunpy-how-to-index
section (seesunpy-how-to-create-a-map
). (#6944) - Migrated example gallery entries for searching the VSO, using
parse_time
, using the data manager, and using solar constants to the how-to guide. (#6948) - Reorganized some parts of the coordinates topic guide into multiple how-to guides. (#6954)
- Move examples of how to create a Map from reference pages to a how-to guide. (#6977)
- Cleaned up and simplified the
sunpy-tutorial-timeseries
section of the tutorial. (#6990) - Added a topic-guide to aid understanding the role, "rsun" plays in sunpy coordinate transformations and
sunpy.map.GenericMap.reproject_to
. (#7000) - Updated all of the sphinx anchors to be more consistent. This means that any use of the old anchors (intersphinx links to sunpy doc pages) will need to be updated. (#7032)
Internal Changes
- When determining which VSO servers to use for queries, .VSOClient will now attempt to check if the cgi endpoint referenced by the WDSL file is accessible, and try the next endpoint if it can't be reached. This should mean that a small category of connection issues with the VSO are now automatically bypassed. (#6362)