ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since eb4f2fd was
25a60dc1,
checked in by Jae Cho <jhjcho@…>, 13 years ago
|
moving a folder
|
-
Property mode set to
100644
|
File size:
752 bytes
|
Rev | Line | |
---|
[ae3ce4e] | 1 | from sans.models.CylinderModel import CylinderModel |
---|
| 2 | from sans.models.DisperseModel import DisperseModel |
---|
| 3 | import math |
---|
| 4 | |
---|
| 5 | cyl = CylinderModel() |
---|
| 6 | cyl.setParam('scale', 1.0) |
---|
| 7 | cyl.setParam('radius', 20.0) |
---|
| 8 | cyl.setParam('length', 400.0) |
---|
| 9 | cyl.setParam('contrast', 1.0) |
---|
| 10 | cyl.setParam('background', 0.0) |
---|
| 11 | cyl.setParam('cyl_theta', 1.57) |
---|
| 12 | cyl.setParam('cyl_phi', 0.0) |
---|
| 13 | |
---|
| 14 | q=0.025 |
---|
| 15 | phi=0.0 |
---|
| 16 | |
---|
| 17 | print "oriented output", cyl.run([q, phi]) |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | name_list=['radius'] |
---|
| 22 | val_list = [3.0] |
---|
| 23 | dispersed = DisperseModel(cyl, name_list, val_list) |
---|
| 24 | dispersed.setParam('n_pts', 100) |
---|
| 25 | print "disp output", dispersed.run([q, phi]) |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | from Averager2D import Averager2D |
---|
| 30 | avg = Averager2D() |
---|
| 31 | avg.set_model(cyl) |
---|
| 32 | #avg.set_dispersity([['radius', 3.0, 100]]) |
---|
| 33 | avg.setThetaFile('theta.txt') |
---|
| 34 | print avg.runXY([q, 0]) |
---|
Note: See
TracBrowser
for help on using the repository browser.