Changeset 0ec0405 in sasview


Ignore:
Timestamp:
Mar 10, 2009 9:20:44 AM (16 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:
21d2eb0
Parents:
4ef9dff
Message:

fixed sigular. at sum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/qsmearing.py

    rfe2ade9 r0ec0405  
    111111                    counts += self._weights[q_i][i] 
    112112                    #print "i,iq[i],self._weights[q_i][i] ",i,iq[i],self._weights[q_i][i] 
    113             iq_smeared[q_i] = sum/counts  
     113            if counts == 0: 
     114                iq_smeared[q_i] = 0 
     115            else: 
     116                iq_smeared[q_i] = sum/counts  
    114117            #print "q_i,iq_smeared[q_i]",q_i,iq[i],iq_smeared[q_i] 
    115118            #print "iq[i],iq_smeared[q_i],sum,counts,self.nbins",iq[i], iq_smeared[q_i],sum,counts,self.nbins 
Note: See TracChangeset for help on using the changeset viewer.