core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since cb97bff was
a98958b,
checked in by krzywon, 9 years ago
|
Good progress on SESANS scripting.
|
-
Property mode set to
100644
|
File size:
738 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 = "sphere" |
---|
| 10 | |
---|
| 11 | # Enter any custom parameters |
---|
| 12 | phi = Parameter(0.10, name='phi') |
---|
| 13 | custom_params = {"phi" : phi} |
---|
| 14 | |
---|
| 15 | # SESANS data file |
---|
| 16 | sesans_file = "sphere.ses" |
---|
| 17 | |
---|
| 18 | # Initial parameter values (if other than defaults) |
---|
| 19 | initial_vals = { |
---|
| 20 | "scale" : phi*(1 - phi), |
---|
| 21 | "sld" : 7.0, |
---|
| 22 | "solvent_sld" : 1.0, |
---|
| 23 | "radius" : 1000, |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | # Ranges for parameters if other than default |
---|
| 27 | param_range = { |
---|
| 28 | "phi" : [0.001, 0.5], |
---|
| 29 | "radius" : [1, 10000] |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | # Send to the fitting engine |
---|
| 33 | problem = sesansfit.sesans_fit(sesans_file, model_name, initial_vals, custom_params, param_range) |
---|
Note: See
TracBrowser
for help on using the repository browser.