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


Ignore:
Timestamp:
Jul 19, 2011 11:16:04 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:
b5a0509
Parents:
458c930
Message:

updated and fixed utest 2d

File:
1 edited

Legend:

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

    r96656e3 rda987e1  
    7777             
    7878        for i_q in range(1, 30): 
    79             q = 0.025*i_q 
     79            q = 0.025 *i_q 
    8080            sum = 0.0 
    8181            for i_theta in range(npts): 
    82                 theta = 180.0/npts*i_theta 
     82                theta = 180.0 / npts * i_theta 
    8383                 
    8484                model.setParam(theta_label, theta) 
     
    9191                    #sum += model.run([q, 0]) 
    9292             
    93             value = sum/npts/npts*180.0/2.0 
     93            value = sum/npts/npts*math.pi/2.0 
    9494            ana = model.run(q) 
    95             if q<0.3 and (value-ana)/ana>0.05: 
     95            if q<0.25 and (value-ana)/ana>0.05: 
    9696                passed = False 
    9797            output_f.write("%10g %10g %10g\n" % (q, value, ana)) 
     
    142142            value = sum/npts 
    143143            ana = model.run(q) 
    144             if q<0.3 and (value-ana)/ana>0.05: 
     144            if q<0.25 and (value-ana)/ana>0.05: 
    145145                passed = False 
    146146            output_f.write("%10g %10g %10g\n" % (q, value, ana)) 
     
    177177                    sum += math.sin(theta*math.pi/180.0)*model.run([q, 0]) 
    178178             
    179             value = sum/npts/npts*180.0/2.0 
     179            value = sum/npts/npts*math.pi/2.0 
    180180            ana = model.run(q) 
    181             if q<0.3 and (value-ana)/ana>0.05: 
     181            if q<0.25 and (value-ana)/ana>0.05: 
    182182                passed = False 
    183183            output_f.write("%10g %10g %10g\n" % (q, value, ana)) 
Note: See TracChangeset for help on using the changeset viewer.