SelfPower¶
Description¶
Computes the result of a coefficient-wise \((x/a)^{\pm x/a}\) function.
The objects handles two transformations selfpower
and selfpower_inv
for positive and negative power
respectively. Inputs and outputs are the same.
Inputs¶
selfpower.points
andselfpower_inv.points
— \(x\), input array (not histogram).
Outputs¶
selfpower.result
andselfpower_inv.result
— \(f\), the function result of the same shape as \(x\).
Variables¶
sp_scale
— \(a\), scale to be applied to \(x\).
Arguments¶
const char* scalename="sp_scale"
— the variable name for \(a\) may be optionally redefined via constructor argument.
Tests¶
Use the following commands for the usage example and testing:
./tests/detector/test_selfpower.py
Implementation¶
The result of the selfpower
is:
and for the selfpower_inv
is:
Since \(x\) may be multidimensional \(i\) in these equations may represent hyper-index.