Changeset 3082632 in sasview


Ignore:
Timestamp:
Jan 13, 2010 2:17:52 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:
59a41066
Parents:
6939bd4
Message:

fixed uncertaintly in fit/unittest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Invariant/invariant.py

    r2a11d09 r3082632  
    9191        self._qmin_unsmeared = self.qmin 
    9292        self._qmax_unsmeared = self.qmax     
    93          
    9493        if self.smearer is not None: 
    9594            self._first_unsmeared_bin, self._last_unsmeared_bin = self.smearer.get_bin_range(self.qmin, self.qmax) 
     
    108107        """ 
    109108        fx = numpy.zeros(len(self.data.x)) 
    110  
    111109        # Uncertainty 
    112         if type(self.data.y)==numpy.ndarray and len(self.data.y)==len(self.data.x): 
    113             sigma = self.data.y 
     110        if type(self.data.dy)==numpy.ndarray and len(self.data.dy)==len(self.data.x): 
     111            sigma = self.data.dy 
    114112        else: 
    115113            sigma = numpy.ones(len(self.data.x)) 
     
    122120         
    123121        fx[self.idx_unsmeared] = fx[self.idx_unsmeared]/sigma[self.idx_unsmeared] 
    124          
     122 
    125123        ##power is given only for function = power_law     
    126124        if power != None: 
Note: See TracChangeset for help on using the changeset viewer.