ess.powder.types.DspacingData#
- class ess.powder.types.DspacingData(x: SUPER)[source]#
Data converted to d-spacing.
- __init__(self, data: Variable, coords: Mapping[str, Variable] | Iterable[tuple[str, Variable]] = {}, masks: Mapping[str, Variable] | Iterable[tuple[str, Variable]] = {}, attrs: Mapping[str, Variable] | Iterable[tuple[str, Variable]] = {}, name: str = '') None #
DataArray initializer.
- Parameters:
data – Data and optionally variances.
coords – Coordinates referenced by dimension.
masks – Masks referenced by name.
attrs – Attributes referenced by dimension.
name – Name of the data array.
Methods
__init__
(self, data[, coords, masks, attrs, ...])DataArray initializer.
all
([dim])Logical AND over input values.
any
([dim])Logical OR over input values.
assign_attrs
([attrs])Return new object with updated or inserted attrs.
assign_coords
([coords])Return new object with updated or inserted coordinate.
assign_masks
([masks])Return new object with updated or inserted masks.
astype
(self, type, *[, copy])Converts a Variable or DataArray to a different dtype.
bin
([arg_dict, dim])Create binned data by binning input along all dimensions given by edges.
broadcast
(*[, dims, shape, sizes])Broadcast a Variable or a DataArray.
ceil
(*[, out])Round up to the nearest integer of all values passed in x.
copy
(self[, deep])Return a (by default deep) copy.
deprecated_drop_attrs
(*args, **kwargs)Overloaded function.
drop_attrs
(*args)Drop attrs.
drop_coords
(*args, **kwargs)Overloaded function.
drop_masks
(*args, **kwargs)Overloaded function.
flatten
([dims, to])Flatten multiple dimensions into a single dimension.
floor
(*[, out])Round down to the nearest integer of all values passed in x.
fold
(dim, *[, dims, shape, sizes])Fold a single dimension of a variable or data array into multiple dims.
group
(*args[, dim])Create binned data by grouping input by one or more coordinates.
groupby
(group, *[, bins])Group dataset or data array based on values of specified labels.
hist
([arg_dict, dim])Compute a histogram.
max
([dim])Maximum of elements in the input.
mean
([dim])Arithmetic mean of elements in the input.
median
([dim])Compute the median of the input values.
min
([dim])Minimum of elements in the input.
nanhist
([arg_dict, dim])Compute a histogram, skipping NaN values.
nanmax
([dim])Maximum of elements in the input ignoring NaN's.
nanmean
([dim])Arithmetic mean of elements in the input ignoring NaN's.
nanmedian
([dim])Compute the median of the input values ignoring NaN's.
nanmin
([dim])Minimum of elements in the input ignoring NaN's.
nanstd
([dim])Compute the standard deviation of the input values ignoring NaN's.
nansum
([dim])Sum of elements in the input ignoring NaN's.
nanvar
([dim])Compute the variance of the input values ignoring NaN's.
plot
(**kwargs)Wrapper function to plot data.
rebin
([arg_dict])Rebin a data array or dataset.
rename
([dims_dict])Rename the dimensions, coordinates, and attributes.
rename_dims
([dims_dict])Rename dimensions.
round
(*[, out])Round to the nearest integer of all values passed in x.
save_hdf5
(filename)Write an object out to file in HDF5 format.
squeeze
([dim])Remove dimensions of length 1.
std
([dim])Compute the standard deviation of the input values.
sum
([dim])Sum of elements in the input.
to
(*[, unit, dtype, copy])Converts a Variable or DataArray to a different dtype and/or a different unit.
transform_coords
([targets, graph, ...])Compute new coords based on transformations of input coords.
transpose
([dims])Transpose dimensions of the input.
underlying_size
(self)Return the size of the object in bytes.
var
([dim])Compute the variance of the input values.
Attributes
attrs
Dict of attrs.
bins
Returns helper
scipp.Bins
allowing bin-wise operations to be performed or None if not binned data.coords
Dict of coords.
data
Underlying data item.
deprecated_attrs
Dict of attrs.
deprecated_meta
Dict of coords and attrs.
dim
The only dimension label for 1-dimensional data, raising an exception if the data is not 1-dimensional.
dims
Dimension labels of the data (read-only).
dtype
Data type contained in the variable.
masks
Dict of masks.
meta
Dict of coords and attrs.
name
The name of the held data.
ndim
Number of dimensions of the data (read-only).
shape
Shape of the data (read-only).
size
Number of elements in the data (read-only).
sizes
dict mapping dimension labels to dimension sizes (read-only).
unit
Physical unit of the data.
value
The only value for 0-dimensional data, raising an exception if the data is not 0-dimensional.
values
Array of values of the data.
variance
The only variance for 0-dimensional data, raising an exception if the data is not 0-dimensional.
variances
Array of variances of the data.