if you are trying to fit data with a certain periodic function
f(x) = f(x + p), where p is the period,
you can still estimate p via a least squares estiamtion. :)
Hint: Taylor expansion.
I thought all physics students know about Hilbert space. the least squares
estimation is the best approximation in a Hilbert space.