Changeset 528bd8c in sasmodels


Ignore:
Timestamp:
Mar 17, 2016 9:36:23 AM (8 years ago)
Author:
awashington
Parents:
4373d62 (diff), 715bb83 (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.
Message:

Merge 715bb8386192a1737472156141049bbf11899237 into 4373d62e7aa3cecc6c87ef83dac6e3f9cb33df6f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/data.py

    r7824276 r715bb83  
    440440 
    441441    if use_data or use_theory: 
     442        is_tof = np.any(data.lam!=data.lam[0]) 
    442443        if num_plots > 1: 
    443444            plt.subplot(1, num_plots, 1) 
    444445        if use_data: 
    445             plt.errorbar(data.x, data.y, yerr=data.dy) 
     446            if is_tof: 
     447                plt.errorbar(data.x, np.log(data.y)/data.lam**2, yerr=data.dy/data.y/data.lam**2) 
     448            else: 
     449                plt.errorbar(data.x, data.y, yerr=data.dy) 
    446450        if theory is not None: 
    447             plt.plot(data.x, theory, '-', hold=True) 
     451            if is_tof: 
     452                plt.plot(data.x, np.log(theory)/data.lam**2, '-', hold=True) 
     453            else: 
     454                plt.plot(data.x, theory, '-', hold=True) 
    448455        if limits is not None: 
    449456            plt.ylim(*limits) 
    450457        plt.xlabel('spin echo length (nm)') 
    451         plt.ylabel('polarization (P/P0)') 
     458        if is_tof: 
     459            plt.ylabel('(Log (P/P$_0$))/$\lambda^2$') 
     460        else: 
     461            plt.ylabel('Polarisation (P/P0)') 
    452462 
    453463    if resid is not None: 
Note: See TracChangeset for help on using the changeset viewer.