Changeset b5a0509 in sasview for sansmodels/src/sans/models


Ignore:
Timestamp:
Jul 19, 2011 11:25:29 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
ff18c58
Parents:
da987e1
Message:

corrected the utest/ellcyl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/test/validate_2D_elliptical_cyl.py

    rae3ce4e rb5a0509  
    102102         
    103103        cyl = CylinderModel() 
    104         cyl.setParam("cyl_theta", 1.57) 
     104        cyl.setParam("cyl_theta", 90) 
    105105        cyl.setParam("cyl_phi", 0.0) 
    106106        cyl.setParam("radius", 20) 
    107107        cyl.setParam("length", 400) 
    108         cyl.setParam("contrast", 1.0e-6) 
     108        cyl.setParam("sldCyl", 2.0e-6) 
     109        cyl.setParam("sldSolv", 1.0e-6) 
    109110 
    110111        ell = EllipticalCylinderModel() 
    111112        ell.setParam("r_ratio", 1.0) 
    112113        ell.setParam("r_minor", 20) 
    113         ell.setParam("cyl_theta", 1.57) 
     114        ell.setParam("cyl_theta", 90) 
    114115        ell.setParam("cyl_phi", 0.0) 
    115116        ell.setParam("length", 400) 
    116         ell.setParam("contrast", 1.0e-6) 
     117        ell.setParam("sldCyl", 2.0e-6) 
     118        ell.setParam("sldSolv", 1.0e-6) 
    117119         
    118120        passed = True 
     
    146148        model.setParam('r_ratio', 1.0) 
    147149        model.setParam("r_minor", 20) 
    148         model.setParam("cyl_theta", 1.57) 
     150        model.setParam("cyl_theta", 90) 
    149151        model.setParam("cyl_phi", 0.0) 
    150152        model.setParam("length", 400) 
    151         model.setParam("contrast", 1.0e-6) 
     153        model.setParam("sldEll", 2.0e-6) 
     154        model.setParam("sldSolv", 1.0e-6) 
    152155         
    153156        cyl = CylinderModel() 
    154         cyl.setParam("cyl_theta", 1.57) 
     157        cyl.setParam("cyl_theta", 90) 
    155158        cyl.setParam("cyl_phi", 0.0) 
    156159        cyl.setParam("radius", 20) 
    157160        cyl.setParam("length", 400) 
    158         cyl.setParam("contrast", 1.0e-6) 
     161        cyl.setParam("sldCyl", 2.0e-6) 
     162        cyl.setParam("sldSolv", 1.0e-6) 
     163 
    159164         
    160165        output_f = open("average_func.txt",'w')     
     
    191196        for i_theta in range(npts): 
    192197            theta = math.pi/npts*i_theta             
    193             model.setParam('cyl_theta', theta) 
     198            model.setParam('cyl_theta', theta * 180 / math.pi) 
    194199             
    195200            for j in range(npts): 
    196                 model.setParam('cyl_phi', math.pi * 2.0 / npts * j) 
     201                model.setParam('cyl_phi', 180 * 2.0 / npts * j) 
    197202                      
    198203                if str(model.run([q, 0])).count("IN")>0:                         
    199204                    if self.verbose: 
    200                         print "ERROR", q, theta, math.pi * 2.0 / npts * j 
     205                        print "ERROR", q, theta, 180 * 2.0 / npts * j 
    201206                else: 
    202207                    sum += math.sin(theta)*model.run([q, 0]) 
Note: See TracChangeset for help on using the changeset viewer.