Changeset b151003 in sasmodels for sasmodels/data.py
- Timestamp:
- Apr 14, 2016 8:57:32 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:
- 391ea92, dd7fc12
- Parents:
- 0ce5710 (diff), 7abcc59 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/data.py
ra5b8477 rb151003 410 410 use_calc = use_theory and Iq_calc is not None 411 411 num_plots = (use_data or use_theory) + use_calc + use_resid 412 412 non_positive_x = (data.x<=0.0).any() 413 413 414 414 scale = data.x**4 if view == 'q4' else 1.0 … … 432 432 433 433 if use_theory: 434 # Note: masks merge, so any masked theory points will stay masked, 435 # and the data mask will be added to it. 434 436 mtheory = masked_array(theory, data.mask.copy()) 435 437 mtheory[~np.isfinite(mtheory)] = masked … … 443 445 plt.ylim(*limits) 444 446 445 plt.xscale('linear' if not some_present else view)447 plt.xscale('linear' if not some_present or non_positive_x else view) 446 448 plt.yscale('linear' 447 449 if view == 'q4' or not some_present or not all_positive … … 471 473 plt.xlabel("$q$/A$^{-1}$") 472 474 plt.ylabel('residuals') 473 plt.xscale('linear' if not some_present else view)475 plt.xscale('linear' if not some_present or non_positive_x else view) 474 476 475 477
Note: See TracChangeset
for help on using the changeset viewer.