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

ESS_GUIESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since b12404e 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
RevLine 
[a1b8fee]1from __future__ import print_function
2
3
[959eb01]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
[9c3d784]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))
[959eb01]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
[9c3d784]51    print("calculating distance distribution")
[959eb01]52    rmax = pointsmodelpy.get_lores_pr(lm,vp)
[9c3d784]53    print("finish calculating get_lores_pr, and rmax is:", rmax)
[959eb01]54    pointsmodelpy.outputPR(lm,"testlores.pr")
55    pointsmodelpy.get_lores_iq(lm,iq)
56
57    iqPy.OutputIQ(iq, "testlores.iq")
58
[9c3d784]59    print("Testing get I from a single q")
[959eb01]60    result = pointsmodelpy.get_lores_i(lm,0.1)
[9c3d784]61    print("The I(0.1) is: %s" % str(result)) 
[959eb01]62
63# version
64__id__ = "$Id$"
65
66#  End of file
Note: See TracBrowser for help on using the repository browser.