Changeset f151ddf in sasview


Ignore:
Timestamp:
May 14, 2010 2:41:09 PM (15 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:
a378756
Parents:
4470b10
Message:

Found and fixed Nontype error on cal_chi2 w/ data.dy ==None

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitting.py

    rf72333f rf151ddf  
    13171317        # default chisqr 
    13181318        chisqr = None 
     1319         
    13191320        # return None if data == None 
    13201321        if data == None: return chisqr 
    1321  
     1322         
    13221323        # Get data: data I, theory I, and data dI in order 
    13231324        if data.__class__.__name__ =="Data2D": 
     
    13291330            # 1 d theory from model_thread is only in the range of index 
    13301331            if index == None: index = numpy.ones(len(data.y),ntype=bool) 
    1331              
     1332            if data.dy== None or data.dy ==[]: 
     1333                data.dy= numpy.ones(len(data.y)) 
     1334            else: 
     1335                data.dy[data.dy==0]=1  ## Set consitently w/AbstractFitengine: But this should be corrected later. 
    13321336            fn = data.y[index]  
    13331337            gn = self.theory_data.y 
Note: See TracChangeset for help on using the changeset viewer.