source: sasview/src/sas/sascalc/simulation/pointsmodelpy/tests/testlores.py @ 9592c6f

Last change on this file since 9592c6f was a1b8fee, checked in by andyfaff, 8 years ago

MAINT: from future import print_function

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