streamobs.functions module

streamobs.functions module#

Function definitions.

class streamobs.functions.Line(slope=0.0, intercept=0.0, **kwargs)[source]#

Bases: BoundedFunction

Line function. Evaluated as:

y(x) = slope*x + intercept

class streamobs.functions.Sinusoid(amplitude=1.0, period=1.0, phase=0.0, offset=0.0, **kwargs)[source]#

Bases: BoundedFunction

Sinusoid function. Evaluated as:

y(x) = amplitude/2 * cos( 2pi*(x - phase)/period ) + amplitude/2+offset

streamobs.functions.function_factory(type_, **kwargs)[source]#

Create a function with given kwargs.

Parameters:
  • type (function type)

  • kwargs (passed to function init)

  • Returns

  • -------

  • func (the function)