fitting.cosine2

fitting.cosine2(x, a, b, c, d=0.0)

A cosine squared.

Parameters:
  • x (array) – x-values.
  • a (float) – Amplitude.
  • b (float) – Frequency (rad).
  • c (float) – Phase (rad).
  • d (float) – Offset.
Returns:

f(x) = a \cos^2(2 \pi b x + c) + d.

Note

This is not the same as (cosine())**2!