Changeset 29f5536 in sasmodels


Ignore:
Timestamp:
Feb 19, 2015 5:25:48 PM (9 years ago)
Author:
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:
1ed9e3f
Parents:
261658d
Message:

show log error in compare

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • compare.py

    rf173599 r29f5536  
    163163                      if len(split) == 2) 
    164164    # Sort out data 
    165     qmax = 1.0 if '-highq' in opts else (0.2 if '-midq' in opts else 0.05) 
     165    qmax = 10.0 if '-exq' in opts else 1.0 if '-highq' in opts else 0.2 if '-midq' in opts else 0.05 
    166166    Nq = int(opt_values.get('-Nq', '128')) 
    167167    is2D = not "-1d" in opts 
     
    225225        plot_data(data, cpu, scale='log') 
    226226        plt.title("%s t=%.1f ms"%(comp,cpu_time)) 
     227        cbar_title = "log I" 
    227228    if Nocl > 0: 
    228229        if Ncpu > 0: plt.subplot(132) 
    229230        plot_data(data, ocl, scale='log') 
    230231        plt.title("opencl t=%.1f ms"%ocl_time) 
     232        cbar_title = "log I" 
    231233    if Ncpu > 0 and Nocl > 0: 
    232234        plt.subplot(133) 
    233         err = resid if '-abs' in opts else relerr 
    234         errstr = "abs err" if '-abs' in opts else "rel err" 
     235        if '-abs' in opts: 
     236            err,errstr = resid, "abs err" 
     237        else: 
     238            err,errstr = relerr, "rel err" 
    235239        #err,errstr = ocl/cpu,"ratio" 
    236         plot_data(data, err, scale='linear') 
     240        plot_data(data, err, scale='log') #'linear') 
    237241        plt.title("max %s = %.3g"%(errstr, max(abs(err[index])))) 
    238     if is2D: plt.colorbar() 
     242        cbar_title = "log "+errstr 
     243    if is2D: 
     244        h = plt.colorbar() 
     245        h.ax.set_title(cbar_title) 
    239246 
    240247    if Ncpu > 0 and Nocl > 0 and '-hist' in opts: 
     
    265272    -plot*/-noplot plots or suppress the plot of the model 
    266273    -single*/-double uses double precision for comparison 
    267     -lowq*/-midq/-highq use q values up to 0.05, 0.2 or 1.0 
     274    -lowq*/-midq/-highq/-exq use q values up to 0.05, 0.2, 1.0, 10.0 
    268275    -Nq=128 sets the number of Q points in the data set 
    269276    -1d/-2d* computes 1d or 2d data 
     
    287294    'plot','noplot', 
    288295    'single','double', 
    289     'lowq','midq','highq', 
     296    'lowq','midq','highq','exq', 
    290297    '2d','1d', 
    291298    'preset','random', 
  • sasmodels/bumps_model.py

    r8632a35 r29f5536  
    165165    import matplotlib.pyplot as plt 
    166166    if hasattr(data, 'qx_data'): 
    167         iq = iq[:] 
     167        iq = iq+0 
    168168        valid = np.isfinite(iq) 
    169169        if scale == 'log': 
Note: See TracChangeset for help on using the changeset viewer.