hyperspy._components.expression module

class hyperspy._components.expression.Expression(expression, name, position=None, module='numpy', autodoc=True, add_rotation=False, rotation_center=None, compute_gradients=True, **kwargs)

Bases: hyperspy.component.Component

Create a component from a string expression.

compile_function(module='numpy', position=False)
function_nd(*args)

Returns a numpy array containing the value of the component for all indices. If enought memory is available, this is useful to quickly to obtain the fitted component without iterating over the navigation axes.