source: sasmodels/example/model.py @ e9b0ef3

core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since e9b0ef3 was 1182da5, checked in by Paul Kienzle <pkienzle@…>, 9 years ago

fix parameter names in bumps examples

  • Property mode set to 100644
File size: 1.2 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4import sys
5from bumps.names import *
6from sasmodels.core import load_model
7from sasmodels.bumps_model import Model, Experiment
8from sasmodels.data import load_data, set_beam_stop, set_top
9
10""" IMPORT THE DATA USED """
11radial_data = load_data('DEC07267.DAT')
12set_beam_stop(radial_data, 0.00669, outer=0.025)
13set_top(radial_data, -.0185)
14
15kernel = load_model("ellipsoid")
16
17model = Model(kernel,
18    scale=0.08,
19    r_polar=15, r_equatorial=800,
20    sld=.291, sld_solvent=7.105,
21    background=0,
22    theta=90, phi=0,
23    theta_pd=15, theta_pd_n=40, theta_pd_nsigma=3,
24    r_polar_pd=0.222296, r_polar_pd_n=1, r_polar_pd_nsigma=0,
25    r_equatorial_pd=.000128, r_equatorial_pd_n=1, r_equatorial_pd_nsigma=0,
26    phi_pd=0, phi_pd_n=20, phi_pd_nsigma=3,
27    )
28
29# SET THE FITTING PARAMETERS
30model.r_polar.range(15, 1000)
31model.r_equatorial.range(15, 1000)
32model.theta_pd.range(0, 360)
33model.background.range(0,1000)
34model.scale.range(0, 10)
35
36#cutoff = 0     # no cutoff on polydisperisity loops
37#cutoff = 1e-5  # default cutoff
38cutoff = 1e-3  # low precision cutoff
39M = Experiment(data=radial_data, model=model, cutoff=cutoff)
40problem = FitProblem(M)
Note: See TracBrowser for help on using the repository browser.