Repository navigation
6.0.0 (2024-07-19)
Breaking Changes
-
Arguments for
~sunpy.map.GenericMap.reproject_toafter the target WCS are now keyword-only. (#7339) -
Arguments for
sunpy.timeseries.GenericTimeSeries.peekare now keywords only. (#7340) -
Removed scikit-image from the "image" extra group and created a new "scikit-image" extra group. (#7536)
-
The "all" extra group now will install all optional packages.
This now includes the following packages:
- asdf
- glmyur
- opencv
- scikit-image
- spiceypy (#7536)
-
Removed the "dask" extra group. (#7536)
-
sunpy.io.read_fileandsunpy.io.write_fileare deprecated and will be removed in the future. These were intended to be private functions and should not be used. (#7537) -
The ANA C code has been deprecated (<span class="title-ref">sunpy.io.ana.read</span>, <span class="title-ref">sunpy.io.ana.get_header</span>, <span class="title-ref">sunpy.io.ana.write</span>) and may be removed in a future sunpy release. Please contact us here: <https://community.openastronomy.org/t/possible-deprecation-of-ana-file-readers-and-writers-in-sunpy> if you are making use of this code. (#7642)
-
The <span class="title-ref">.EUIMap</span> class now returns the
DATE-BEGkey for <span class="title-ref">.GenericMap.date</span> while continuing to useDATE-AVGas the reference date for the coordinate system. (#7682) -
The <span class="title-ref">.GenericMap.date</span> key priority order has changed to be consistent with it representing the "canonical" observation time.
DATE-OBScontinues to have the highest priority, but nowDATE-BEGhas higher priority thanDATE-AVG. (#7682) -
A new property <span class="title-ref">.GenericMap.reference_date</span> has been added to decouple the reference date for the coordinate system from the "canonical" observation time. This new property is now passed through to the map's WCS object as
dateavgand is the time used for <span class="title-ref">.GenericMap.coordinate_frame</span> and <span class="title-ref">.GenericMap.observer_coordinate</span>. (#7682)
Deprecations
~sunpy.coordinates.Helioprojective.assume_spherical_screenhas been deprecated in favor of <span class="title-ref">~sunpy.coordinates.SphericalScreen</span>. (#7115)sunpy.physics.differential_rotation.diff_rothas been deprecated and replaced bysunpy.sun.models.differential_rotation. (#7409)- Deprecated all positional arguments in
sunpy.map.GenericMap.plotmethod. Theannotate,axes,title,clip_intervalarguments should be passed as keyword arguments (e.g.,..., title=True, ...) instead. (#7421) - The keyword
response_formatinsunpy.net.vso.VSOClient.searchhas been deprecated. This was introduced to preserve legacy behaviour of the VSO client, to returnsunpy.net.vso.legacy_response.QueryResponseinstead of <span class="title-ref">sunpy.net.vso.table_response.VSOQueryResponseTable</span> objects. This behaviour has been the default for over 4 years and the keyword is no longer needed. This keyword and the oldersunpy.net.vso.legacy_response.QueryResponseclass will be removed in sunpy 7.0. The keywordprogressinsunpy.net.hek2vso.H2VClient.full_queryhas been deprecated and will be removed in sunpy 7.0. (#7468)
Removals
sunpy.databasehas been removed. (#7320)sunpy.map.header_helper.meta_keywordshas been removed. (#7337)sunpy.net.helioviewer.HelioviewerClienthas been removed. Use the hvpy package instead. (#7338)- There was a private "Maxwell" unit within <span class="title-ref">sunpy.map</span> to register it before astropy had support for it. This has now been removed in favour of using the astropy version. (#7383)
New Features
-
sunpy.io.read_filewill now try to detect the filetype based on the content and then fallback to using the file extension. (#6736) -
It is now possible to read the comments in a header from a JPEG2000 file. (#6841)
-
Added the ability for <span class="title-ref">sunpy.map.Map</span> to load files from a generator. (#7024)
-
Added <span class="title-ref">~sunpy.coordinates.PlanarScreen</span> for interpreting 2D <span class="title-ref">~sunpy.coordinates.Helioprojective</span> coordinates as being on the inside of a planar screen. (#7115)
-
Added the ability to pass
clip_intervaltosunpy.map.mapsequence.MapSequence.plot. (#7253) -
Add support for the
fillkeyword in~sunpy.map.GenericMap.draw_contoursto allow for filled contours. (#7281) -
~sunpy.coordinates.get_horizons_coordnow supports time arrays with up to 10,000 elements. (#7319) -
Add an example of plotting a rectangle on a map with a rotation angle relative to the axes (
sphx_glr_generated_gallery_plotting_plot_rotated_rectangle.py). (#7348) -
Added testing and explicit support for Python 3.12. (#7351)
-
Added warning when importing a submodule without installing that submodules extra dependencies. (#7369)
-
Added a warning message for
rsunmismatch in~sunpy.map.GenericMap.reproject_tomethod. (#7370) -
Added a new optional extra group to install "opencv" if you want to it for affine transforms.
pip install sunpy[opencv] (`#7383 <https://github.com/sunpy/sunpy/pull/7383>`__) -
Increased minimum versions for:
- asdf >= 2.12.0
- asdf-astropy >= 0.2.0
- astropy >= 5.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 >= 4.6.0.66
- pandas >= 1.4.0
- python >= 3.10
- reproject >= 0.9.0
- requests >= 2.28.0
- scikit-image >= 0.19.0
- scipy >= 1.8.0
- spiceypy >= 5.0.0
- tqdm >= 4.64.0
- zeep >= 4.1.0 (#7383)
-
sunpy.map.GenericMap.draw_contoursdon't run internal transform code iftransformkeyword is provided. (#7427) -
Update ASDF schemas for upcoming ASDF standard 1.6.0. (#7432)
-
Add a new map source <span class="title-ref">~sunpy.map.sources.gong.GONGHalphaMap</span> for GONG H-Alpha data. (#7451)
-
Added
~sunpy.coordinates.spice.get_rotation_matrixto obtain the rotation matrix between the orientations of two SPICE frames, which is particularly useful for transforming vector fields. (#7452) -
Allow units to be passed to <span class="title-ref">~sunpy.map.header_helper.make_fitswcs_header</span> as strings. (#7454)
-
A new client (<span class="title-ref">sunpy.net.dataretriever.ADAPTClient</span>) has been added to search and download ADAPT files. (#7463)
-
<span class="title-ref">sunpy.net.jsoc.JSOCClient</span> queries now return the SUMS directory paths as the segment key value in the results table. (#7469)
-
Allow the screen radius to be set when using <span class="title-ref">~sunpy.coordinates.SphericalScreen</span>. (#7532)
-
Added a "core" extra group that does not install any truly optional dependencies. It only includes the dependencies that are required to import sunpy and all subpackages.
This means it will not install:
- asdf
- glymur
- opencv
- scikit-image
- spiceypy (#7536)
-
Updated
sunpy.map.GenericMap.submapto check if it is about to work on locations with NaNs now errors and informs the user that they likely want to use~sunpy.coordinates.Helioprojective.assume_spherical_screenso that the off-disk 2D coordinate can be converted to a 3D coordinate. (#7543) -
<span class="title-ref">~sunpy.map.GenericMap</span> will now assign units of DN without a warning or error. (#7585)
-
Add a new map source <span class="title-ref">~sunpy.map.sources.ADAPTMap</span> for ADvanced Adaptive Prediction Technique (ADAPT) data files. (#7640)
-
Added support for JSOC's HMI millisecond TAI time format. Previously, it would only work with seconds. (#7656)
-
Added build support for aarch64 wheels. (#7679)
Bug Fixes
- Long object names are no longer truncated in the logging output of
~sunpy.coordinates.get_horizons_coord. (#7319) - When calling
sunpy.map.GenericMap.rotateon an integer data array, withmissingset to NaN (the default value), the method will now itself raise an informative error message instead deferring to NumPy to raise the error. (#7344) - Fixed the appearance of a double "Notes" heading in <span class="title-ref">~sunpy.map.Map</span> subclasses. (#7376)
- <span class="title-ref">~sunpy.map.Map</span> with UINT8 data will now not error on plotting due to normalization. We now skip adding a normalization. (#7422)
- When calling
~sunpy.map.GenericMap.reproject_toalong with both context managers~sunpy.coordinates.propagate_with_solar_surfaceand~sunpy.coordinates.Helioprojective.assume_spherical_screennow raises a warning. (#7437) - Fix a bug which caused
Fido.searchto crash due to SSL certificate verification error for the <span class="title-ref">~sunpy.net.helio.HECClient</span> now returns no results and logs a warning in this case. (#7446) - Fixed the sanitization of the names of files downloaded via VSO so that periods are no longer replaced and case is no longer forced to be lowercase. (#7453)
- The creation of the series string for a JSOC query was not adding the correct escape characters for comparison values for keywords. This was causing the JSOC to error. (#7467)
- The EVE L0CS client now uses the new URLs for the data from LASP. (#7483)
- JPEG2000 files are now saved with the correct orientation. Previously they would be vertically flipped when saved. (#7486)
- Fixed a very minor inaccuracy in three <span class="title-ref">sunpy.map</span> utility functions (
~sunpy.map.contains_full_disk,~sunpy.map.coordinate_is_on_solar_disk, and~sunpy.map.is_all_off_disk) resulting from the accidental use of the small-angle approximation. (#7512) - The
~sunpy.map.GenericMap.rotatefunction now correctly updates the NAXISi. (#7522) - Added a check in <span class="title-ref">sunpy.physics.differential_rotation.solar_rotate_coordinate</span> to ensure the input frame has an "observer" attribute before replicating frame attributes, preventing potential issues with frames lacking this attribute. (#7526)
- Fixed an inaccuracy in the implementation of <span class="title-ref">~sunpy.coordinates.HeliocentricEarthEcliptic</span> and <span class="title-ref">~sunpy.coordinates.GeocentricSolarEcliptic</span> such that the Earth was not exactly in the XY plane, but rather had an error of up ~10 meters. (#7530)
- The maximum records in <span class="title-ref">~sunpy.net.helio.HECClient</span> now are 20000. (#7540)
- Fixed a bug with any coordinate transformation starting in <span class="title-ref">~sunpy.coordinates.GeocentricEarthEquatorial</span> (GEI) returning output with AU as the length unit, rather than preserving the length unit of the initial coordinate. (#7545)
- Fixed a bug that interfered with
astropy.wcs.utils.celestial_frame_to_wcswhen working with a custom subclass of~sunpy.coordinates.frames.SunPyBaseCoordinateFrame. (#7594) - Fixed bug where conversion of results from the HEKClient to Astropy Time failed when some values where empty or missing for the values of event_strattime, event_endtime or event_peaktime (#7627)
- Fix the <span class="title-ref">~sunpy.map.sources.gong.GONGHalphaMap.rsun_obs</span> to use correct header information
solar-rkeyword. (#7652) - Fix compilation with gcc 14, avoid implicit pointer conversions. (#7662)
- Fixed a bug where "DN" was not able to be parsed by <span class="title-ref">~sunpy.map.header_helper.make_fitswcs_header</span> due to strict checking against the FITS standard. This is now consistent with how unit strings are parsed in <span class="title-ref">~sunpy.map.GenericMap</span>. (#7730)
- Fixed a bug where <span class="title-ref">~sunpy.map.sources.XRTMap</span> was still defaulting to counts rather than DN. (#7744)
Documentation
- Added a how-to guide for manipulating grid lines on <span class="title-ref">~sunpy.map.GenericMap</span>. (#6978)
- Created a how to guide on fixing metadata that is either missing or incorrect before passing the header into the <span class="title-ref">~sunpy.map.Map</span> class. (#7262)
- Fixed the usage of
~sunpy.map.GenericMap.superpixelinsphx_glr_generated_gallery_map_map_resampling_and_superpixels.py. (#7316) - Added Clarification on setting JSOC Email. (#7329)
- Added explanation text to
sphx_glr_generated_gallery_plotting_plotting_blank_map.pyabout the offset between "(0, 0)" in helioprojective coordinates and the heliographic equator. (#7352) - Convert draw rectangle gallery example into a how-to guide(
sunpy-how-to-create-rectangle-on-map) (#7435) - Fix a VSO doctest due to VSO now returning level one EIT data. (#7483)
- Add an example gallery entry demonstrating how to use the coordinates framework to compute intersections between instrument lines of sight and a simulation domain. (#7491)
- Updated the examples for
~sunpy.visualization.colormaps.color_tables.hmi_mag_color_tablethat used older styles of plotting (#7692)
Internal Changes
-
sunpy.net.jsoc.JSOCClient.fetchcalleddrmsAPI that passed aprogresskeyword which added extra print statements to the console. This has been removed indrms0.7.0, which had breaking API changes within this release. As a result, we increased the minimum required version ofdrmsto 0.7.1.This specifically refers to the following information that was printed to the console by default:
"Export request pending. [id=X, status=X]""Waiting for X seconds...""Request not found on server, X retries left."These were handled by
drmsand are now logging messages.If you want to silence these messages, you can set the logging level to
WARNINGor higher.import logging drms_logger = logging.getLogger("drms") drms_logger.setLevel(logging.WARNING) from sunpy.net import fido, attrs
Note, you have to do it before you import
fido. (#7307) -
The function
~sunpy.coordinates.get_horizons_coordno longer calls theastroquerypackage, soastroqueryis no longer a dependency. (#7319) -
The
requestspackage is a now formally a core dependency.requestswas already commonly installed as an implied dependency of <span class="title-ref">sunpy.net</span> or for building documentation. (#7319) -
<span class="title-ref">~sunpy.net.jsoc.attrs.Notify</span> checks that a valid email address has been given as a value. (#7342)
-
The
delim_whitespacekeyword in <span class="title-ref">pandas.read_csv</span> is deprecated and was updated withsep='\s+'. This should have no affect on the output of the code. (#7350) -
Fixed an environment-specific failure of a unit test for
sunpy.coordinates.Helioprojective.is_visible. (#7356) -
Moved to
pyproject.tomland removedsetup.pyandsetup.cfg. (#7384) -
pyerfais now a new direct dependency. It has been an indirect dependency from sunpy 3.1, over two years ago. (#7397) -
Increased Python minimum version to be >= 3.10. (#7402)
-
Fixed an unnecessary division computation when performing a unsupported division operation using a <span class="title-ref">~sunpy.map.Map</span>. (#7551)
-
Updated the internal URL for the <span class="title-ref">~sunpy.net.dataretriever.sources.norh.NoRHClient</span> to point to a HTTPS archive of the NoRH data. (#7696)