Home > reduc > calcs > chi2_beamfits.m

chi2_beamfits

PURPOSE ^

chi2_beamfits Calculates the chi2 value for the 2d guassian fits

SYNOPSIS ^

function [chisqrd] = chi2_beamfits(par, X, ydata)

DESCRIPTION ^

chi2_beamfits Calculates the chi2 value for the 2d guassian fits

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [chisqrd] = chi2_beamfits(par, X, ydata)
0002 %chi2_beamfits Calculates the chi2 value for the 2d guassian fits
0003 
0004 z = gauss2D_fit(par,X);
0005 
0006 chi2= ((ydata - z).^2)./z;
0007 chisqrd = nansum(chi2);
0008 
0009 end
0010

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005