Changeset e78edc4 in sasmodels for sasmodels/data.py
- Timestamp:
- Apr 14, 2016 8:41:17 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:
- 7abcc59
- Parents:
- 62cf915
- git-author:
- Paul Kienzle <pkienzle@…> (04/14/16 08:37:03)
- git-committer:
- Paul Kienzle <pkienzle@…> (04/14/16 08:41:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/data.py
rd6f5da6 re78edc4 380 380 use_calc = use_theory and Iq_calc is not None 381 381 num_plots = (use_data or use_theory) + use_calc + use_resid 382 382 non_positive_x = (data.x<=0.0).any() 383 383 384 384 scale = data.x**4 if view == 'q4' else 1.0 … … 402 402 403 403 if use_theory: 404 # Note: masks merge, so any masked theory points will stay masked, 405 # and the data mask will be added to it. 404 406 mtheory = masked_array(theory, data.mask.copy()) 405 407 mtheory[~np.isfinite(mtheory)] = masked … … 413 415 plt.ylim(*limits) 414 416 415 plt.xscale('linear' if not some_present else view)417 plt.xscale('linear' if not some_present or non_positive_x else view) 416 418 plt.yscale('linear' 417 419 if view == 'q4' or not some_present or not all_positive … … 441 443 plt.xlabel("$q$/A$^{-1}$") 442 444 plt.ylabel('residuals') 443 plt.xscale('linear' if not some_present else view)445 plt.xscale('linear' if not some_present or non_positive_x else view) 444 446 445 447
Note: See TracChangeset
for help on using the changeset viewer.