You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and the m.redchisq snippet from line 51:
def redchisq(ydata,ymod,deg=2,unc=None):
chisq=0
if unc==None:
chisq=np.sum((ydata-ymod)**2)
else:
diff=ydata-ymod
div=diff/unc
square=(div)**2
chisq=np.sum(square)
return chisq
The text was updated successfully, but these errors were encountered:
Are you normalizing the model at all before you calculate chi squared in your code? If you look at lines 98-107 in calc_chisq (i'd paste them but I'm on a bus with my phone for Internet), I normalize the model to the data before I calculate chi squared. If you don't do that, or use a different method, that may account for at least some of the problem
The link to my chi^2 routine: https://github.com/paigegiorlagodfrey/gof_model_fitting/blob/master/chi_squared_fit_routine.py
and the m.redchisq snippet from line 51:
def redchisq(ydata,ymod,deg=2,unc=None):
chisq=0
if unc==None:
chisq=np.sum((ydata-ymod)**2)
else:
diff=ydata-ymod
div=diff/unc
square=(div)**2
chisq=np.sum(square)
return chisq
The text was updated successfully, but these errors were encountered: