Skip to content

v0.4.0

Compare
Choose a tag to compare
@DanNixon DanNixon released this 10 Jul 16:50
e011204

Features

  • New realign functionality.
  • Support for event-filtering.
  • Support for subtraction and addition for (realigned) event data.
  • Non-range slicing changed to preserve coords as attrs rather than dropping
  • scipp.neutron: Instrument view with advanced geometry support, showing correct pixel shapes.
  • Instrument view working on doc pages.
  • Made it simpler to add new dtype and support transform for all types.
  • Comparison functions such as less, greater_equal, ...
  • all and any can work over all dimensions as well as explicitly provided dimension argument
  • It is now possible to convert between Scipp objects and Python dictionaries using to_dict and from_dict.
  • New functions collapse and slices can be use to split one or more dimensions of a DataArray to a dict of DataArrays.
  • You can now inspect the global object list of via the repr for scipp showing Datasets, DataArrays and Variables
  • Internal cleanup and documentation additions.

Noteable bug fixes

  • Several fixes in the plotting (non-regular bins, colorbar limits, axes tick labels from unaligned coordinates, etc...)

Breaking changes

  • Coord and attributes names for neutron data have been standardized, now using hyphens instead of underscore, except for subscripts. Affected examples: pulse-time (previously pulse_times), source-position (previously source_position), sample-position (previously sample_position), detector-info (previously detector_info).
  • scipp.neutron.load must use advanced_geometry=True option for loading detector-info and pixel shapes.
  • Normalization of event data cannot be done directly any more, must use realign.
  • Plotting variances in 2D has been removed, and the API for using matplotlib axes has been simplified slightly, since we no longer have axes for variances:
    • Before: plot(..., mpl_axes={"ax": myax0, "cax": myax1})
    • After: plot(..., ax=myax0, cax=myax1)
  • Plot with keyword argument collapse has been removed in favour of two more generic free functions that return a dict of data arrays that can then directly be passed to the plot function:
    • collapse(d, keep='x') slices all dimensions away to keep only 'x', thus always returning 1D slices.
    • slices(d, dim='x') slices along dimension 'x', returning slices with ndim-1 dimensions contaiing all dimensions other than 'x'.

Contributors

Owen Arnold, David Fairbrother, Simon Heybrock, Daniel Nixon, Pawel Ptasznik, Piotr Rozyczko, and Neil Vaytet