At first glance, the model appears to describe the data quite well, with the possible exception of the points where \(V_{pd}\left(\theta\right)\) is a maximum.  To quantity the goodness of fit, however, we will need to evaluate the fit residuals and chi-square test goodness of fit. See section \ref{304456}
Note: there are additional features of the curve_fit function not demonstrated here, including the ability to set lower and upper bounds on each of the adjustable parameters. For example, setting the option bounds = ([0, -np.pi,  -1.0], [np.inf, +np.pi, 1.0])
 would then force the best fit parameters to stay in the range   \(0\ \le I_0\)\(-\pi\le\theta_0\ \le\pi\) in rad, and \(-1\ \le\text{offset}\ \le+1\).  See the scipy.optimize.curve_fit documentation for details. 

Evaluating the goodness of fit

We now have a best fit of the model to the data. How good a fit is it? That is, how well does the model describe the data, taking into account the uncertainty in each data point? Two quick ways to test the goodness of fit of the model to the data are through calculations of the residuals and the reduced chi-square value.  See \cite{Hughes2010} and \cite{herman2011}

residuals

The calculation of the residual errors is easy once the model is defined and the fitting parameters determined.  Here is an example: