v0.4.0
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 supporttransform
for all types. - Comparison functions such as
less
,greater_equal
, ... all
andany
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
andfrom_dict
. - New functions
collapse
andslices
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
(previouslypulse_times
),source-position
(previouslysource_position
),sample-position
(previouslysample_position
),detector-info
(previouslydetector_info
). scipp.neutron.load
must useadvanced_geometry=True
option for loadingdetector-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)
- Before:
- Plot with keyword argument
collapse
has been removed in favour of two more generic free functions that return adict
of data arrays that can then directly be passed to theplot
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 withndim-1
dimensions contaiing all dimensions other than'x'
.
Contributors
Owen Arnold, David Fairbrother, Simon Heybrock, Daniel Nixon, Pawel Ptasznik, Piotr Rozyczko, and Neil Vaytet