Changeset c0131d44 in sasmodels


Ignore:
Timestamp:
Sep 6, 2018 11:44:24 AM (6 years ago)
Author:
Torin Cooper-Bennun <torin.cooper-bennun@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
84f2962
Parents:
117c02a
Message:

use parse_parameter to include fixed choices properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/product.py

    r117c02a rc0131d44  
    1818import numpy as np  # type: ignore 
    1919 
    20 from .modelinfo import ParameterTable, ModelInfo, Parameter 
     20from .modelinfo import ParameterTable, ModelInfo, Parameter, parse_parameter 
    2121from .kernel import KernelModel, Kernel 
    2222from .details import make_details, dispersion_mesh 
     
    3939ER_ID = "radius_effective" 
    4040VF_ID = "volfraction" 
    41 BETA_DEFINITION = ("beta_mode", ["P*S", "P*(1+beta*(S-1))"], 0, (None, None), "", 
    42                    "Structure factor dispersion calculation mode") 
     41 
    4342def make_extra_pars(p_info): 
    4443    pars = [] 
    4544    if p_info.have_Fq: 
    46         par = Parameter("structure_factor_mode", ["P*S","P*(1+beta*(S-1))"], 0, (None, None), "", 
    47                         "Structure factor calculation") 
     45        par = parse_parameter( 
     46                "structure_factor_mode", 
     47                "", 
     48                0, 
     49                [["P*S","P*(1+beta*(S-1))"]], 
     50                "", 
     51                "Structure factor calculation") 
    4852        pars.append(par) 
    4953    return pars 
Note: See TracChangeset for help on using the changeset viewer.