Changeset da987e1 in sasview for sansmodels/src/sans/models/test
- Timestamp:
- Jul 19, 2011 11:16:04 AM (13 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/validate_2D_model.py
r96656e3 rda987e1 77 77 78 78 for i_q in range(1, 30): 79 q = 0.025 *i_q79 q = 0.025 *i_q 80 80 sum = 0.0 81 81 for i_theta in range(npts): 82 theta = 180.0 /npts*i_theta82 theta = 180.0 / npts * i_theta 83 83 84 84 model.setParam(theta_label, theta) … … 91 91 #sum += model.run([q, 0]) 92 92 93 value = sum/npts/npts* 180.0/2.093 value = sum/npts/npts*math.pi/2.0 94 94 ana = model.run(q) 95 if q<0. 3and (value-ana)/ana>0.05:95 if q<0.25 and (value-ana)/ana>0.05: 96 96 passed = False 97 97 output_f.write("%10g %10g %10g\n" % (q, value, ana)) … … 142 142 value = sum/npts 143 143 ana = model.run(q) 144 if q<0. 3and (value-ana)/ana>0.05:144 if q<0.25 and (value-ana)/ana>0.05: 145 145 passed = False 146 146 output_f.write("%10g %10g %10g\n" % (q, value, ana)) … … 177 177 sum += math.sin(theta*math.pi/180.0)*model.run([q, 0]) 178 178 179 value = sum/npts/npts* 180.0/2.0179 value = sum/npts/npts*math.pi/2.0 180 180 ana = model.run(q) 181 if q<0. 3and (value-ana)/ana>0.05:181 if q<0.25 and (value-ana)/ana>0.05: 182 182 passed = False 183 183 output_f.write("%10g %10g %10g\n" % (q, value, ana))
Note: See TracChangeset
for help on using the changeset viewer.