title: How to fit multiple curves into one function using python?
body: <p>I have a function containing 2 dependent variables (x1 and x2), 2 parameters (a and b), producing 1 independent variable (y). </p>
  
  <p>Below the link are experimenetal values in nested arrays where column 1 is x1, column 2 is x2 and column 3 is y.</p>
  
  <p><a href="http://pastebin.com/j1LA9JcW" rel="nofollow">http://pastebin.com/j1LA9JcW</a></p>
  
  <p>I used <code>scipy.optimize.curve_fit</code> to solve for parameters 'a' and 'b'</p>
  
  <p>The problem is python somehow thinks that the data needs to be fitted back to the initial point. As described in the link below</p>
  
  <p><a href="http://imgur.com/twKzqNr" rel="nofollow">http://imgur.com/twKzqNr</a></p>
  
  <p>Specifically I used this function to solve for the parameters.</p>
  
  <pre><code>scipy.optimize.curve_fit(func, x1 and x2 in one array,y, guess parameters)
  </code></pre>
  
  <p>I do not exactly know why it is like the graph as shown but could it be the x1 and x2 array needs to separate into 2 arrays, because there are 2 curves? If so, what is the way to do so?</p>
  
  <p>Any advice is greatly appreciated.</p>