smpl.functions

A list of various functions.

const(x, m)

const(x) = \(m\)

cos(x, a, f, phi)

cos(x,a,f,phi) = \(a \cos{\left(2 \pi f \left(- \phi + x\right) \right)}\)

cos_abs(x, a, f, phi)

cos_abs(x,a,f,phi) = \(a \left|{\cos{\left(2 \pi f \left(- \phi + x\right) \right)}}\right|\)

cube(x, a, b, c, d)

cube(x,a,b,c,d) = \(a x^{3} + b x^{2} + c x + d\)

exp(x, c, y_0)

exponential(x,c,y_0) = \(y_{0} e^{c x}\)

gauss(x, x_0, a, d, y)

gauss(x,x_0,a,d,y) = \(a e^{\frac{\left(-1\right) \left(x - x_{0}\right)^{2}}{2 d^{2}}} + y\)

line(x, a, b)

line(x,a,b) = \(a x + b\)

linear(x, m)

linear(x,m) = \(m x\)

log(x, c, y_0)

log(x,c,y_0) = \(y_{0} \log{\left(c x \right)}\)

lorentz(x, x_0, a, d, y)

lorentz(x,x_0,a,d,y) = \(\frac{a}{\pi d \left(1 + \frac{\left(x - x_{0}\right)^{2}}{d^{2}}\right)} + y\)

sin(x, a, f, phi)

sin(x,a,f,phi) = \(a \sin{\left(2 \pi f \left(- \phi + x\right) \right)}\)

sqrt(x, a, b, c)

sqrt(x,a,b,c) = \(a \sqrt{b + x} + c\)

square(x, x_0, a, y)

square(x,x_0,a,y) = \(a \left(x - x_{0}\right)^{2} + y\)

tan(x, a, f, phi)

tan(x,a,f,phi) = \(a \tan{\left(2 \pi f \left(- \phi + x\right) \right)}\)

Functions

smpl.functions.const(x, m)[source]

const(x) = \(m\)

>>> from smpl.functions.functions import const
>>> from smpl import plot
>>> plot.function(const,4,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-1.png
smpl.functions.cos(x, a, f, phi)[source]

cos(x,a,f,phi) = \(a \cos{\left(2 \pi f \left(- \phi + x\right) \right)}\)

>>> from smpl.functions.functions import cos
>>> from smpl import plot
>>> plot.function(cos,3,0.02,3,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-2.png
smpl.functions.cos_abs(x, a, f, phi)[source]

cos_abs(x,a,f,phi) = \(a \left|{\cos{\left(2 \pi f \left(- \phi + x\right) \right)}}\right|\)

>>> from smpl.functions.functions import cos_abs
>>> from smpl import plot
>>> plot.function(cos_abs,3,0.02,3,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-3.png
smpl.functions.cube(x, a, b, c, d)[source]

cube(x,a,b,c,d) = \(a x^{3} + b x^{2} + c x + d\)

>>> from smpl.functions.functions import cube
>>> from smpl import plot
>>> plot.function(cube,1,5,0,-2,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-4.png
smpl.functions.exp(x, c, y_0)

exponential(x,c,y_0) = \(y_{0} e^{c x}\)

>>> from smpl.functions.functions import exponential
>>> from smpl import plot
>>> plot.function(exponential,0.5,4,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-5.png
smpl.functions.gauss(x, x_0, a, d, y)[source]

gauss(x,x_0,a,d,y) = \(a e^{\frac{\left(-1\right) \left(x - x_{0}\right)^{2}}{2 d^{2}}} + y\)

>>> from smpl.functions.functions import gauss
>>> from smpl import plot
>>> plot.function(gauss,0,5,3,0,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-6.png
smpl.functions.line(x, a, b)[source]

line(x,a,b) = \(a x + b\)

>>> from smpl.functions.functions import line
>>> from smpl import plot
>>> plot.function(line,2,-1,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-7.png
smpl.functions.linear(x, m)[source]

linear(x,m) = \(m x\)

>>> from smpl.functions.functions import linear
>>> from smpl import plot
>>> plot.function(linear,2,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-8.png
smpl.functions.log(x, c, y_0)[source]

log(x,c,y_0) = \(y_{0} \log{\left(c x \right)}\)

>>> from smpl.functions.functions import log
>>> from smpl import plot
>>> plot.function(log,0.5,4,xmin=0.1,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-9.png
smpl.functions.lorentz(x, x_0, a, d, y)[source]

lorentz(x,x_0,a,d,y) = \(\frac{a}{\pi d \left(1 + \frac{\left(x - x_{0}\right)^{2}}{d^{2}}\right)} + y\)

>>> from smpl.functions.functions import lorentz
>>> from smpl import plot
>>> plot.function(lorentz,0,5,3,0,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-10.png
smpl.functions.sin(x, a, f, phi)[source]

sin(x,a,f,phi) = \(a \sin{\left(2 \pi f \left(- \phi + x\right) \right)}\)

>>> from smpl.functions.functions import sin
>>> from smpl import plot
>>> plot.function(sin,3,0.02,3,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-11.png
smpl.functions.sqrt(x, a, b, c)[source]

sqrt(x,a,b,c) = \(a \sqrt{b + x} + c\)

>>> from smpl.functions.functions import sqrt
>>> from smpl import plot
>>> plot.function(sqrt,1,3.3,0,xmin=0,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-12.png
smpl.functions.square(x, x_0, a, y)[source]

square(x,x_0,a,y) = \(a \left(x - x_{0}\right)^{2} + y\)

>>> from smpl.functions.functions import square
>>> from smpl import plot
>>> plot.function(square,1,5,0,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-13.png
smpl.functions.tan(x, a, f, phi)[source]

tan(x,a,f,phi) = \(a \tan{\left(2 \pi f \left(- \phi + x\right) \right)}\)

>>> from smpl.functions.functions import tan
>>> from smpl import plot
>>> plot.function(tan,3,0.02,3,xmin=-5,xmax=5)

(Source code, png, hires.png, pdf)

../_images/smpl-functions-14.png