source: sasview/src/sas/sascalc/simulation/pointsmodelpy/tests/testlores.py @ 2ab812d

Last change on this file since 2ab812d was d85c194, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago

Remaining modules refactored

  • Property mode set to 100644
File size: 2.0 KB
Line 
1if __name__ == "__main__":
2
3    from sasModeling.iqPy import iqPy
4    #from sasModeling.analmodelpy import analmodelpy as analmodelpymodule
5    from sasModeling.geoshapespy import geoshapespy
6    from sasModeling.pointsmodelpy import pointsmodelpy
7
8#    print "copyright information:"
9#    print "   ", pointsmodelpy.copyright()
10#    print "   ", pointsmodelpymodule.copyright()
11
12    print
13    print "module information:"
14    print "    file:", pointsmodelpy.__file__
15    print "    doc:", pointsmodelpy.__doc__
16    print "    contents:", dir(pointsmodelpy)
17    print "    contents:", dir(geoshapespy)
18
19#    a = geoshapespy.new_singlehelix(10,2,30,2)
20    #a = geoshapespy.new_sphere(20)
21   
22    iq = iqPy.new_iq(100,0.001, 0.3)
23
24#    geoshapespy.set_orientation(a,20,40,60)
25#    geoshapespy.set_center(a,0,0,0)
26    lm = pointsmodelpy.new_loresmodel(0.1)
27#    pointsmodelpy.lores_add(lm,a,1.0)
28
29#    b = geoshapespy.new_sphere(15)
30#    geoshapespy.set_center(b,15,15,15)
31#    pointsmodelpy.lores_add(lm,b,2.0)
32
33   
34    c = geoshapespy.new_cylinder(10,40)
35    geoshapespy.set_center(c,1,1,1)
36    geoshapespy.set_orientation(c,0,0,0)
37    pointsmodelpy.lores_add(lm,c,3.0)
38   
39#    d = geoshapespy.new_ellipsoid(10,8,6)
40#    geoshapespy.set_center(d,3,3,3)
41#    geoshapespy.set_orientation(c,30,30,30)
42#    pointsmodelpy.lores_add(lm,d,1.0)
43
44    vp = pointsmodelpy.new_point3dvec()
45    pointsmodelpy.get_lorespoints(lm,vp)
46    pointsmodelpy.outputPDB(lm,vp,"modelpy.pseudo.pdb")
47
48    print "calculating distance distribution"
49    rmax = pointsmodelpy.get_lores_pr(lm,vp)
50    print "finish calculating get_lores_pr, and rmax is:", rmax
51    pointsmodelpy.outputPR(lm,"testlores.pr")
52    pointsmodelpy.get_lores_iq(lm,iq)
53
54    iqPy.OutputIQ(iq, "testlores.iq")
55
56    print "Testing get I from a single q"
57    result = pointsmodelpy.get_lores_i(lm,0.1)
58    print "The I(0.1) is: %s" % str(result) 
59
60# version
61__id__ = "$Id$"
62
63#  End of file
Note: See TracBrowser for help on using the repository browser.