Changeset 7e923c2 in sasmodels for sasmodels/data.py
- Timestamp:
- Aug 7, 2018 10:45:52 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 1a7ddc9
- Parents:
- c036ddb (diff), e9b17b18 (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
rc036ddb r7e923c2 502 502 # Note: masks merge, so any masked theory points will stay masked, 503 503 # and the data mask will be added to it. 504 mtheory = masked_array(theory, data.mask.copy()) 504 #mtheory = masked_array(theory, data.mask.copy()) 505 theory_x = data.x[data.mask == 0] 506 mtheory = masked_array(theory) 505 507 mtheory[~np.isfinite(mtheory)] = masked 506 508 if view is 'log': 507 509 mtheory[mtheory <= 0] = masked 508 plt.plot( data.x, scale*mtheory, '-')510 plt.plot(theory_x, scale*mtheory, '-') 509 511 all_positive = all_positive and (mtheory > 0).all() 510 512 some_present = some_present or (mtheory.count() > 0) … … 542 544 543 545 if use_resid: 544 mresid = masked_array(resid, data.mask.copy()) 546 theory_x = data.x[data.mask == 0] 547 mresid = masked_array(resid) 545 548 mresid[~np.isfinite(mresid)] = masked 546 549 some_present = (mresid.count() > 0) … … 548 551 if num_plots > 1: 549 552 plt.subplot(1, num_plots, use_calc + 2) 550 plt.plot( data.x, mresid, '.')553 plt.plot(theory_x, mresid, '.') 551 554 plt.xlabel("$q$/A$^{-1}$") 552 555 plt.ylabel('residuals')
Note: See TracChangeset
for help on using the changeset viewer.