Changeset cdeed9f in sasview for sansdataloader/src/sans/dataloader


Ignore:
Timestamp:
Jun 20, 2012 12:52:15 PM (12 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:
9ec0955
Parents:
c4f79f0
Message:

fixed the problem instead of removing the utest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansdataloader/src/sans/dataloader/data_info.py

    r0008f54 rcdeed9f  
    10341034         
    10351035        """ 
    1036         print "numpy.size(self.data)=", numpy.size(self.data) 
    10371036        # First, check the data compatibility 
    10381037        dy, dy_other = self._validity_check(other) 
    10391038        result = self.clone_without_data(numpy.size(self.data)) 
    1040         result.data = self.data 
    1041         result.qx_data = self.qx_data 
    1042         result.qy_data = self.qy_data 
    1043         result.q_data = self.q_data 
    1044         result.mask = self.mask 
    1045         result.xmin = self.xmin 
    1046         result.xmax = self.xmax 
    1047         result.ymin = self.ymin 
    1048         result.ymax = self.ymax 
    1049          
    1050         if self.err_data is not None: 
    1051             result.err_data = self.err_data     
    1052         if self.dqx_data is not None: 
    1053             result.dqx_data = self.dqx_data 
    1054         if self.dqy_data is not None: 
    1055             result.dqy_data = self.dqy_data 
    10561039        if self.dqx_data == None or self.dqy_data == None: 
    10571040            result.dqx_data = None 
    10581041            result.dqy_data = None 
    10591042        else: 
    1060             result.dqx_data = numpy.zeros(numpy.size(self.data)) 
    1061             result.dqy_data = numpy.zeros(numpy.size(self.data)) 
    1062          
     1043            result.dqx_data = numpy.zeros(len(self.data)) 
     1044            result.dqy_data = numpy.zeros(len(self.data)) 
    10631045        for i in range(numpy.size(self.data)): 
     1046            result.data[i] = self.data[i] 
     1047            if self.err_data is not None and \ 
     1048                numpy.size(self.data) == numpy.size(self.err_data): 
     1049                result.err_data[i] = self.err_data[i]     
     1050            if self.dqx_data is not None: 
     1051                result.dqx_data[i] = self.dqx_data[i] 
     1052            if self.dqy_data is not None: 
     1053                result.dqy_data[i] = self.dqy_data[i] 
     1054            result.qx_data[i] = self.qx_data[i] 
     1055            result.qy_data[i] = self.qy_data[i] 
     1056            result.q_data[i] = self.q_data[i] 
     1057            result.mask[i] = self.mask[i] 
     1058             
    10641059            a = Uncertainty(self.data[i], dy[i]**2) 
    10651060            if isinstance(other, Data2D): 
Note: See TracChangeset for help on using the changeset viewer.