Changeset 2863 for trunk/GSASIIsasd.py


Ignore:
Timestamp:
Jun 14, 2017 4:11:42 PM (4 years ago)
Author:
vondreele
Message:

extend contour color selection to include reversed ones (doubles the list!)
add Contour_color to configuration items; modify the Preferences GUI to present a ComboBox? for the color maps
continue implementation of protein validator
np.max --> np.fmax in some places (there may be more to be found); new numpy won't allow np.max to be used to compare an array with a value
fix one use of float as array index - not allowed now: there may be others in G2plot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIsasd.py

    r2802 r2863  
    444444    scale = args[0]
    445445    nP = 500
    446     xMin = np.max([0.,pos-4.*scale])
    447     xMax = np.min([pos+4.*scale,1.e5])
     446    xMin = np.fmax([0.,pos-4.*scale])
     447    xMax = np.fmin([pos+4.*scale,1.e5])
    448448    X = np.linspace(xMin,xMax,nP,True)
    449449    fxn = LSWDist(X,pos)
     
    10031003    x,y = Profile[:2]
    10041004    rx,ry = refProfile[:2]
    1005     Beg = np.max([rx[0],x[0],Limits[1][0],refLimits[1][0]])
    1006     Fin = np.min([rx[-1],x[-1],Limits[1][1],refLimits[1][1]])
     1005    Beg = np.fmax([rx[0],x[0],Limits[1][0],refLimits[1][0]])
     1006    Fin = np.fmin([rx[-1],x[-1],Limits[1][1],refLimits[1][1]])
    10071007    iBeg = np.searchsorted(x,Beg)
    10081008    iFin = np.searchsorted(x,Fin)+1        #include last point
     
    14041404        step = 0.02*distDict['StdDev']
    14051405        mode = distDict['Mean']
    1406         minX = np.max([mode-4.*distDict['StdDev'],1.])
    1407         maxX = np.min([mode+4.*distDict['StdDev'],1.e5])
     1406        minX = np.fmax([mode-4.*distDict['StdDev'],1.])
     1407        maxX = np.fmin([mode+4.*distDict['StdDev'],1.e5])
    14081408    elif 'LSW' in DistName:
    14091409        distFxn = 'LSWDist'
     
    14171417        pos = distDict['Mean']
    14181418        args = [distDict['StdDev']]
    1419         minX = np.max([1.,pos-4.*distDict['StdDev']])
    1420         maxX = np.min([pos+4.*distDict['StdDev'],1.e5])
     1419        minX = np.fmax([1.,pos-4.*distDict['StdDev']])
     1420        maxX = np.fmin([pos+4.*distDict['StdDev'],1.e5])
    14211421    nP = 500
    14221422    Diam = np.logspace(0.,5.,nP,True)
Note: See TracChangeset for help on using the changeset viewer.