Changeset c7e8898 in sasview


Ignore:
Timestamp:
Oct 10, 2011 10:11:50 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1fa4db39
Parents:
d67a66a
Message:

park chi2/N from the engine

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    r90a2358 rc7e8898  
    20612061            if self.engine_type == "park":   
    20622062                npt_fit = float(self.get_npts2fit())  
    2063                 if npt_fit > 0: 
    2064                     chisqr =chisqr/npt_fit     
     2063                # Taking care this in parkemgine 
     2064                #if npt_fit > 0: 
     2065                #    chisqr =chisqr/npt_fit     
    20652066            chi2 = format_number(chisqr, True)     
    20662067            self.tcChi.SetValue(chi2)     
  • park_integration/src/sans/fit/ParkFitting.py

    rcef2da8 rc7e8898  
    99#import time 
    1010import numpy 
     11import math 
    1112#import park 
    1213from park import fit 
     
    277278                N = len(m.residuals) 
    278279                m.degrees_of_freedom = N-k if N>k else 1 
    279                 m.chisq = numpy.sum(m.residuals**2) 
    280                 resid.append(m.weight*m.residuals) 
     280                m.chisq = numpy.sum(m.residuals**2/N)  
     281                resid.append(m.weight*m.residuals/math.sqrt(N)) 
    281282        self.residuals = numpy.hstack(resid) 
    282283        N = len(self.residuals) 
Note: See TracChangeset for help on using the changeset viewer.