source: sasview/sansmodels/src/igor_wrapper/test/test.py @ 5631f70

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 5631f70 was ae3ce4e, checked in by Mathieu Doucet <doucetm@…>, 17 years ago

Moving sansmodels to trunk

  • Property mode set to 100644
File size: 752 bytes
Line 
1from sans.models.CylinderModel import CylinderModel
2from sans.models.DisperseModel import DisperseModel
3import math
4
5cyl = CylinderModel()
6cyl.setParam('scale', 1.0)
7cyl.setParam('radius', 20.0)
8cyl.setParam('length', 400.0)
9cyl.setParam('contrast', 1.0)
10cyl.setParam('background', 0.0)
11cyl.setParam('cyl_theta', 1.57)
12cyl.setParam('cyl_phi', 0.0)
13
14q=0.025
15phi=0.0
16
17print "oriented output", cyl.run([q, phi])
18
19
20
21name_list=['radius']
22val_list = [3.0]
23dispersed = DisperseModel(cyl, name_list, val_list)
24dispersed.setParam('n_pts', 100)
25print "disp output", dispersed.run([q, phi])
26
27
28
29from Averager2D import Averager2D
30avg = Averager2D()
31avg.set_model(cyl)
32#avg.set_dispersity([['radius', 3.0, 100]])
33avg.setThetaFile('theta.txt')
34print avg.runXY([q, 0])
Note: See TracBrowser for help on using the repository browser.