Changeset b171acd in sasmodels for sasmodels/sasview_model.py


Ignore:
Timestamp:
Jan 29, 2019 1:54:28 PM (5 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
4f4d3e3
Parents:
15c80af
Message:

move 'multiplicity' handling into sasview model. Refs #1022.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    ra4f1a73 rb171acd  
    253253 
    254254    # Process multiplicity 
     255    control_pars = [p.id for p in model_info.parameters.kernel_parameters 
     256                    if p.is_control] 
     257    control = control_pars[0] if control_pars else None 
    255258    non_fittable = []  # type: List[str] 
    256259    xlabel = model_info.profile_axes[0] if model_info.profile is not None else "" 
    257260    variants = MultiplicityInfo(0, "", [], xlabel) 
    258261    for p in model_info.parameters.kernel_parameters: 
    259         if p.name == model_info.control: 
     262        if p.id == control: 
    260263            non_fittable.append(p.name) 
    261264            variants = MultiplicityInfo( 
     
    800803        """ 
    801804        if par.name not in self.params: 
    802             if par.name == self.multiplicity_info.control: 
     805            if par.id == self.multiplicity_info.control: 
    803806                return self.multiplicity, [self.multiplicity], [1.0] 
    804807            else: 
Note: See TracChangeset for help on using the changeset viewer.