Trigonometric Functions#
Sine#
You can compute the sine value for each signal sample by calling the
method sin()
.
A new Trace
instance labeled with the performed transformation
'sin'
is returned.
>>> from math import pi
>>> Trace('Signal', [-pi, -pi/2, 0, pi/2, pi]).sin()
Trace(label='Signal:sin',
samples=[-1.2246467991473532e-16, -1.0, 0.0, 1.0, 1.2246467991473532e-16])
(Source code, html)
Cosine#
You can compute the cosine value for each signal sample by calling the
method cos()
.
A new Trace
instance labeled with the performed transformation
'cos'
is returned.
>>> from math import pi
>>> Trace('Signal', [-pi, -pi/2, 0, pi/2, pi]).cos()
Trace(label='Signal:cos',
samples=[-1.0, 6.123233995736766e-17, 1.0, 6.123233995736766e-17, -1.0])
(Source code, html)
Tangent#
You can compute the tangent value for each signal sample by calling the
method tan()
.
A new Trace
instance labeled with the performed transformation
'tan'
is returned.
>>> from math import pi
>>> Trace('Signal', [-pi, -pi/2, 0, pi/2, pi]).tan()
Trace(label='Signal:tan',
samples=[1.2246467991473532e-16,
-1.633123935319537e+16,
0.0,
1.633123935319537e+16,
-1.2246467991473532e-16])
(Source code, html)
Arc Sine#
You can compute the arc sine value for each signal sample by calling the
method asin()
.
A new Trace
instance labeled with the performed transformation
'asin'
is returned.
>>> Trace('Signal', [-1, 0, 1]).asin()
Trace(label='Signal:asin',
samples=[-1.5707963267948966, 0.0, 1.5707963267948966])
(Source code, html)
Arc Cosine#
You can compute the arc cosine value for each signal sample by calling the
method acos()
.
A new Trace
instance labeled with the performed transformation
'acos'
is returned.
>>> Trace('Signal', [-1, 0, 1]).acos()
Trace(label='Signal:acos',
samples=[3.141592653589793, 1.5707963267948966, 0.0])
(Source code, html)
Arc Tangent#
You can compute the arc tangent value for each signal sample by calling the
method atan()
.
A new Trace
instance labeled with the performed transformation
'atan'
is returned.
>>> from math import pi
>>> Trace('Signal', [-pi, 0, pi]).atan()
Trace(label='Signal:atan',
samples=[-1.2626272556789115, 0.0, 1.2626272556789115])
(Source code, html)
Hyperbolic Sine#
You can compute the hyperbolic sine value for each signal sample by calling
the method sinh()
.
A new Trace
instance labeled with the performed transformation
'sinh'
is returned.
>>> Trace('Signal', [-1, 0, 1]).sinh()
Trace(label='Signal:sinh',
samples=[-1.1752011936438014, 0.0, 1.1752011936438014])
(Source code, html)
Hyperbolic Cosine#
You can compute the hyperbolic cosine value for each signal sample by calling
the method cosh()
.
A new Trace
instance labeled with the performed transformation
'cosh'
is returned.
>>> Trace('Signal', [-1, 0, 1]).cosh()
Trace(label='Signal:cosh',
samples=[1.5430806348152437, 1.0, 1.5430806348152437])
(Source code, html)
Hyperbolic Tangent#
You can compute the hyperbolic tangent value for each signal sample by calling
the method tanh()
.
A new Trace
instance labeled with the performed transformation
'tanh'
is returned.
>>> Trace('Signal', [-1, 0, 1]).tanh()
Trace(label='Signal:tanh',
samples=[-0.7615941559557649, 0.0, 0.7615941559557649])
(Source code, html)
Area Hyperbolic Sine#
You can compute the area hyperbolic sine value for each signal sample by
calling the method asinh()
.
A new Trace
instance labeled with the performed transformation
'asinh'
is returned.
>>> Trace('Signal', [-1, 0, 1]).asinh()
Trace(label='Signal:asinh',
samples=[-0.881373587019543, 0.0, 0.881373587019543])
(Source code, html)
Area Hyperbolic Cosine#
You can compute the area hyperbolic cosine value for each signal sample by
calling the method acosh()
.
A new Trace
instance labeled with the performed transformation
'acosh'
is returned.
>>> from math import pi
>>> Trace('Signal', [1, pi/2, pi]).acosh()
Trace(label='Signal:acosh',
samples=[0.0, 1.0232274785475506, 1.8115262724608532])
(Source code, html)
Area Hyperbolic Tangent#
You can compute the area hyperbolic tangent value for each signal sample by
calling the method atanh()
.
A new Trace
instance labeled with the performed transformation
'atanh'
is returned.
>>> # epsilon for a 32-bit floating-point number
>>> epsilon = 2 ** -24
>>> Trace('Signal', [-1.0 + epsilon, 0, 1.0 - epsilon]).atanh()
Trace(label='Signal:atanh',
samples=[-8.664339742098155, 0.0, 8.664339742098155])
(Source code, html)