Releases: sunpy/ndcube
Releases · sunpy/ndcube
2.4.0
Breaking Changes
- The minimum supported version of some dependencies has increased:
- Make ndcube.NDCube.crop exclude rightward pixel when upper limit determined from world points falls exactly on a pixel edge. (#874)
New Features
- Add support for serialization of most ndcube objects to ASDF files. (#776)
- Allows addition of an
NDCubeandNDData(with the WCS ofNDDatabeing set to None), and combines their uncertainties and masks. (#794) - Added Ellipsis functionality to ndcube.mixins.ndslicing (#818)
- Added
fill_maskedmethod toNDCube, a new feature which allows users to replace masked values and uncertainty values with user-given fill values, to change the mask values back to False or not (Default), and to set whether the new instance is returned (Default) or not. (#829) - Allows multiplication of an
NDCubeandNDData(with the WCS ofNDDatabeing set to None), and handles their units, uncertainties and masks. (#840) - Allow constructing a NDCollection with a dictionary. (#841)
- Enable subtraction and division of ~ndcube.NDCube by an ~astropy.nddata.NDData instance (without a WCS), including uncertainty, mask and unit support. (#880)
- Add new method, ndcube.NDCube.to_nddata, which allows easy conversion of an ~ndcube.NDCube to a subclass of ~astropy.nddata.NDData. Attribute values can be altered during the conversion by supplying the new values via kwargs. (#887)
- ~ndcube.NDCube now accepts
global_coords=andextra_coords=in the constructor of the class. (#892)
Bug Fixes
- Removed the check for compatible coordinate systems within ~ndcube.NDCube.reproject_to as it was redundant. (#833)
- Fix conversion in ~ndcube.wcs.wrappers.resampled_wcs.ResampledLowLevelWCS between original and resampled pixel grids. This fixes an accuracy issue in
NDCubeobjects which have had the ndcube.NDCube.rebin method applied. (#857) - Enable length-1 inputs to ndcube.NDCube.crop, not only scalars. (#863)
- Fix bug in ndcube.NDCube.crop revealed by trying to crop a 1-D cube. It was caused by the code creating a ~astropy.wcs.wcsapi.SlicedLowLevelWCS object with a
slice(None)slice item. (#872) - Prevent ~ndcube.NDCube.crop cropping array axes of a cube to length 0 when: 1, an input point is below the extent of the cube due to misinterpreting negative array indices; 2, all point lie above the extent of the cube. (#874)
- Fixed adding unitful ~ndcube.NDCube and
astropy.nddata.NDDataobjects backed bydasknot preserving underlying arrays asdaskarrays. (#880) - Fix bug where error was returned rather than raised with trying to perform arithmetic operation between ~ndcube.NDCube and an object whose WCS attribute is not
None. (#880)
Documentation
- Clarified an error message that cropping to single pixel is not supported only when
keepdims=False(the default value). (#869) - Fix a mistake in the docstring for ndcube.NDCube.rebin, which misdescribed the behaviour of the
-1sentinel value. (#885)
Internal Changes
2.3.4
2.3.3
Bug Fixes
- Fix conversion in ~ndcube.wcs.wrappers.resampled_wcs.ResampledLowLevelWCS between original and resampled pixel grids. This fixes an accuracy issue in
NDCubeobjects which have had the ndcube.NDCube.rebin method applied. (#857)
Documentation
- Clarified an error message that cropping to single pixel is not supported only when
keepdims=False(the default value). (#869)
v2.3.2
What's Changed
- Backport PR #824 on branch 2.3 (Updates from the package template) by @meeseeksmachine in #825
- Backport PR #834 on branch 2.3 (Avoid using deprecated
astropy.utils.isiterable()) by @meeseeksmachine in #835 - Backport PR #837 on branch 2.3 (Update logo so white snake matches blue background) by @meeseeksmachine in #838
- Backport PR #833 on branch 2.3 (Remove physical-type equality check in reproject_to) by @meeseeksmachine in #839
- [2.3] Manual backports by @nabobalis in #850
- Backport PR #852 on branch 2.3 (workaround for numpy checking string arrays found in sunraster) by @meeseeksmachine in #853
- Backport PR #802 on branch 2.3 (Skip plotting line data if it's all NaNs) by @meeseeksmachine in #854
- Backport PR #855 on branch 2.3 (Too fast on merge) by @meeseeksmachine in #856
Full Changelog: v2.3.1...v2.3.2
v2.3.1
What's Changed
- Backport PR #812 on branch 2.3 (Updates from the package template) by @meeseeksmachine in #813
- Backport PR #816 on branch 2.3 (Updates from the package template) by @meeseeksmachine in #817
- Backport PR #819 on branch 2.3 (Updates from the package template) by @meeseeksmachine in #820
- Backport PR #821 on branch 2.3 (Updates from the package template) by @meeseeksmachine in #822
Full Changelog: v2.3.0...v2.3.1
v2.3.0
Breaking Changes
- "dimensions" property on
ndcube.NDCubeandndcube.NDCubeSequencehave been deprecated and replaced by "shape" (#684)
Removals
- The ability to create an
.NDCollectionobject with numerical keys is deprecated as it leads to ambiguous behavior when slicing the collection. (#778)
New Features
- Add Sliceable
ndcube.meta.NDMetaclass for axis-associated metadata. (#455) - Added a new
ndcube.NDCube.squeezemethod tondcube.NDCube. It will remove all axes of length 1. (#669) - Added
ndcube.NDCube.quantityattribute tondcube.NDCubeto return the data array with in the cube with the physical units stored in thendcube.NDCube.unitattribute. (#677) - Enable
ndcube.NDCubeto be raised to a power. (#678) - Added
ndcube.NDCube.shapeas a replacement for "dimensions". (#684) - Enable rtruediv on
~ndcube.NDCubesuch that a user can now do 1/ndcube.NDCube. (#685) - Add a
keepdims=Falsekwarg tondcube.NDCube.cropandndcube.NDCube.crop_by_valuessetting to true keeps length-1 dimensions default behavior drops these dimensions. (#732) - When calling
ndcube.NDCubeBase.axis_world_coordsorndcube.NDCubeBase.axis_world_coords_valueswith 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
-1as an element of thebin_shapeargument to.NDCube.rebinwhich will not rebin along that dimension (sets the bin shape to equal the data shape). (#777) - It is now possible to set the
NDCube.dataproperty of a cube with an array of the same shape and unit as the current cube. (#795)
Bug Fixes
ndcube.NDCube.rebinbin_shapeargument 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
CompoundLowLevelWCSso that in handlespixel_boundsif only one component WCS sets a pixel bound. (#772) - Fixed a bug which caused
NDCubeSequence.cube_like_dimensionsto 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 (
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 (
sphx_glr_generated_gallery_creating_a_gwcs_from_quantities.py) showcasing how to create a GWCS from quantities. (#695)
Internal Changes
v2.2.4
Full Changelog: v2.2.3...v2.2.4
v2.2.3
v2.2.2
v2.2.1post
Fix version in the documentation sidebar.