diff --git a/.mailmap b/.mailmap index 30bc6de0d..204b0dcc9 100644 --- a/.mailmap +++ b/.mailmap @@ -14,3 +14,9 @@ Ricky O'Steen Ricky O'Steen <39831871+rosteen@users.noreply. Kris Stern Kris Stern Matthew J. West <69257591+mwest007@users.noreply.github.com> Dr Matthieu Wes <69257591+mwest007@users.noreply.github.com> Will Barnes Will Barnes +Samuel Bennett CyclingNinja +Samuel Bennett Samuel Bennett +Stuart Mumford Cadair <1391051+Cadair@users.noreply.github.com> +Mihail Bankov Mihail Bankov +Sanvi Sharma ciaokitty +Junyan Huo JunyanHuo <59020618+PCJY@users.noreply.github.com> diff --git a/.zenodo.json b/.zenodo.json index c10d6c11d..f324a650c 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -7,13 +7,18 @@ { "name": "Daniel F. Ryan", "orcid": "0000-0001-8661-3825", - "affiliation": "1 - University of Applied Sciences Northwest Switzerland, Switzerland 2 - American University, USA " + "affiliation": "University College London, Mullard Space Science Laboratory (UCL/MSSL)" }, { "name": "Stuart J. Mumford", "orcid": "0000-0003-4217-4642", "affiliation": "Aperio Software Ltd." }, + { + "name": "Nabil Freij", + "orcid": "0000-0002-6253-082X", + "affiliation": "SETI Institute & Lockheed Martin Solar and Astrophysics Laboratory" + }, { "name": "Yash Sharma", "orcid": "0000-0002-7861-9677", @@ -23,20 +28,20 @@ "name": "Ankit Baruah", "affiliation": "Workato Gmbh, Germany" }, - { - "name": "Nabil Freij", - "orcid": "0000-0002-6253-082X", - "affiliation": "1 - Lockheed Martin Solar and Astrophysics Laboratory, USA 2 - Bay Area Environmental Research Institute, USA" - }, { "name": "Adwait Bhope", "orcid": "0000-0002-7133-8776", "affiliation": "Uptycs India Pvt. Ltd., India" }, + { + "name": "Samuel Bennett", + "orcid": "0000-0001-6420-4422", + "affiliation": "Aperio Software Ltd." + }, { "name": "Laura Hayes", "orcid": "0000-0002-6835-2390", - "affiliation": "European Space Agency, ESTEC" + "affiliation": "Dublin Institute of Advanced Studies (DIAS)" }, { "name": "Ricky O'Steen", @@ -65,18 +70,35 @@ "orcid": "0000-0002-8546-9128", "affiliation": "Aperio Software Ltd." }, + { + "name": "Junyan Huo", + "orcid": "0000-0002-5469-7697", + "affiliation": "University College London" + }, { "name": "David Stansby", "orcid": "0000-0002-1365-1908", "affiliation": "Advanced Research Computing Centre, University College London, UK" }, + { + "name": "Shane Maloney", + "orcid": "0000-0002-4715-1805", + "affiliation": "Trinity College Dublin & Dublin Institute for Advanced Studies" + }, { "name": "J. Marcus Hughes", "orcid": "0000-0003-3410-7650", "affiliation": "Southwest Research Institute, USA" }, { - "name": "Kris Stern" + "name": "Kris Akira Stern", + "orcid": "0000-0003-1613-8947", + "affiliation": "University of Hong Kong & University of London" + }, + { + "name": "Andrew Robbertz", + "orcid": "0009-0008-6857-0882", + "affiliation": "General Dynamics Mission Systems, USA" }, { "name": "Aoife Maria Ryan" @@ -87,6 +109,22 @@ { "name": "Roy Smart" }, + { + "name": "Mihail Bankov" + }, + { + "name": "P. L. Lim", + "orcid": "0000-0003-0079-4114", + "affiliation": "Space Telescope Science Institute, USA" + }, + { + "name": "Samuel J. Van Kooten", + "orcid": "0000-0002-4472-8517", + "affiliation": "Southwest Research Institute" + }, + { + "name": "Sanvi Sharma" + }, { "name": "Dan F-M" }, @@ -100,10 +138,6 @@ "orcid": "0000-0002-0631-2393", "affiliation": "Southwest Research Institute, USA" }, - { - "name": "P. L. Lim", - "affiliation": "Space Telescope Science Institute, USA" - }, { "name": "Shelbe Timothy" } diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9e51b82bd..fb83b2834 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,59 @@ +2.3.0 (2025-01-14) +================== + +Breaking Changes +---------------- + +- "dimensions" property on ~ndcube.NDCube` and `~ndcube.NDCubeSequence` have been deprecated and replaced by "shape" (`#684 `__) + + +Removals +-------- + +- The ability to create an `.NDCollection` object with numerical keys is deprecated as it leads to ambiguous behavior when slicing the collection. (`#778 `__) + + +New Features +------------ + +- Add Sliceable `~ndcube.meta.NDMeta` class for axis-associated metadata. (`#455 `__) +- Added a new `~ndcube.NDCube.squeeze` method to `ndcube.NDCube`. + It will remove all axes of length 1. (`#669 `__) +- Added `~ndcube.NDCube.quantity` attribute to `~ndcube.NDCube` to return the data array with in the cube with the physical units stored in the `~ndcube.NDCube.unit` attribute. (`#677 `__) +- Enable `~ndcube.NDCube` to be raised to a power. (`#678 `__) +- Added `ndcube.NDCube.shape` as a replacement for "dimensions". (`#684 `__) +- Enable rtruediv on`~ndcube.NDCube` such that a user can now do 1/`~ndcube.NDCube`. (`#685 `__) +- Add a ``keepdims=False`` kwarg to `~ndcube.NDCube.crop` and `~ndcube.NDCube.crop_by_values` setting to true keeps length-1 dimensions default behavior drops these dimensions. (`#732 `__) +- When calling :meth:`ndcube.NDCubeBase.axis_world_coords` or :meth:`ndcube.NDCubeBase.axis_world_coords_values` with a + specific axis or axes specified, the methods now avoid doing calculations for any other uncorrelated axes, offering + significant speedups when those other axes are large. (`#767 `__) +- Add support for passing ``-1`` as an element of the ``bin_shape`` argument to `.NDCube.rebin` which will not rebin along that dimension (sets the bin shape to equal the data shape). (`#777 `__) +- It is now possible to set the ``NDCube.data`` property of a cube with an array of the same shape and unit as the current cube. (`#795 `__) + + +Bug Fixes +--------- + +- :meth:`ndcube.NDCube.rebin` ``bin_shape`` argument now accepts a `astropy.units.Quantity` as input if the units are convertible to pixels. (`#744 `__) +- Fix support for astropy 7.0, this involved a change to ``CompoundLowLevelWCS`` so that in handles ``pixel_bounds`` if only one component WCS sets a pixel bound. (`#772 `__) +- Fixed a bug which caused ``NDCubeSequence.cube_like_dimensions`` to break. (`#788 `__) +- Added an internal code to shortcut non-correlated axes avoiding the creation of a full coordinate grid, reducing memory use in specific circumstances. (`#798 `__) + + +Documentation +------------- + +- Added a gallery example (:ref:`sphx_glr_generated_gallery_creating_even_spaced_wavelength_visualisation.py`) showcasing how to create a visualisation of unevenly spaced wavelength data cube using AIA data. (`#691 `__) +- Added a gallery example (:ref:`sphx_glr_generated_gallery_creating_a_gwcs_from_quantities.py`) showcasing how to create a GWCS from quantities. (`#695 `__) + + +Internal Changes +---------------- + +- Move code creating a masked array for `ndcube.NDCube.rebin` to a private function which is then called by `ndcube.NDCube.rebin`. (`#705 `__) +- Added explicit support for numpy 2.0. (`#729 `__) + + 2.2.0 (2023-11-16) ================== diff --git a/RELEASE.rst b/RELEASE.rst index a5cdc9d3b..cc262d40b 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -1,32 +1,24 @@ -The SunPy project is very happy to announce a new release of "ndcube". -ndcube is a package built for handling, inspecting and visualizing a wide -variety of data, of any number of dimensions, along with coordinate information -described by WCS. The `~ndcube.NDCube` provides functionality for slicing -the data, WCS and other metadata simultaneously, plotting and animating, -and associating extra coordinate information along any axis. +This release of ndcube contains 518 commits in 21 merged pull requests closing 5 issues from 12 people, 6 of which are first-time contributors to ndcube. -In addition, the ndcube package provides the `~nddata.NDCubeSequence` -class for representing sequences of `~ndcube.NDCube` objects where the -coordinate information may or may not align, and accessing these sequences in a -way consistent with a singular cube. - -This release of ndcube contains 95 commits in 12 merged pull requests closing 5 issues from 5 people, 2 of which are first time contributors to ndcube. +* 518 commits have been added since 2.2 +* 5 issues have been closed since 2.2 +* 21 pull requests have been merged since 2.2 +* 12 people have contributed since 2.2 +* 6 of which are new contributors The people who have contributed to the code for this release are: - Daniel Ryan - David Stansby * - Nabil Freij - P. L. Lim * - Stuart Mumford (boooooooo) - -Where a * indicates their first contribution to ndcube. - -For more information about ndcube see the `documentation `__. - -ndcube can be installed from pip or conda using the following commands:: - - $ conda install -c conda-forge ndcube - - $ pip install ndcube +- Daniel Ryan +- Junyan Huo * +- Laura Hayes +- Mihail Bankov * +- Nabil Freij +- Sam Van Kooten * +- Samuel Bennett * +- Sanvi Sharma * +- Shane Maloney * +- Stuart Mumford +- Will Barnes + +Where a * indicates that this release contains their first contribution to ndcube. diff --git a/changelog/455.feature.rst b/changelog/455.feature.rst deleted file mode 100644 index 8db6a1c9d..000000000 --- a/changelog/455.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add Sliceable `~ndcube.meta.NDMeta` class for axis-associated metadata. diff --git a/changelog/669.feature.rst b/changelog/669.feature.rst deleted file mode 100644 index b205d7f79..000000000 --- a/changelog/669.feature.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added a new `~ndcube.NDCube.squeeze` method to `ndcube.NDCube`. -It will remove all axes of length 1. diff --git a/changelog/677.feature.rst b/changelog/677.feature.rst deleted file mode 100644 index 52711d4ca..000000000 --- a/changelog/677.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added `~ndcube.NDCube.quantity` attribute to `~ndcube.NDCube` to return the data array with in the cube with the physical units stored in the `~ndcube.NDCube.unit` attribute. diff --git a/changelog/678.feature.rst b/changelog/678.feature.rst deleted file mode 100644 index e2f3e4031..000000000 --- a/changelog/678.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Enable `~ndcube.NDCube` to be raised to a power. diff --git a/changelog/684.breaking.rst b/changelog/684.breaking.rst deleted file mode 100644 index d39495708..000000000 --- a/changelog/684.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -"dimensions" property on ~ndcube.NDCube` and `~ndcube.NDCubeSequence` have been deprecated and replaced by "shape" diff --git a/changelog/684.feature.rst b/changelog/684.feature.rst deleted file mode 100644 index 685ff5d2b..000000000 --- a/changelog/684.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added `ndcube.NDCube.shape` as a replacement for "dimensions". diff --git a/changelog/685.feature.rst b/changelog/685.feature.rst deleted file mode 100644 index f829a574b..000000000 --- a/changelog/685.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Enable rtruediv on`~ndcube.NDCube` such that a user can now do 1/`~ndcube.NDCube`. diff --git a/changelog/691.doc.rst b/changelog/691.doc.rst deleted file mode 100644 index fc7744cb2..000000000 --- a/changelog/691.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added a gallery example (:ref:`sphx_glr_generated_gallery_creating_even_spaced_wavelength_visualisation.py`) showcasing how to create a visualisation of unevenly spaced wavelength data cube using AIA data. diff --git a/changelog/695.doc.rst b/changelog/695.doc.rst deleted file mode 100644 index 101caecec..000000000 --- a/changelog/695.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added a gallery example (:ref:`sphx_glr_generated_gallery_creating_a_gwcs_from_quantities.py`) showcasing how to create a GWCS from quantities. diff --git a/changelog/705.trivial.rst b/changelog/705.trivial.rst deleted file mode 100644 index 7da6d4918..000000000 --- a/changelog/705.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Move code creating a masked array for `ndcube.NDCube.rebin` to a private function which is then called by `ndcube.NDCube.rebin`. diff --git a/changelog/729.trivial.rst b/changelog/729.trivial.rst deleted file mode 100644 index ff977869a..000000000 --- a/changelog/729.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Added explicit support for numpy 2.0. diff --git a/changelog/732.feature.rst b/changelog/732.feature.rst deleted file mode 100644 index 4eddebc48..000000000 --- a/changelog/732.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add a ``keepdims=False`` kwarg to `~ndcube.NDCube.crop` and `~ndcube.NDCube.crop_by_values` setting to true keeps length-1 dimensions default behavior drops these dimensions. diff --git a/changelog/744.bugfix.rst b/changelog/744.bugfix.rst deleted file mode 100644 index 58bda98a7..000000000 --- a/changelog/744.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -:meth:`ndcube.NDCube.rebin` ``bin_shape`` argument now accepts a `astropy.units.Quantity` as input if the units are convertible to pixels. diff --git a/changelog/767.feature.rst b/changelog/767.feature.rst deleted file mode 100644 index 3e633e71e..000000000 --- a/changelog/767.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -When calling :meth:`ndcube.NDCubeBase.axis_world_coords` or :meth:`ndcube.NDCubeBase.axis_world_coords_values` with a -specific axis or axes specified, the methods now avoid doing calculations for any other uncorrelated axes, offering -significant speedups when those other axes are large. diff --git a/changelog/772.bugfix.rst b/changelog/772.bugfix.rst deleted file mode 100644 index 278bb0d32..000000000 --- a/changelog/772.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix support for astropy 7.0, this involved a change to ``CompoundLowLevelWCS`` so that in handles ``pixel_bounds`` if only one component WCS sets a pixel bound. diff --git a/changelog/777.feature.rst b/changelog/777.feature.rst deleted file mode 100644 index de009a6fd..000000000 --- a/changelog/777.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add support for passing ``-1`` as an element of the ``bin_shape`` argument to `.NDCube.rebin` which will not rebin along that dimension (sets the bin shape to equal the data shape). diff --git a/changelog/778.removal.rst b/changelog/778.removal.rst deleted file mode 100644 index 0b21f77f3..000000000 --- a/changelog/778.removal.rst +++ /dev/null @@ -1 +0,0 @@ -The ability to create an `.NDCollection` object with numerical keys is deprecated as it leads to ambiguous behavior when slicing the collection. diff --git a/changelog/788.bugfix.rst b/changelog/788.bugfix.rst deleted file mode 100644 index da32da880..000000000 --- a/changelog/788.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug which caused ``NDCubeSequence.cube_like_dimensions`` to break. diff --git a/changelog/795.feature.rst b/changelog/795.feature.rst deleted file mode 100644 index 1a719e25b..000000000 --- a/changelog/795.feature.rst +++ /dev/null @@ -1 +0,0 @@ -It is now possible to set the ``NDCube.data`` property of a cube with an array of the same shape and unit as the current cube. diff --git a/changelog/798.bugfix.rst b/changelog/798.bugfix.rst deleted file mode 100644 index aa2e8ef18..000000000 --- a/changelog/798.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Added an internal code to shortcut non-correlated axes avoiding the creation of a full coordinate grid, reducing memory use in specific circumstances.