I am fitting lots of curves and so far I have yet to make it through all of my data as I keep getting this error:
raise RuntimeError("Optimal parameters not found: " + errmsg)

RuntimeError: Optimal parameters not found: Number of calls to function has reached maxfev = 1000.

I have found the cause to be having fewer than 3 points in the past but this latest error eludes me. This question has been asked before but a full explanation of the various causes of such errors has yet to be given. maybe we can create that here.

I have created a test program for the latest error:

```
import math

import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import numpy as np

rho = [-0.,          0.00722022,  0.000258,   -0.,          0.00722022,  0.00601504,
  0.00120482,  0.00090416,  0.00135318,  0.00361011,  0.00361011,  0.00328299,
 -0.,         -0.,         -0.]
theta = [1.20336943e-03, 7.27272727e-03, 2.58064516e-04, 2.71428571e-01,
 1.81818182e-02, 6.05143722e-04, 1.20627262e-03, 7.23981900e-03,
 9.03342367e-04, 3.62318841e-03, 3.62318841e-03, 9.88142292e-04,
 5.41516245e-03, 2.70758123e-03, 3.61010830e-03]

def power_law(x, a, b):
    return a*np.power(x, b)

popt, pcov = curve_fit(power_law, rho, theta, maxfev=1000)

x_eval = np.linspace(min(rho), max(rho), 100)

plt.plot(rho, theta, 'ro',label="Original Data")
plt.plot(x_eval, power_law(x_eval, *popt), label="Power Law Fitted Curve")
plt.legend(loc='upper left')
plt.show()

```