Skip to content

2.4.0

Latest

Choose a tag to compare

@Cadair Cadair released this 14 Jan 15:00
· 7 commits to main since this release
v2.4.0
76c5821

Breaking Changes

  • The minimum supported version of some dependencies has increased:
    • python >= 3.11
    • astropy >= 6.1
    • gwcs >= 0.21
    • numpy >= 1.26
    • scipy >= 1.12
    • matplotlib >= 3.9
    • mpl_animators >= 1.2
    • reproject >= 0.14 (#776, #889)
  • 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 NDCube and NDData (with the WCS of NDData being set to None), and combines their uncertainties and masks. (#794)
  • Added Ellipsis functionality to ndcube.mixins.ndslicing (#818)
  • Added fill_masked method to NDCube, 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 NDCube and NDData (with the WCS of NDData being 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= and extra_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 NDCube objects 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.NDData objects backed by dask not preserving underlying arrays as dask arrays. (#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 -1 sentinel value. (#885)

Internal Changes

  • Make ~ndcube.visualization.mpl_plotter.MatplotlibPlotter only add data to line plots if at least one value of the data is unmasked and finite. (#802)
  • Breaks test_ndcube module into multiple to make development and maintenance easier. (#844)