tail fitting updates

Adding the first version of the tail fit bias study script, and some updates to the original tail fitting to print a chi-squared value for the fit.