hyperspy._components.power_law module

class hyperspy._components.power_law.PowerLaw(A=1000000.0, r=3.0, origin=0.0)

Bases: hyperspy.component.Component

Power law component

f(x) = A*(x-x0)^-r

Parameter Attribute
   
A A
r r
x0 origin

The left_cutoff parameter can be used to set a lower threshold from which the component will return 0.

estimate_parameters(signal, x1, x2, only_current=False, out=False)

Estimate the parameters by the two area method

Parameters:
  • signal (Signal1D instance) –
  • x1 (float) – Defines the left limit of the spectral range to use for the estimation.
  • x2 (float) – Defines the right limit of the spectral range to use for the estimation.
  • only_current (bool) – If False, estimates the parameters for the full dataset.
  • out (bool) – If True, returns the result arrays directly without storing in the parameter maps/values. The returned order is (A, r).
Returns:

Return type:

{bool, tuple of values}

function(x)
grad_A(x)
grad_origin(x)
grad_r(x)