Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • example/multiscatfit.py

    r49d1f8b8 rbc248f8  
    3434from sasmodels.data import load_data, set_beam_stop, set_top 
    3535 
    36 from sasmodels.multiscat import MultipleScattering 
     36from multiscat import MultipleScattering 
    3737 
    3838## Load the data 
    3939#data = load_data('DEC07267.DAT') 
    4040#set_beam_stop(data, 0.003, outer=0.025) 
    41 data = load_data('latex_smeared.xml', index=0) 
     41data = load_data('latex_smeared.xml', index=1) 
    4242 
    4343## Define the model 
     
    6666 
    6767# Mulitple scattering probability parameter 
    68 # HACK: the probability is stuffed in as an extra parameter to the experiment. 
     68# HACK: the parameter is assigned to model.theta, which is otherwise unused 
     69# since the dataset is 1D; this won't work for 2D data 
    6970probability = Parameter(name="probability", value=0.0) 
    7071probability.range(0.0, 0.9) 
     72model.phi = probability 
    7173 
    72 M = Experiment(data=data, model=model, extra_pars={'probability': probability}) 
     74M = Experiment(data=data, model=model) 
    7375 
    7476# Stack mulitple scattering on top of the existing resolution function. 
Note: See TracChangeset for help on using the changeset viewer.