hotstepper.Steps.smooth_step

Steps.smooth_step(xdata, smooth_factor=None, smooth_basis=None, process_input=True)

This is a mathematical function definition of the Steps object, this is a dynamically created formula representation that can be passed an array of values to evaluate the steps function at. If a basis other than the default (Heaviside) is assigned and no new basis is provided, this function will return the same result as a call to the step function. If the default basis is assigned, and no new basis is provided, the Logit basis will be temporarily assigned, the result generated and the basis will be reset to the default.

Parameters
  • xdata (array_like(int, float, datetime)) – The values the steps function is the be evaluated at using the assigned mathematical basis function.

  • smooth_factor (int, float, Optional) – A value used to tune the strength of the smoothing for the assigned basis. If no value is provided, a value will be generated internally.

  • smooth_basis (Basis, Optional) – The new basis to assigned to perform the smoothing with. If the provided basis has the default value for the param property, a value will be generated internally.

  • process_input (bool, Optional) – Indicate if the input data needs processing, to convert datetimes to floats for calculation. Primarily used internally to avoid converting input data twice.

Returns

The values of the cummulative steps function evaluated at the provided input (x axis) values using the smooth basis.

Return type

array

See also

step, fast_step