title: Fit sine curve to points that are not equally spaced - no parameter is known
body: <p>I have a set of data points that are measured points of a bore and that are not equally spaced, and I would like to fit a sine curve to them. Could you help me, please? We would like to examine the shape differences between this bore and a perfect circle shaped bore.</p>
  
  <p>I have had a look at <a href="https://stackoverflow.com/questions/16716302/how-do-i-fit-a-sine-curve-to-my-data-with-pylab-and-numpy">this</a> question, but the solutions either assume equal spacing or assume that a parameter is known. I have had a look at <a href="https://stackoverflow.com/questions/14197045/linear-non-linear-fit-to-a-sine-curve">this</a> too, but the author has points with equal spacing (they mention FFT as an option).</p>
  
  <p>I would like to fit a curve to a series of data points in the following form:</p>
  
  <p>y(x) = K + A * sin[o*(x+c)]</p>
  
  <p>where K, A, o, and c are the real paramters I am looking for, assuming that o is an integer in the interval [1;25].</p>
  
  <p><a href="https://paste.ee/p/6nTrD" rel="nofollow noreferrer">Sample bore data</a>.</p>
  
  <p>Thank you in advance!</p>
  
  <p>Edit: I added the physical meaning of the points, and sample data.</p>