Changeset c6d3301 in sasview


Ignore:
Timestamp:
Jun 8, 2010 4:29:30 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:
d85fdcb2
Parents:
061c69f
Message:

set dy = 1 only when all dy ==0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/AbstractFitEngine.py

    raa36f96 rc6d3301  
    169169            self.dy= numpy.asarray(dy) 
    170170      
    171         # For fitting purposes, replace zero errors by 1 
     171        # For fitting purposes, replace zero errors by 1 if all of them are zero 
    172172        #TODO: check validity for the rare case where only 
    173         # a few points have zero errors  
    174         self.dy[self.dy==0]=1 
     173        # all points have zero errors  
     174        if self.dy.all()==0: self.dy = 1 
    175175         
    176176        ## Min Q-value 
     
    219219        # Identify the bin range for the unsmeared and smeared spaces 
    220220        self.idx = (self.x>=self.qmin) & (self.x <= self.qmax) 
     221        self.idx = self.idx & (self.dy!=0)   ## zero error can not participate for fitting 
    221222        self.idx_unsmeared = (self.x>=self._qmin_unsmeared) & (self.x <= self._qmax_unsmeared) 
    222223   
Note: See TracChangeset for help on using the changeset viewer.