Changes in / [0b05c24:e6b97f5] in sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/genmodel.py
r044a9c1 r824465b 29 29 'q_max' : 1.0, 30 30 'nq' : 1000, 31 'nq2d' : 100 ,31 'nq2d' : 1000, 32 32 'vmin' : 1e-3, # floor for the 2D data results 33 33 'qx_max' : 0.5, 34 #'colormap' : 'gist_ncar', 35 'colormap' : 'jet', 34 36 } 35 37 … … 61 63 Iq2D = np.log(np.clip(Iq2D, opts['vmin'], np.inf)) 62 64 ax.imshow(Iq2D, interpolation='nearest', aspect=1, origin='lower', 63 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap= pylab.cm.jet)65 extent=[-qx_max, qx_max, -qx_max, qx_max], cmap=opts['colormap']) 64 66 ax.set_xlabel(r'$Q_x \/(\AA^{-1})$') 65 67 ax.set_ylabel(r'$Q_y \/(\AA^{-1})$') 66 67 # im = self.subplot.imshow(output, interpolation='nearest',68 # origin='lower',69 # vmin=zmin_temp, vmax=self.zmax_2D,70 # cmap=self.cmap,71 # extent=(self.xmin_2D, self.xmax_2D,72 # self.ymin_2D, self.ymax_2D))73 74 def ice_cm():75 from matplotlib._cm import _Blues_data76 from matplotlib import colors77 from matplotlib import rcParams78 def from_white(segments):79 scale = 1.0/segments[0][1]80 return [(k, v*scale, w*scale) for k, v, w in segments]81 ice_data = dict((k,from_white(v)) for k,v in _Blues_data.items())82 ice = colors.LinearSegmentedColormap("ice", ice_data, rcParams['image.lut'])83 return ice84 85 68 86 69 # Generate image -
sasmodels/compare.py
rd6850fa raf92b73 539 539 try: 540 540 base_value, base_time = time_calculation(base, pars, Nbase) 541 print("%s t=%. 1f ms, intensity=%.0f"541 print("%s t=%.2f ms, intensity=%.0f" 542 542 % (base.engine, base_time, sum(base_value))) 543 543 except ImportError: … … 550 550 try: 551 551 comp_value, comp_time = time_calculation(comp, pars, Ncomp) 552 print("%s t=%. 1f ms, intensity=%.0f"552 print("%s t=%.2f ms, intensity=%.0f" 553 553 % (comp.engine, comp_time, sum(comp_value))) 554 554 except ImportError: … … 584 584 if Ncomp > 0: plt.subplot(131) 585 585 plot_theory(data, base_value, view=view, use_data=False, limits=limits) 586 plt.title("%s t=%. 1f ms"%(base.engine, base_time))586 plt.title("%s t=%.2f ms"%(base.engine, base_time)) 587 587 #cbar_title = "log I" 588 588 if Ncomp > 0: 589 589 if Nbase > 0: plt.subplot(132) 590 590 plot_theory(data, comp_value, view=view, use_data=False, limits=limits) 591 plt.title("%s t=%. 1f ms"%(comp.engine, comp_time))591 plt.title("%s t=%.2f ms"%(comp.engine, comp_time)) 592 592 #cbar_title = "log I" 593 593 if Ncomp > 0 and Nbase > 0: -
sasmodels/data.py
rc094758 r092cb3c 389 389 if view is 'log': 390 390 mdata[mdata <= 0] = masked 391 plt.errorbar(data.x /10, scale*mdata, yerr=data.dy, fmt='.')391 plt.errorbar(data.x, scale*mdata, yerr=data.dy, fmt='.') 392 392 all_positive = all_positive and (mdata > 0).all() 393 393 some_present = some_present or (mdata.count() > 0) … … 412 412 if view == 'q4' or not some_present or not all_positive 413 413 else view) 414 plt.xlabel("$q$/ nm$^{-1}$")414 plt.xlabel("$q$/A$^{-1}$") 415 415 plt.ylabel('$I(q)$') 416 416 … … 422 422 if num_plots > 1: 423 423 plt.subplot(1, num_plots, (use_data or use_theory) + 1) 424 plt.plot(data.x /10, mresid, '-')425 plt.xlabel("$q$/ nm$^{-1}$")424 plt.plot(data.x, mresid, '-') 425 plt.xlabel("$q$/A$^{-1}$") 426 426 plt.ylabel('residuals') 427 427 plt.xscale('linear' if not some_present else view)
Note: See TracChangeset
for help on using the changeset viewer.