Changeset 5134b2c in sasmodels for sasmodels/bumps_model.py


Ignore:
Timestamp:
Feb 24, 2015 2:04:29 PM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
8b81801
Parents:
02dfcab
Message:

fix compare plots so they show both positive and negative error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/bumps_model.py

    rf1ecfa92 r5134b2c  
    175175        xmin, xmax = min(data.qx_data), max(data.qx_data) 
    176176        ymin, ymax = min(data.qy_data), max(data.qy_data) 
    177         if vmin is None: vmin = iq[valid&~data.mask].min() 
    178         if vmax is None: vmax = iq[valid&~data.mask].max() 
     177        try: 
     178            if vmin is None: vmin = iq[valid&~data.mask].min() 
     179            if vmax is None: vmax = iq[valid&~data.mask].max() 
     180        except: 
     181            vmin, vmax = 0, 1 
    179182        plt.imshow(plottable.reshape(128,128), 
    180183                   interpolation='nearest', aspect=1, origin='upper', 
Note: See TracChangeset for help on using the changeset viewer.