Changeset 40a87fa in sasmodels for sasmodels/data.py
- Timestamp:
- Aug 8, 2016 9:24:11 AM (8 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:
- 2472141
- Parents:
- 2d65d51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/data.py
r56b2687 r40a87fa 155 155 156 156 class SesansData(Data1D): 157 """ 158 SESANS data object. 159 160 This is just :class:`Data1D` with a wavelength parameter. 161 162 *x* is spin echo length and *y* is polarization (P/P0). 163 """ 157 164 def __init__(self, **kw): 158 165 Data1D.__init__(self, **kw) … … 213 220 self._zaxis, self._zunit = "z", "" 214 221 self.x_bins, self.y_bins = None, None 222 self.filename = None 215 223 216 224 def xaxis(self, label, unit): … … 377 385 378 386 379 def protect(f n):387 def protect(func): 380 388 # type: (Callable) -> Callable 381 389 """ … … 388 396 """ 389 397 try: 390 return f n(*args, **kw)398 return func(*args, **kw) 391 399 except Exception: 392 400 traceback.print_exc() … … 410 418 use_calc = use_theory and Iq_calc is not None 411 419 num_plots = (use_data or use_theory) + use_calc + use_resid 412 non_positive_x = (data.x <=0.0).any()420 non_positive_x = (data.x <= 0.0).any() 413 421 414 422 scale = data.x**4 if view == 'q4' else 1.0 … … 456 464 plt.subplot(1, num_plots, 2) 457 465 qx, qy, Iqxy = Iq_calc 458 plt.pcolormesh(qx, qy[qy >0], np.log10(Iqxy[qy>0,:]))466 plt.pcolormesh(qx, qy[qy > 0], np.log10(Iqxy[qy > 0, :])) 459 467 plt.xlabel("$q_x$/A$^{-1}$") 460 468 plt.xlabel("$q_y$/A$^{-1}$") … … 508 516 plt.xlabel('spin echo length ({})'.format(data._xunit)) 509 517 if is_tof: 510 plt.ylabel( '(Log (P/P$_0$))/$\lambda^2$')518 plt.ylabel(r'(Log (P/P$_0$))/$\lambda^2$') 511 519 else: 512 520 plt.ylabel('polarization (P/P0)')
Note: See TracChangeset
for help on using the changeset viewer.