curve.fit

Oscillator

A sine wave centered on a constant level. Use it for periodic data without noticeable damping, such as an AC voltage or a pendulum’s angle over a few swings.

Start with your own data

Parameters

Amplitude.
Angular frequency, or wavenumber, in radians per unit of x. The period is 2π/k.
Phase, in radians. Reported between −π and π.
The constant level the oscillation is centered on.

Tips

  • curve.fit does not estimate k automatically, so enter a guess: 2π divided by the period you see in the data.
  • Include several points per cycle and at least one full cycle.
  • A negative Aₒ with δ shifted by π describes the same curve.
  • If the amplitude shrinks over time, use Damped Oscillator.

Related models