Changeset f980d4a in sasview for sansrealspace/src/realspace/test
- Timestamp:
- Nov 13, 2007 9:39:05 AM (17 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:
- 883a2ef
- Parents:
- 5a2070e
- Location:
- sansrealspace/src/realspace/test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansrealspace/src/realspace/test/cylinder_d=0.5_Iq2D.txt
ra2c1196 rf980d4a 1 PARS: {'scale': 1.0, 'length': 100, 'radius': 20, 'background': 0.0, 'cyl_theta': 1. 0, 'contrast': 1.0, 'cyl_phi': 1.0}1 PARS: {'scale': 1.0, 'length': 100, 'radius': 20, 'background': 0.0, 'cyl_theta': 1.5707963267948966, 'contrast': 1.0, 'cyl_phi': 1.5707963267948966} 2 2 <q> <ana> <sim> <err> 3 0.001 1.25586e+013 1.25584e+013 5.2 6233e+0084 0.00929167 1.1909e+013 1.190 68e+013 1.04923e+0105 0.0175833 1.0341e+013 1.03 408e+013 3.11388e+0106 0.025875 8.16205e+012 8.1 5049e+012 5.18067e+0107 0.0341667 5.77306e+012 5. 75279e+012 6.23249e+0108 0.0424583 3.56425e+012 3.55 305e+012 5.89665e+0109 0.05075 1.82415e+012 1.8 4081e+012 4.53723e+01010 0.0590417 6.86403e+011 6. 74985e+011 2.6955e+01011 0.0673333 1.26379e+011 1.2 48e+011 1.07889e+01012 0.075625 1.69416e+009 2.89547e+009 1.50778e+00913 0.0839167 1.17674e+011 1. 07376e+011 8.66466e+00914 0.0922083 2.93262e+011 2. 90816e+011 1.4123e+01015 0.1005 4.06932e+011 3.98585e+011 1.69585e+01016 0.108792 4.1248e+011 4.3 0879e+011 1.82588e+01017 0.117083 3.26735e+011 3. 32331e+011 1.66224e+01018 0.125375 2.00372e+011 1.9 155e+011 1.2709e+01019 0.133667 8.63351e+010 9.06573e+010 8.67162e+00920 0.141958 1.76833e+010 1.4 993e+010 3.5005e+00921 0.15025 2.29778e+008 2.08421e+008 4.0582e+00822 0.158542 1.83678e+010 1. 58227e+010 3.54108e+00923 0.166833 4.78555e+010 4.61547e+010 6.02634e+00924 0.175125 6.83196e+010 6.41105e+010 7.15624e+00925 0.183417 7.03999e+010 7. 16712e+010 7.5763e+00926 0.191708 5.61199e+010 5. 95249e+010 6.90467e+00927 0.2 3.43293e+010 4.68345e+010 6.07661e+0093 0.001 1.25586e+013 1.25584e+013 5.25262e+008 4 0.00929167 1.1909e+013 1.19058e+013 1.05064e+010 5 0.0175833 1.0341e+013 1.03345e+013 3.12179e+010 6 0.025875 8.16205e+012 8.14926e+012 5.17962e+010 7 0.0341667 5.77306e+012 5.81045e+012 6.21145e+010 8 0.0424583 3.56425e+012 3.55223e+012 5.90114e+010 9 0.05075 1.82415e+012 1.80424e+012 4.48859e+010 10 0.0590417 6.86403e+011 6.93632e+011 2.71769e+010 11 0.0673333 1.26379e+011 1.2136e+011 1.06077e+010 12 0.075625 1.69416e+009 1.50569e+009 1.08773e+009 13 0.0839167 1.17674e+011 1.24732e+011 9.32509e+009 14 0.0922083 2.93262e+011 2.7841e+011 1.38067e+010 15 0.1005 4.06932e+011 4.09882e+011 1.72092e+010 16 0.108792 4.1248e+011 4.37694e+011 1.84369e+010 17 0.117083 3.26735e+011 3.07555e+011 1.59575e+010 18 0.125375 2.00372e+011 1.98719e+011 1.30112e+010 19 0.133667 8.63351e+010 8.31996e+010 8.33716e+009 20 0.141958 1.76833e+010 1.4757e+010 3.47028e+009 21 0.15025 2.29778e+008 5.88028e+008 6.83052e+008 22 0.158542 1.83678e+010 1.6151e+010 3.56511e+009 23 0.166833 4.78555e+010 5.04122e+010 6.33775e+009 24 0.175125 6.83196e+010 7.36705e+010 7.69267e+009 25 0.183417 7.03999e+010 7.70008e+010 7.86228e+009 26 0.191708 5.61199e+010 5.68128e+010 6.74312e+009 27 0.2 3.43293e+010 3.12432e+010 4.97778e+009 -
sansrealspace/src/realspace/test/early_test.py
ra2c1196 rf980d4a 209 209 210 210 # Along Y 211 #ana.setParam('cyl_theta', 1.57)212 #ana.setParam('cyl_phi', 1.57)211 ana.setParam('cyl_theta', 1.57) 212 ana.setParam('cyl_phi', 1.57) 213 213 214 214 # Along Z 215 ana.setParam('cyl_theta', 0)216 ana.setParam('cyl_phi', 0)215 #ana.setParam('cyl_theta', 0) 216 #ana.setParam('cyl_phi', 0) 217 217 218 218 model = VolumeCanvas.VolumeCanvas() … … 226 226 227 227 # Along Y 228 #model.setParam('%s.orientation' % handle, [0,0,0])228 model.setParam('%s.orientation' % handle, [0,0,0]) 229 229 230 230 # Along Z 231 model.setParam('%s.orientation' % handle, [1.57,0,0]) 232 233 234 ana = ana.runXY([0.1, 0.01]) 235 sim = model.getIq2D(0.1, 0.01) 231 #model.setParam('%s.orientation' % handle, [1.57,0,0]) 232 233 236 234 print model.npts 237 print ana, sim, sim/ana, ana/sim 235 for i in range(40): 236 qmax = 0.5 237 anaX = ana.runXY([qmax*i/40.0, 0.0]) 238 simX = model.getIq2D(qmax*i/40.0, 0.0) 239 240 anaY = ana.runXY([0, qmax*i/40.0]) 241 simY = model.getIq2D(0, qmax*i/40.0) 242 print anaX, simX, simX/anaX, '|', anaY, simY, simY/anaY 238 243 239 244 def test_7(): … … 284 289 print ana_val, sim_val, sim_val/ana_val, err, (sim_val-ana_val)/err 285 290 286 287 291 288 292 289 293 if __name__ == "__main__": 290 test_ 7()294 test_6() -
sansrealspace/src/realspace/test/sim_validation.py
ra2c1196 rf980d4a 109 109 self.ana.setParam('radius', radius) 110 110 self.ana.setParam('length', length) 111 self.ana.setParam('cyl_theta', math.pi/2.0) 112 self.ana.setParam('cyl_phi', math.pi/2.0) 111 113 self.create() 112 114 … … 141 143 self.ana.setParam('radius_b', radius_b) 142 144 #self.ana.setParam('radius', radius_a) 145 146 # Default orientation is there=1.57, phi=0 147 # Radius_a is along the x direction 143 148 144 149 self.create() … … 311 316 312 317 # 2D: Density=5, 71.2 secs for 50 points 313 vali = CoreShellValidator(radius = 15, thickness=5, density = 5.0)318 #vali = CoreShellValidator(radius = 15, thickness=5, density = 5.0) 314 319 #validate_model(vali, q_min=0.001, q_max=1, n_q=50) 315 validate_model_2D(vali, q_min=0.001, q_max=1, phi=1.0, n_q=50)320 #validate_model_2D(vali, q_min=0.001, q_max=1, phi=1.0, n_q=50) 316 321 317 322 # 2D: Density=2, 11.1 secs for 25 points … … 325 330 #vali = CylinderValidator(radius = 20, length=100, density = 0.1) 326 331 #validate_model(vali, q_min=0.001, q_max=0.5, n_q=25) 327 #vali = CylinderValidator(radius = 20, length=100, density = 0.5)328 #validate_model_2D(vali, q_min=0.001, q_max=0.2, phi=1.0, n_q=25)332 vali = CylinderValidator(radius = 20, length=100, density = 0.5) 333 validate_model_2D(vali, q_min=0.001, q_max=0.2, phi=1.0, n_q=25) 329 334 330 335 # 2D: Density=0.5, 2.26 secs for 25 points -
sansrealspace/src/realspace/test/utest_oriented.py
ra2c1196 rf980d4a 187 187 self.ana.setParam('radius_a', radius_a) 188 188 self.ana.setParam('radius_b', radius_b) 189 189 # Default orientation is there=1.57, phi=0 190 # Radius_a is along the x direction 190 191 191 192 canvas = VolumeCanvas.VolumeCanvas()
Note: See TracChangeset
for help on using the changeset viewer.