source: sasmodels/fit2.py @ a42fec0

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since a42fec0 was a42fec0, checked in by HMP1 <helen.park@…>, 10 years ago

Speed-up of 3X, compare.py working

  • Property mode set to 100644
File size: 1.6 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4from bumps.names import *
5from Models.code_coreshellcyl import GpuCoreShellCylinder
6from sasmodel import SasModel, load_data, set_beam_stop, set_top
7
8
9radial_data = load_data('December/DEC07267.DAT')
10set_beam_stop(radial_data, 0.00669, outer=0.025)
11set_top(radial_data, -.0185)
12
13tan_data = load_data('December/DEC07266.DAT')
14set_beam_stop(tan_data, 0.00669, outer=0.025)
15set_top(tan_data, -.0185)
16
17
18
19
20dtype='float32'
21radial = SasModel(radial_data,
22                 GpuCoreShellCylinder,
23                 scale= 3.75e-7, radius=378, thickness=30, length=1806,
24                 core_sld=7.105e-6, shell_sld=.291e-6, solvent_sld=7.105e-6,
25                 background=0.2, axis_theta=0, axis_phi=90,
26
27                 radius_pd=0.26, radius_pd_n=20, radius_pd_nsigma=3,
28                 length_pd=0.26, length_pd_n=20, length_pd_nsigma=3,
29                 thickness_pd=1, thickness_pd_n=1, thickness_pd_nsigma=0,
30                 axis_theta_pd=1, axis_theta_pd_n=10, axis_theta_pd_nsigma=3,
31                 axis_phi_pd=0.1, axis_phi_pd_n=1, axis_phi_pd_nsigma=0,
32                 dtype='float')
33tan = SasModel(tan_data,
34                  GpuCoreShellCylinder, dtype=dtype,
35                  **radial.parameters())
36
37radial.radius.range(15, 1000)
38radial.length.range(0, 2500)
39#radial.thickness.range(18, 38)
40#radial.thickness_pd.range(0, 1)
41#radial.axis_phi.range(0, 90)
42#radial.radius_pd.range(0, 1)
43#radial.length_pd.range(0, 1)
44#radial.axis_theta_pd.range(0, 360)
45#radial.background.range(0,5)
46#radial.scale.range(0, 1)
47radial.axis_phi = tan.axis_phi + 90
48
49
50problem = FitProblem([radial,tan])
51
52
53
Note: See TracBrowser for help on using the repository browser.