core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since fcd7bbd was
a98958b,
checked in by krzywon, 9 years ago
|
Good progress on SESANS scripting.
|
-
Property mode set to
100644
|
File size:
943 bytes
|
Rev | Line | |
---|
[a98958b] | 1 | """ |
---|
| 2 | This is a data file used to load in sesans data and fit it using the bumps engine |
---|
| 3 | """ |
---|
| 4 | from bumps.names import * |
---|
| 5 | |
---|
| 6 | import sesansfit |
---|
| 7 | |
---|
| 8 | # Enter the model name to use |
---|
| 9 | model_name = "core_shell_sphere*hardsphere" |
---|
| 10 | |
---|
| 11 | # Enter any custom parameters |
---|
| 12 | phi = Parameter(0.45, name='phi') |
---|
| 13 | pen = Parameter(0.95, name='solvent penetration') |
---|
| 14 | custom_params = {"phi" : phi, "pen" : pen} |
---|
| 15 | |
---|
| 16 | # SESANS data file |
---|
| 17 | sesans_file = "core_shell.ses" |
---|
| 18 | |
---|
| 19 | # Initial parameter values (if other than defaults) |
---|
| 20 | initial_vals = { |
---|
| 21 | "scale" : 0.09, |
---|
| 22 | "core_sld" : 1.0592, |
---|
| 23 | "solvent_sld" : 2.88, |
---|
| 24 | "shell_sld" : 2.88, |
---|
| 25 | "radius" : 890, |
---|
| 26 | "thickness" : 130, |
---|
| 27 | "volfraction" : 0.45 |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | # Ranges for parameters if other than default |
---|
| 31 | param_range = { |
---|
| 32 | "phi" : [0.2, 0.5], |
---|
| 33 | "pen" : [0,1], |
---|
| 34 | "radius" : [500, 3000], |
---|
| 35 | "thickness" : [0,200] |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | # Send to the fitting engine |
---|
| 39 | problem = sesansfit.sesans_fit(sesans_file, model_name, initial_vals, custom_params, param_range) |
---|
Note: See
TracBrowser
for help on using the repository browser.