Changeset b151003 in sasmodels for sasmodels/data.py


Ignore:
Timestamp:
Apr 14, 2016 8:57:32 AM (8 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:
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.
Message:

Merge remote-tracking branch 'origin/master' into polydisp

Conflicts:

sasmodels/model_test.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/data.py

    ra5b8477 rb151003  
    410410    use_calc = use_theory and Iq_calc is not None 
    411411    num_plots = (use_data or use_theory) + use_calc + use_resid 
    412  
     412    non_positive_x = (data.x<=0.0).any() 
    413413 
    414414    scale = data.x**4 if view == 'q4' else 1.0 
     
    432432 
    433433        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. 
    434436            mtheory = masked_array(theory, data.mask.copy()) 
    435437            mtheory[~np.isfinite(mtheory)] = masked 
     
    443445            plt.ylim(*limits) 
    444446 
    445         plt.xscale('linear' if not some_present else view) 
     447        plt.xscale('linear' if not some_present or non_positive_x  else view) 
    446448        plt.yscale('linear' 
    447449                   if view == 'q4' or not some_present or not all_positive 
     
    471473        plt.xlabel("$q$/A$^{-1}$") 
    472474        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) 
    474476 
    475477 
Note: See TracChangeset for help on using the changeset viewer.