Changeset 8077fc4 in sasview for sansmodels/src/sans


Ignore:
Timestamp:
Apr 27, 2009 6:14:35 PM (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:
3ba03a4c
Parents:
6963aa3
Message:

fixed the dispersion problem in P*S

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/MultiplicationModel.py

    r7c3aea3 r8077fc4  
    88class MultiplicationModel(BaseComponent): 
    99    """ 
    10         Use for S(Q)*P(Q). 
     10        Use for P(Q)*S(Q); function call maut be in order of P(Q) and then S(Q). 
    1111        Perform multplication of two models. 
    1212        Contains the models parameters combined. 
     
    9797             
    9898        for name , value in self.model2.dispersion.iteritems(): 
    99             if not name in self.dispersion.keys()and name !='radius': 
     99            # S(Q) has only 'radius' for dispersion. 
     100            if not name in self.dispersion.keys()and name !='radius':  
    100101                self.dispersion[name]= value 
    101102 
     
    235236            if parameter in self.model1.dispersion.keys(): 
    236237                value= self.model1.set_dispersion(parameter, dispersion) 
    237                
    238             elif parameter in self.model2.dispersion.keys(): 
     238            #There is no dispersion for the structure factors(S(Q)).  
     239            #ToDo: need to decide whether or not the dispersion for S(Q) has to be considered for P*S.   
     240            elif parameter in self.model2.dispersion.keys()and name !='radius': 
    239241                value= self.model2.set_dispersion(parameter, dispersion) 
     242            self._set_dispersion() 
    240243            return value 
    241244        except: 
Note: See TracChangeset for help on using the changeset viewer.