cosinor function

Evaluate trigonometric basis expansion