Releases: nexpy/nexusformat
Releases · nexpy/nexusformat
Minor bug fixes and enhancements
- Generalizes the NXdata
moment
function to compute moments of arbitrary order of one-dimensional data. - Adds a cell to install
nexus format
if necessary in the Jupyter Notebook tutorial. - Improves casting of array-like values when creating NXfields.
- Allows
maxshape
to be defined when creating an NXfield. - Fixes a bug with plotting NXdata groups with size-1 axes.
Bug fixes and enhancements
- Reads HDF5 soft links as NXlink objects. NeXus only uses hard links, but this allows non-conforming files to be loaded.
- Improves selection of default axes when plotting NXfields.
- Improves the printing of NeXus trees that contain long string attributes and unresolved links.
- Improves handling of null values in NXfields.
- Allows full paths to NeXus objects to be used when checking for keys in group dictionaries.
- Fixes the behavior of NXfield iterator functions when the value is not iterable.
Bug fix
Attribute bug fixes
Version 0.4.15 contained a serious bug affecting the handling of NeXus attributes, which has triggered a number of changes to how the package handles byte string attributes.
- Adds the
nxvalue
property to both NeXus attributes and fields, i.e., NXattr and NXfield objects. Whereas thenxdata
property contains the value in the original form that is stored in the NeXus file, thenxvalue
property converts all byte strings to (unicode) strings, string arrays to lists of strings, and size-1 arrays to scalars. This allows Python scripts to utilize the stored values consistently, without being affected by low-level details of how they are stored in the HDF5 files. - Fixes a bug reading NeXus attributes containing byte string arrays.
- Fixes a bug where empty 'NX_class' attributes are added when reading groups with no NeXus class specified.
- Fixes a bug when the target attribute of a linked object is stored as a byte string.
Bug fixes and enhancements
- Updates the list of NeXus base classes.
- Improves the
nxaxes
property for NXfields that are not default signals. It now returns the same as the group's default axes if the dimensions are compatible. Multiple signals within a group will now be over-plotted on the same axes. - Allows NXlinks to be used as signals and axes when creating an NXdata group.
- Adds the
uncertainties
attribute to signals if an error field is specified when creating an NXdata group. - Automatically converts NXentry groups to a class of NXsubentry when they are assigned to other groups. NXentry groups should only be at the top level of a NeXus file.
- Adds
nxversion
, set to the API version number, to the attributes imported by default. - Fixes a bug with the file paths of external links embedded in another external link (Fix for #51)
- Fixes a bug when saving external links with absolute file paths.
- Makes the
maxshape
attribute compatible with scalar fields. - Improves consistency of storing fixed-length string arrays as attributes.
Minor bug fixes and enhancements
- Adds ability to use NXdata slicing to set and remove masks. This also removes the mask attribute and field from the signal when none of the data is masked and fixes a bug in setting masks.
- Modifies the
short_tree
function to display the attributes of the first item. This makes the NeXpy tree tooltips more useful, without increasing their length substantially. - Improves handling of externally linked data pointing to non-existent files.
- Fixes a bug setting NXfield properties.
- Fixes a bug using the NXfield sum command with multiple axes.
Minor bug fixes and enhancements
- Traps
h5py
exceptions when an HDF5 file contains invalid attribute values. This ensures that the HDF5 file will still load. - Improves writing of generic (i.e., non-NeXus) HDF5 files by removing unneeded class attributes.
- Adds a Jupyter Notebook tutorial to the distribution.
Miscellaneous bug fixes
- Fixes a bug when transposing axes in data projections, caused by the restrictions on changing the shape of an existing group item.
- Fixes a bug when renaming NXroot objects
- Fixes a bug in reading axes defined by byte strings
- Ensures that plotting axes that are also NXlinks do not use the parents' name, since these may be generic.
- Makes deep copies of linked items use the children's name, for similar reasons to the previous issue.
- New
sum
andaverage
functions are added to NXfields.
Minor bug fix
- Fixes a bug with renaming fields or groups when the data have not been saved to a file.
- Improves error message when referencing missing attributes in an object without a parent group.
Bug fixes
- Improves the handling of external links, especially if an externally linked group contains internal links.
- Improves error messages when overwriting existing fields, which is allowed if the new value has the same shape. The
replace
function must be used when the shapes do not match. - Allows all the ways of identifying field uncertainties supported by the NeXus standard.
- Uses "." to denote empty axes in conformance with the NeXus standard.
- Fixes the parsing of
axes
attributes that generated a FutureWarning. - Limits the number of recursions used in the
short_tree
property to two. - Ensures that natural sorting is used in printed trees, i.e.,
scan_10
comes afterscan_2
. - Fixes a bug in the
NXstack
script, which could cause missing frames at the end of the stack.