Changeset f31ab59 in sasview for Invariant


Ignore:
Timestamp:
Dec 2, 2009 9:59:37 AM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
3bb37ef
Parents:
f521f61
Message:

workign on testing invariant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Invariant/invariant.py

    rf521f61 rf31ab59  
    148148        # The data should be private 
    149149        self._data = self._get_data(data) 
    150          
     150       
    151151        # Since there are multiple variants of Q*, you should force the 
    152152        # user to use the get method and keep Q* a private data member 
     
    207207            #Process only data that inherited from DataLoader.Data_info.Data1D 
    208208            raise ValueError,"Data must be of type DataLoader.Data1D" 
    209         return self._scale * data - self._background 
     209        new_data = self._scale * data - self._background 
     210        new_data.dxl = data.dxl 
     211        new_data.dxw = data.dxw 
     212        return new_data 
    210213         
    211214    def _fit(self, function, qmin=Q_MINIMUM, qmax=Q_MAXIMUM): 
     
    615618        """ 
    616619        data = self._get_extra_data_high() 
    617         return self._get_qstar( data=data) 
     620        return self._get_qstar(data=data) 
    618621         
    619622    def _get_extra_data_low(self): 
     
    658661        dxw = None 
    659662        if self._data.dxl is not None: 
    660             dxl = numpy.ones(1, INTEGRATION_NSTEPS) 
     663            dxl = numpy.ones(INTEGRATION_NSTEPS) 
    661664            dxl = dxl * self._data.dxl[0] 
    662665        if self._data.dxw is not None: 
    663             dxw = numpy.ones(1, INTEGRATION_NSTEPS) 
     666            dxw = numpy.ones(INTEGRATION_NSTEPS) 
    664667            dxw = dxw * self._data.dxw[0] 
    665668             
     
    708711        dxw = None 
    709712        if self._data.dxl is not None: 
    710             dxl = numpy.ones(1, INTEGRATION_NSTEPS) 
     713            dxl = numpy.ones(INTEGRATION_NSTEPS) 
    711714            dxl = dxl * self._data.dxl[0] 
    712715        if self._data.dxw is not None: 
    713             dxw = numpy.ones(1, INTEGRATION_NSTEPS) 
     716            dxw = numpy.ones(INTEGRATION_NSTEPS) 
    714717            dxw = dxw * self._data.dxw[0] 
    715718             
     
    718721        data_max.dxw = dxw 
    719722        self._data.clone_without_data(clone=data_max) 
    720          
     723     
    721724        return data_max 
    722725     
Note: See TracChangeset for help on using the changeset viewer.