Changeset 29f5536 in sasmodels for compare.py
- Timestamp:
- Feb 19, 2015 5:25:48 PM (10 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 1ed9e3f
- Parents:
- 261658d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
compare.py
rf173599 r29f5536 163 163 if len(split) == 2) 164 164 # Sort out data 165 qmax = 1 .0 if '-highq' in opts else (0.2 if '-midq' in opts else 0.05)165 qmax = 10.0 if '-exq' in opts else 1.0 if '-highq' in opts else 0.2 if '-midq' in opts else 0.05 166 166 Nq = int(opt_values.get('-Nq', '128')) 167 167 is2D = not "-1d" in opts … … 225 225 plot_data(data, cpu, scale='log') 226 226 plt.title("%s t=%.1f ms"%(comp,cpu_time)) 227 cbar_title = "log I" 227 228 if Nocl > 0: 228 229 if Ncpu > 0: plt.subplot(132) 229 230 plot_data(data, ocl, scale='log') 230 231 plt.title("opencl t=%.1f ms"%ocl_time) 232 cbar_title = "log I" 231 233 if Ncpu > 0 and Nocl > 0: 232 234 plt.subplot(133) 233 err = resid if '-abs' in opts else relerr 234 errstr = "abs err" if '-abs' in opts else "rel err" 235 if '-abs' in opts: 236 err,errstr = resid, "abs err" 237 else: 238 err,errstr = relerr, "rel err" 235 239 #err,errstr = ocl/cpu,"ratio" 236 plot_data(data, err, scale='l inear')240 plot_data(data, err, scale='log') #'linear') 237 241 plt.title("max %s = %.3g"%(errstr, max(abs(err[index])))) 238 if is2D: plt.colorbar() 242 cbar_title = "log "+errstr 243 if is2D: 244 h = plt.colorbar() 245 h.ax.set_title(cbar_title) 239 246 240 247 if Ncpu > 0 and Nocl > 0 and '-hist' in opts: … … 265 272 -plot*/-noplot plots or suppress the plot of the model 266 273 -single*/-double uses double precision for comparison 267 -lowq*/-midq/-highq use q values up to 0.05, 0.2 or 1.0274 -lowq*/-midq/-highq/-exq use q values up to 0.05, 0.2, 1.0, 10.0 268 275 -Nq=128 sets the number of Q points in the data set 269 276 -1d/-2d* computes 1d or 2d data … … 287 294 'plot','noplot', 288 295 'single','double', 289 'lowq','midq','highq', 296 'lowq','midq','highq','exq', 290 297 '2d','1d', 291 298 'preset','random',
Note: See TracChangeset
for help on using the changeset viewer.