Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/models/MultiplicationModel.py

    rfb3f9af rac7be54  
    1010        which will be calculated from P(Q) via calculate_ER(),  
    1111        and 2) 'scale' in P model which is synchronized w/ volfraction in S  
    12         then P*S is multiplied by a new parameter, 'scale_factor'. 
     12        then P*S is multiplied by a new param, 'scale_factor'. 
    1313        The polydispersion is applicable only to P(Q), not to S(Q). 
    14  
    15         .. note:: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'. 
     14        Note: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'. 
    1615    """ 
    1716    def __init__(self, p_model, s_model ): 
     
    8281    def _clone(self, obj): 
    8382        """ 
    84         Internal utility function to copy the internal data members to a 
    85         fresh copy. 
     83            Internal utility function to copy the internal 
     84            data members to a fresh copy. 
    8685        """ 
    8786        obj.params     = copy.deepcopy(self.params) 
     
    9796    def _set_dispersion(self): 
    9897        """ 
    99         combine the two models' dispersions. Polydispersity should not be 
    100         applied to s_model 
     98           combined the two models dispersions 
     99           Polydispersion should not be applied to s_model 
    101100        """ 
    102101        ##set dispersion only from p_model  
     
    108107        Get SLD profile of p_model if exists 
    109108         
    110         :return: (r, beta) where r is a list of radius of the transition points\ 
    111                 beta is a list of the corresponding SLD values 
    112  
    113         .. note:: This works only for func_shell num = 2 (exp function). 
     109        : return: (r, beta) where r is a list of radius of the transition points 
     110                beta is a list of the corresponding SLD values  
     111        : Note: This works only for func_shell num = 2 (exp function). 
    114112        """ 
    115113        try: 
     
    123121    def _set_params(self): 
    124122        """ 
    125         Concatenate the parameters of the two models to create 
    126         these model parameters  
     123            Concatenate the parameters of the two models to create 
     124            this model parameters  
    127125        """ 
    128126 
     
    143141    def _set_details(self): 
    144142        """ 
    145         Concatenate details of the two models to create 
    146         this model's details  
     143            Concatenate details of the two models to create 
     144            this model details  
    147145        """ 
    148146        for name, detail in self.p_model.details.iteritems(): 
     
    156154    def _set_scale_factor(self): 
    157155        """ 
    158         Set scale=volfraction for P model 
     156            Set scale=volfraction to P model 
    159157        """ 
    160158        value = self.params['volfraction'] 
     
    170168    def _set_effect_radius(self): 
    171169        """ 
    172         Set effective radius to S(Q) model 
     170            Set effective radius to S(Q) model 
    173171        """ 
    174172        if not 'effect_radius' in self.s_model.params.keys(): 
     
    208206    def _setParamHelper(self, name, value): 
    209207        """ 
    210         Helper function to setparam 
     208            Helper function to setparam 
    211209        """ 
    212210        # Look for dispersion parameters 
     
    231229    def _set_fixed_params(self): 
    232230        """ 
    233         Fill the self.fixed list with the p_model fixed list 
     231             fill the self.fixed list with the p_model fixed list 
    234232        """ 
    235233        for item in self.p_model.fixed: 
     
    242240        """  
    243241        Evaluate the model 
    244          
    245242        :param x: input q-value (float or [float, float] as [r, theta]) 
    246243        :return: (scattering function value) 
     
    253250 
    254251    def runXY(self, x = 0.0): 
    255         """  
    256         Evaluate the model 
    257          
    258         :param x: input q-value (float or [float, float] as [qx, qy]) 
    259         :return: scattering function value 
     252        """ Evaluate the model 
     253            @param x: input q-value (float or [float, float] as [qx, qy]) 
     254            @return: scattering function value 
    260255        """   
    261256        # set effective radius and scaling factor before run 
     
    271266        """  
    272267        Evaluate the model in cartesian coordinates 
    273          
    274268        :param x: input q[], or [qx[], qy[]] 
    275269        :return: scattering function P(q[]) 
     
    285279        """ 
    286280        Set the dispersion object for a model parameter 
    287          
    288281        :param parameter: name of the parameter [string] 
    289282        :dispersion: dispersion object of type DispersionModel 
     
    300293    def fill_description(self, p_model, s_model): 
    301294        """ 
    302         Fill the description for P(Q)*S(Q) 
     295            Fill the description for P(Q)*S(Q) 
    303296        """ 
    304297        description = "" 
Note: See TracChangeset for help on using the changeset viewer.