source: sasview/realSpaceModeling/pointsmodelpy/tests/testlores.py @ 0b12abb5

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 0b12abb5 was f2d6445, checked in by Mathieu Doucet <doucetm@…>, 17 years ago

moving realSpaceModeling to trunk

  • Property mode set to 100644
File size: 1.9 KB
Line 
1if __name__ == "__main__":
2
3    from sansModeling.iqPy import iqPy
4    #from sansModeling.analmodelpy import analmodelpy as analmodelpymodule
5    from sansModeling.geoshapespy import geoshapespy
6    from sansModeling.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.