Skip to content

v7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Feb 08:19

6.0.0 (2024-07-19)

Breaking Changes

  • Arguments for ~sunpy.map.GenericMap.reproject_to after the target WCS are now keyword-only. (#7339)

  • Arguments for sunpy.timeseries.GenericTimeSeries.peek are 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_file and sunpy.io.write_file are 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-BEG key for <span class="title-ref">.GenericMap.date</span> while continuing to use DATE-AVG as 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-OBS continues to have the highest priority, but now DATE-BEG has higher priority than DATE-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 dateavg and 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_screen has been deprecated in favor of <span class="title-ref">~sunpy.coordinates.SphericalScreen</span>. (#7115)
  • sunpy.physics.differential_rotation.diff_rot has been deprecated and replaced by sunpy.sun.models.differential_rotation. (#7409)
  • Deprecated all positional arguments in sunpy.map.GenericMap.plot method. The annotate, axes, title, clip_interval arguments should be passed as keyword arguments (e.g., ..., title=True, ...) instead. (#7421)
  • The keyword response_format in sunpy.net.vso.VSOClient.search has been deprecated. This was introduced to preserve legacy behaviour of the VSO client, to return sunpy.net.vso.legacy_response.QueryResponse instead 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 older sunpy.net.vso.legacy_response.QueryResponse class will be removed in sunpy 7.0. The keyword progress in sunpy.net.hek2vso.H2VClient.full_query has been deprecated and will be removed in sunpy 7.0. (#7468)

Removals

  • sunpy.database has been removed. (#7320)
  • sunpy.map.header_helper.meta_keywords has been removed. (#7337)
  • sunpy.net.helioviewer.HelioviewerClient has 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_file will 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_interval to sunpy.map.mapsequence.MapSequence.plot. (#7253)

  • Add support for the fill keyword in ~sunpy.map.GenericMap.draw_contours to allow for filled contours. (#7281)

  • ~sunpy.coordinates.get_horizons_coord now 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 rsun mismatch in ~sunpy.map.GenericMap.reproject_to method. (#7370)

  • Added a new optional extra group to install "opencv" if you want to it for affine transforms.

    pip install sunpy[opencv] (`#7383 &lt;https://github.com/sunpy/sunpy/pull/7383&gt;`__)
  • Increased minimum versions for:

    • asdf &gt;= 2.12.0
    • asdf-astropy &gt;= 0.2.0
    • astropy &gt;= 5.2.0
    • beautifulsoup4 &gt;= 4.11.0
    • cdflib &gt;= 0.4.4
    • dask &gt;= 2022.5.2
    • h5netcdf &gt; =1.0.0
    • h5py &gt;= 3.7.0
    • lxml &gt;= 4.9.0
    • opencv-python &gt;= 4.6.0.66
    • pandas &gt;= 1.4.0
    • python &gt;= 3.10
    • reproject &gt;= 0.9.0
    • requests &gt;= 2.28.0
    • scikit-image &gt;= 0.19.0
    • scipy &gt;= 1.8.0
    • spiceypy &gt;= 5.0.0
    • tqdm &gt;= 4.64.0
    • zeep &gt;= 4.1.0 (#7383)
  • sunpy.map.GenericMap.draw_contours don't run internal transform code if transform keyword 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_matrix to 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.submap to 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_screen so 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.rotate on an integer data array, with missing set 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_to along with both context managers ~sunpy.coordinates.propagate_with_solar_surface and ~sunpy.coordinates.Helioprojective.assume_spherical_screen now raises a warning. (#7437)
  • Fix a bug which caused Fido.search to 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.rotate function 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_wcs when 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-r keyword. (#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.superpixel in sphx_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.py about 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_table that used older styles of plotting (#7692)

Internal Changes

  • sunpy.net.jsoc.JSOCClient.fetch called drms API that passed a progress keyword which added extra print statements to the console. This has been removed in drms 0.7.0, which had breaking API changes within this release. As a result, we increased the minimum required version of drms to 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 drms and are now logging messages.

    If you want to silence these messages, you can set the logging level to WARNING or 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_coord no longer calls the astroquery package, so astroquery is no longer a dependency. (#7319)

  • The requests package is a now formally a core dependency. requests was 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_whitespace keyword in <span class="title-ref">pandas.read_csv</span> is deprecated and was updated with sep='\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.toml and removed setup.py and setup.cfg. (#7384)

  • pyerfa is 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 &gt;= 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)