Changeset 670eee4 in sasmodels


Ignore:
Timestamp:
Mar 21, 2016 10:38:23 AM (9 years ago)
Author:
krzywon
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
1671636 (diff), 9217ef8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasmodels

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • example/sesans_parameters_sphere.py

    rfa902d4 r9217ef8  
    2727    "sld" : 7.0, 
    2828    "radius" : 1000, 
    29     "solvent_sld" : 1.0, 
     29    "sld_solvent" : 1.0, 
    3030} 
    3131 
  • example/sesansfit.py

    rfa902d4 r9217ef8  
    5454 
    5555    # Load custom parameters, initial values and parameter ranges 
     56    pars = model.parameters().copy() 
     57    pars.update(custom_params) 
    5658    for k, v in custom_params.items(): 
     59        if k not in pars: 
     60            par_error("Can't set parameter %r in model"%k, pars) 
    5761        setattr(model, k, v) 
    5862        model._parameter_names.append(k) 
    5963    for k, v in initial_vals.items(): 
    60         param = model.parameters().get(k) 
     64        if k not in pars: 
     65            par_error("Can't get parameter %r from model"%k, pars) 
     66        param = pars[k] 
    6167        param.value = v 
    6268    for k, v in param_range.items(): 
    63         param = model.parameters().get(k) 
    64         if param is not None: 
    65             param.range(*v) 
     69        if k not in pars: 
     70            par_error("Can't set range on parameter %r in model"%k, pars) 
     71        param = pars[k] 
     72        param.range(*v) 
    6673 
    6774    if False: # for future implementation 
     
    7380        problem = FitProblem(M_sesans) 
    7481    return problem 
     82 
     83 
     84def par_error(msg, pars): 
     85    raise ValueError(msg+"\nAvailable parameters: %s"%", ".join(sorted(pars.keys()))) 
  • sasmodels/bumps_model.py

    ra84a0ca r9217ef8  
    238238        Not Implemented. 
    239239        """ 
     240        if self.data_type == "sesans": 
     241            np.savetxt(basename+".dat", np.array([self._data.x, self.theory()]).T) 
    240242        pass 
    241243 
  • sasmodels/models/mass_fractal.py

    r9418d75 r95441ff  
    4646 
    4747 
    48 Reference 
    49 --------- 
     48References 
     49---------- 
    5050 
    5151D Mildner and P Hall, *J. Phys. D: Appl. Phys.*, 
  • sasmodels/models/mass_surface_fractal.py

    r9418d75 r95441ff  
    4646 
    4747 
    48 Reference 
    49 --------- 
     48References 
     49---------- 
    5050 
    5151P Schmidt, *J Appl. Cryst.*, 24 (1991) 414-435 Equation(19) 
  • sasmodels/models/surface_fractal.py

    r9418d75 r95441ff  
    4545 
    4646 
    47 Reference 
    48 --------- 
     47References 
     48---------- 
    4949 
    5050D Mildner and P Hall, *J. Phys. D: Appl. Phys.*, 19 (1986) 1535-1545 
  • sasmodels/compare.py

    r98d6cfc r1671636  
    366366        composition_type, parts = model_info['composition'] 
    367367        if composition_type == 'product': 
    368             from sas.models.MultiplicationModel import MultiplicationModel 
     368            from sas.sascalc.fit.MultiplicationModel import MultiplicationModel 
    369369            P, S = [get_model(p) for p in model_info['oldname']] 
    370370            model = MultiplicationModel(P, S) 
Note: See TracChangeset for help on using the changeset viewer.