Free functions
Contents
Free functions#
General#
|
Create binned data by binning input along all dimensions given by edges. |
|
Create a binned variable from bin indices. |
|
Create a binned variable by "broadcasting" fill values to bins of given sizes. |
|
Choose slices of choices base on coord values. |
|
Slice down the input object until only the supplied keep dimension is left (effectively 'collapsing' all but one dimension), and return a dict of 1D slices. |
|
Create dense data by histogramming data along all dimension given by edges. |
|
Element-wise logical negation. |
|
Element-wise logical and. |
|
Element-wise logical or. |
|
Element-wise logical exclusive-or. |
|
Create a "lookup table" from a histogram (data array with bin-edge coord). |
|
Merge two datasets into one. |
|
Computes the points in the middle of adjacent elements of x. |
|
Rebin a dimension of a data array or dataset. |
|
Create helper object for reduction operations over list or tuple of inputs. |
|
Slice input along given dim, and return all the slices in a dict. |
|
Sort variable along a dimension by a sort key or dimension label |
|
Return object containing the stddevs of the input as values. |
|
Convert the variable to a different unit. |
|
Compute new coords based on transformations of input coords. |
|
Return the object without variances. |
|
Return object containing the variances of the input as values. |
|
Return elements chosen from x or y depending on condition. |
Math#
|
Element-wise absolute value. |
|
Element-wise addition. |
|
Round up to the nearest integer of all values passed in x. |
|
Element-wise cross product. |
|
Element-wise true division. |
|
Element-wise dot product. |
|
Computes the error function. |
|
Computes the complementary error function. |
|
Element-wise exponential. |
|
Round down to the nearest integer of all values passed in x. |
|
Element-wise floor division. |
|
Element-wise natural logarithm. |
|
Element-wise base 10 logarithm. |
|
Element-wise remainder. |
|
Element-wise product. |
|
Element-wise negative. |
|
Element-wise norm. |
|
Element-wise power. |
|
Element-wise reciprocal. |
|
Round to the nearest integer of all values passed in x. |
|
Element-wise square-root. |
|
Element-wise difference. |
Shape#
|
Broadcast a Variable or a DataArray. |
|
Concatenate input arrays along the given dimension. |
|
Flatten multiple dimensions of a variable or data array into a single dimension. |
|
Fold a single dimension of a variable or data array into multiple dims. |
|
Remove dimensions of length 1. |
|
Transpose dimensions of a variable, a data array, or a dataset. |
Comparison#
Comparison operators compare element-wise and ignore variances.
|
Verifies that ALL element-wise comparisons meet the condition: |
|
Check if the values of a variable are sorted. |
|
Element-wise '==' (equal). |
|
Element-wise '>' (greater). |
|
Element-wise '>=' (greater_equal). |
|
Full comparison of x and y. |
|
Compares values (x, y) element by element against absolute and relative tolerances (non-symmetric). |
|
Check if the values of a variable are evenly spaced. |
|
Check if the values of a variable are sorted. |
|
Element-wise '<' (less). |
|
Element-wise '<=' (less_equal). |
|
Element-wise '!=' (not_equal). |
inf and nan handling#
Special-value (inf and nan) checks. inf and nan in the variances is ignored.
|
Element-wise isnan (true if an element is nan). |
|
Element-wise isinf (true if an element is inf). |
|
Element-wise isfinite (true if an element is finite). |
|
Element-wise isposinf (true if an element is a positive infinity). |
|
Element-wise isneginf (true if an element is a negative infinity). |
|
Element-wise special value replacement. |
Reduction#
Reduction operations are operations to remove one or more dimension, e.g., by performing a sum over all elements along a dimension.
|
Element-wise AND over the specified dimension or all dimensions if not provided. |
|
Element-wise OR over the specified dimension or all dimensions if not provided. |
|
Return the cumulative sum along the specified dimension. |
|
Element-wise max over the specified dimension or all dimensions if not provided. |
|
Element-wise mean over the specified dimension. |
|
Element-wise min over the specified dimension or all dimensions if not provided. |
|
Element-wise max ignoring not a number values over the specified dimension or all dimensions if not provided. |
|
Element-wise mean over the specified dimension ignoring NaNs. |
|
Element-wise min ignoring not at number values over the specified dimension or all dimensions if not provided. |
|
Element-wise sum over the specified dimension; NaNs ignored. |
|
Element-wise sum over the specified dimension. |
Trigonometric#
|
Element-wise sine. |
|
Element-wise cosine. |
|
Element-wise tangent. |
|
Element-wise inverse sine. |
|
Element-wise inverse cosine. |
|
Element-wise inverse tangent. |
|
Element-wise inverse tangent of y/x determining the correct quadrant. |
Geometric#
|
Element-wise zip functionality to produce a 3 element vector. |
Construct a rotation matrix from quaternions. |
Group-by (split-apply-combine)#
Reduction#
|
Group dataset or data array based on values of specified labels. |
Counts#
“Counts” refers to the default unit of data after histogramming. It is also known as frequency. This can be converted into a counts (frequency) density, e.g., for visualization purposes.
|
Converts counts to count density on a given dimension. |
|
Converts counts to count density on a given dimension. |
Visualization#
|
Show a graphical representation of a variable or dataset. |
|
Show graphical representation of a graph as required by |
|
Create a html table from the contents of a Dataset (0D and 1D Variables only), DataArray, Variable or raw numpy array. |
|
|
|
Plot a Scipp object. |
Compatibility#
|
Convert a scipp object (Variable, DataArray or Dataset) to a python dict. |
|
Convert a python dict to a scipp Variable, DataArray or Dataset. |
|
Converts a pandas.DataFrame or pandas.Series object into a scipp Dataset or DataArray respectively. |
|
Convenience method to convert an xarray object into the corresponding scipp object. |
Logging#
Return the global logger used by scipp. |
|
Display the log widget associated with the scipp logger. |