Changeset 2863


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

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2851 r2863  
    26112611        self.dataFrame = None
    26122612        self.Interpolate = 'nearest'
    2613         self.ContourColor = 'Paired'
     2613        self.ContourColor = GSASIIpath.GetConfigValue('Contour_color','gist_ncar')
    26142614        self.VcovColor = 'RdYlGn'
    26152615        self.RamaColor = 'Blues'
  • trunk/GSASIIIO.py

    r2818 r2863  
    310310    else:
    311311        Data['type'] = 'PWDR'
    312         Data['color'] = 'Paired'
     312        Data['color'] = GSASIIpath.GetConfigValue('Contour_color','gist_ncar')
    313313        Data['tilt'] = 0.0
    314314        Data['rotation'] = 0.0
  • trunk/GSASIIctrls.py

    r2853 r2863  
    2424import wx.aui
    2525import wx.lib.scrolledpanel as wxscroll
     26import matplotlib as mpl
    2627import time
    2728import copy
     
    36213622        self.choice = {}
    36223623        btn = G2ChoiceButton(self, sorted(self.vars.keys(),key=lambda s: s.lower()),
    3623                                  strLoc=self.choice,strKey=0,
    3624                                  onChoice=self.OnSelection)
     3624            strLoc=self.choice,strKey=0,onChoice=self.OnSelection)
    36253625        btn.SetLabel("")
    36263626        self.sizer.Add(btn)
     
    36513651        self.sizer.Fit(self)
    36523652        self.CenterOnParent()
    3653 
     3653       
    36543654    def OnChange(self,event=None):
    36553655        ''' Check if anything been changed. Turn the save button on/off.
     
    37053705    def OnSelection(self):
    37063706        'show a selected variable'
     3707        def OnNewColorBar(event):
     3708            self.vars['Contour_color'][1] = self.colSel.GetValue()
     3709            self.OnChange(event)
     3710
    37073711        self.varsizer.DeleteWindows()
    37083712        var = self.choice[0]
     
    37263730                    s += ' (default)'
    37273731                ch += [s]
    3728             rb = wx.RadioBox(
    3729                     self, wx.ID_ANY, lbl, wx.DefaultPosition, wx.DefaultSize,
    3730                     ch, 1, wx.RA_SPECIFY_COLS
    3731             )
     3732            rb = wx.RadioBox(self, wx.ID_ANY, lbl, wx.DefaultPosition, wx.DefaultSize,
     3733                ch, 1, wx.RA_SPECIFY_COLS)
    37323734            # set initial value
    37333735            if self.vars[var][1] is None:
     
    37463748                btn = None
    37473749                sz = (250,-1)
    3748             self.strEd = ValidatedTxtCtrl(self,self.vars[var],1,typeHint=str,OKcontrol=self.OnChange,
    3749                                               size=sz)
    3750             if self.vars[var][1] is not None:
    3751                 self.strEd.SetValue(self.vars[var][1])
    3752             self.varsizer.Add(self.strEd, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
     3750            if var == 'Contour_color':
     3751                colorList = sorted([m for m in mpl.cm.datad.keys() ],key=lambda s: s.lower())   #if not m.endswith("_r")
     3752                self.colSel = wx.ComboBox(self,value=self.vars[var][1],choices=colorList,
     3753                    style=wx.CB_READONLY|wx.CB_DROPDOWN)
     3754                self.colSel.Bind(wx.EVT_COMBOBOX, OnNewColorBar)
     3755                self.varsizer.Add(self.colSel, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
     3756            else:
     3757                self.strEd = ValidatedTxtCtrl(self,self.vars[var],1,typeHint=str,
     3758                    OKcontrol=self.OnChange,size=sz)
     3759                if self.vars[var][1] is not None:
     3760                    self.strEd.SetValue(self.vars[var][1])
     3761                self.varsizer.Add(self.strEd, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
    37533762            if btn:
    37543763                btn.Bind(wx.EVT_BUTTON,self.onSelDir)
  • trunk/GSASIIimgGUI.py

    r2835 r2863  
    11751175        return
    11761176   
    1177     colorList = sorted([m for m in mpl.cm.datad.keys() if not m.endswith("_r")],key=lambda s: s.lower())
     1177    colorList = sorted([m for m in mpl.cm.datad.keys() ],key=lambda s: s.lower())   #if not m.endswith("_r")
    11781178    calList = sorted([m for m in calFile.Calibrants.keys()],key=lambda s: s.lower())
    11791179    typeList = ['PWDR - powder diffraction data','SASD - small angle scattering data',]
  • trunk/GSASIImath.py

    r2860 r2863  
    25732573
    25742574def validProtein(Phase):
     2575   
     2576    def sumintact(intact):
     2577        return {'CC':intact['CC'],'NN':intact['NN'],'OO':intact['OO'],
     2578        'CN':(intact['CN']+intact['NC']),'CO':(intact['CO']+intact['OC']),
     2579        'NO':(intact['NO']+intact['ON'])}
     2580       
    25752581    resNames = ['ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE',
    25762582        'LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL','MSE']
     
    25832589          [0,   4236.200004171890200,   1521.387352718486200,   6620.715738223072500,   18368.343774298410000,  4050.797811118806700], 
    25842590          [0,   5054.781210204625500,   4304.078200827220800,   5287.691183798409800,   4050.797811118806700,   6666.856740479164700]])
    2585     avg = np.array([0.192765509919262, 0.195575208778518, 0.275322406824210, 0.059102357035642, 0.233154192767480])
     2591    avg = np.array([0.,0.192765509919262, 0.195575208778518, 0.275322406824210, 0.059102357035642, 0.233154192767480])
    25862592    General = Phase['General']
    25872593    Amat,Bmat = G2lat.cell2AB(General['Cell'][1:7])
     
    25892595    Atoms = Phase['Atoms']
    25902596    cartAtoms = []
    2591     chains = []
    2592     chainBeg = []
    25932597    xyzmin = 999.*np.ones(3)
    25942598    xyzmax = -999.*np.ones(3)
     2599    #select residue atoms, skipping main chain C & N; make cartesian
    25952600    for atom in Atoms:
    25962601        if atom[1] in resNames:
     2602            if atom[4].strip() in ['S','Se']:
     2603                atom[4] = 'O'
     2604            if atom[3].strip() in ['C','N']:    #skip main chain C & N atoms
     2605                continue
    25972606            cartAtoms.append(atom[:cx+3])
    2598             if atom[2] not in chains:
    2599                 chains.append(atom[2])
    2600                 chainBeg.append(len(cartAtoms)-1)
    26012607            cartAtoms[-1][cx:cx+3] = np.inner(Amat,cartAtoms[-1][cx:cx+3])
    26022608    XYZ = np.array([atom[cx:cx+3] for atom in cartAtoms])
     
    26122618    Units = np.array([[h,k,l] for h in indices for k in indices for l in indices])
    26132619    dsmax = 3.75**2
     2620    chains = []
     2621    resIntAct = []
     2622    chainIntAct = []
     2623    res = []
     2624    newChain = True
     2625    intact = {'CC':0,'CN':0,'CO':0,'NN':0,'NO':0,'OO':0,'NC':0,'OC':0,'ON':0}
    26142626    for ia,atom in enumerate(cartAtoms):
    2615         if atom[3].strip() in ['C','N']:    #skip main chain C & N atoms
    2616             continue
     2627        if atom[2] not in chains:   #get chain id & save residue sequence from last chain
     2628            chains.append(atom[2])
     2629            if len(resIntAct):
     2630                resIntAct.append(sumintact(intact))
     2631                chainIntAct.append(resIntAct)
     2632                res = []
     2633                resIntAct = []
     2634                intact = {'CC':0,'CN':0,'CO':0,'NN':0,'NO':0,'OO':0,'NC':0,'OC':0,'ON':0}
     2635                newChain = True
     2636        if atom[0] not in res:  #new residue, get residue no.
     2637            res.append(atom[0])
     2638            if not newChain:
     2639                resIntAct.append(sumintact(intact))
     2640            intact = {'CC':0,'CN':0,'CO':0,'NN':0,'NO':0,'OO':0,'NC':0,'OC':0,'ON':0}
     2641            newChain = False
    26172642        ibox = iBox[ia]         #box location of atom
    26182643        tgts = []
     
    26252650        tgts = [tgt for tgt in tgts if cartAtoms[tgt][3].strip() not in ['C','N']]  #exclude main chain
    26262651        tgts = [tgt for tgt in tgts if np.sum((XYZ[ia]-XYZ[tgt])**2) <= dsmax]
     2652        for tgt in tgts:
     2653            dsqt = np.sqrt(np.sum((XYZ[ia]-XYZ[tgt])**2))
     2654            mult = 1.0
     2655            if dsqt > 3.25:
     2656                mult = 2.*(3.75-dsqt)
     2657            intype = atom[4].strip()+cartAtoms[tgt][4].strip()
     2658            intact[intype] += mult           
     2659    resIntAct.append(sumintact(intact))
     2660    chainIntAct.append(resIntAct)
     2661    chainProb = []
     2662    for ich,chn in enumerate(chains):
     2663        IntAct = chainIntAct[ich]
     2664        nRes = len(IntAct)
     2665        Probs = []
     2666        for i in range(4,nRes-4):
     2667            mtrx = np.zeros(6)
     2668            summ = 0.
     2669            for j in range(i-4,i+4):
     2670                summ += np.sum(np.array(IntAct[j].values()))
     2671                mtrx[1] += IntAct[j]['CC']
     2672                mtrx[2] += IntAct[j]['CN']
     2673                mtrx[3] += IntAct[j]['CO']
     2674                mtrx[4] += IntAct[j]['NN']
     2675                mtrx[5] += IntAct[j]['NO']
     2676            mtrx /= summ
     2677            mtrx -= avg
     2678            prob = np.inner(np.inner(mtrx,b1),mtrx)
     2679            Probs.append(prob)
     2680        chainProb.append(Probs)
    26272681           
    26282682       
     
    26972751            Refs = refData[hist]
    26982752            Refs[:,5] = np.where(Refs[:,5]>0.,Refs[:,5],0.)
    2699             wt = 1./np.sqrt(np.max(Refs[:,4],.25))
     2753            wt = 1./np.sqrt(np.fmax(Refs[:,4],.25))
    27002754#            wt = 1./np.max(Refs[:,4],.25)
    27012755            sumObs += np.sum(wt*Refs[:,5])
     
    27262780            Refs = refData[hist]
    27272781            H = Refs[:,:3]
    2728             wt = 1./np.sqrt(np.max(Refs[:,4],.25))
     2782            wt = 1./np.sqrt(np.fmax(Refs[:,4],.25))
    27292783#            wt = 1./np.max(Refs[:,4],.25)
    27302784            phi,beta = G2lat.CrsAng(H,cell,SGData)
  • trunk/GSASIIobj.py

    r2846 r2863  
    752752\                           centerAzm           (bool) If True then the azimuth reported for the integrated slice
    753753                                                of the image is at the center line otherwise it is at the leading edge.
    754 \                           color               (str) The name of the colormap used to display the image. Default = 'Paired'.
     754\                           color               (str) The name of the colormap used to display the image. Default = 'gist_ncar'.
    755755\                           cutoff              (float) The minimum value of I/Ib for a point selected in a diffraction ring for
    756756                                                calibration calculations. See pixLimit for details as how point is found.           
  • trunk/GSASIIphsGUI.py

    r2853 r2863  
    54975497        if 'Axial' not in textureData['PlotType'] and '3D' not in textureData['PlotType']:
    54985498            PTSizer.Add(wx.StaticText(Texture,-1,' Color scheme'),0,WACV)
    5499             choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
     5499            choice = [m for m in mpl.cm.datad.keys()]       #if not m.endswith("_r")
    55005500            choice.sort()
    55015501            colorSel = wx.ComboBox(Texture,-1,value=G2frame.ContourColor,choices=choice,
     
    76427642        if 'Map Peaks' in data:
    76437643            mapPeaks = np.array(data['Map Peaks'])
    7644             peakMax = np.max(mapPeaks.T[0])
     7644            peakMax = np.fmax(mapPeaks.T[0])
    76457645            Ind = MapPeaks.GetSelectedRows()
    76467646            for ind in Ind:
  • trunk/GSASIIplot.py

    r2849 r2863  
    12551255        elif event.key == 's' and 'PWDR' in plottype:
    12561256            if G2frame.Contour:
    1257                 choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
     1257                choice = [m for m in mpl.cm.datad.keys()]   # if not m.endswith("_r")
    12581258                choice.sort()
    12591259                dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice)
     
    12621262                    G2frame.ContourColor = choice[sel]
    12631263                else:
    1264                     G2frame.ContourColor = 'Paired'
     1264                    G2frame.ContourColor = GSASIIpath.GetConfigValue('Contour_color','gist_ncar')
    12651265                dlg.Destroy()
    12661266            elif G2frame.SinglePlot:
     
    13741374                    xpos = G2lat.Dsp2pos(Parms,xpos)
    13751375                elif G2frame.Contour and 'T' in Parms['Type'][0]:
    1376                     xpos = X[xpos]                    
     1376                    xpos = X[int(xpos)]                   
    13771377                    dsp = G2lat.Pos2dsp(Parms,xpos)
    13781378                    q = 2.*np.pi/dsp
     
    24392439            dlg.Destroy()
    24402440        elif event.key == 's':
    2441             choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
     2441            choice = [m for m in mpl.cm.datad.keys()]   # if not m.endswith("_r")
    24422442            choice.sort()
    24432443            dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice)
     
    24462446                G2frame.ContourColor = choice[sel]
    24472447            else:
    2448                 G2frame.ContourColor = 'Paired'
     2448                G2frame.ContourColor = GSASIIpath.GetConfigValue('Contour_color','gist_ncar')
    24492449            dlg.Destroy()
    24502450        elif event.key == 'i':                  #for smoothing contour plot
     
    29872987           
    29882988        elif event.key == 's':
    2989             choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
     2989            choice = [m for m in mpl.cm.datad.keys()]   # if not m.endswith("_r")
    29902990            choice.sort()
    29912991            dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice)
     
    29942994                G2frame.ContourColor = choice[sel]
    29952995            else:
    2996                 G2frame.ContourColor = 'Paired'
     2996                G2frame.ContourColor = GSASIIpath.GetConfigValue('Contour_color','gist_ncar')
    29972997            dlg.Destroy()
    29982998        wx.CallAfter(PlotXYZ,G2frame,XY,Z,labelX,labelY,False,Title)
     
    36253625        except ValueError:
    36263626            pass
    3627         Img = Plot.imshow(Z.T,aspect='equal',cmap=G2frame.ContourColor,extent=[-1,1,-1,1])
     3627        acolor = mpl.cm.get_cmap(G2frame.ContourColor)
     3628        Img = Plot.imshow(Z.T,aspect='equal',cmap=acolor,extent=[-1,1,-1,1])
    36283629        Plot.plot(-x,y,'+',picker=3)
    36293630        Page.figure.colorbar(Img)
     
    37463747            except ValueError:
    37473748                pass
    3748             Img = Plot.imshow(Z.T,aspect='equal',cmap=G2frame.ContourColor,extent=[-1,1,-1,1])
     3749            acolor = mpl.cm.get_cmap(G2frame.ContourColor)
     3750            Img = Plot.imshow(Z.T,aspect='equal',cmap=acolor,extent=[-1,1,-1,1])
    37493751            Page.figure.colorbar(Img)
    37503752            x,y,z = SHData['PFxyz']
     
    37943796            except ValueError:
    37953797                pass
    3796             Img = Plot.imshow(Z.T,aspect='equal',cmap=G2frame.ContourColor,extent=[-1,1,-1,1])
     3798            acolor = mpl.cm.get_cmap(G2frame.ContourColor)
     3799            Img = Plot.imshow(Z.T,aspect='equal',cmap=acolor,extent=[-1,1,-1,1])
    37973800            Page.figure.colorbar(Img)
    37983801            h,k,l = SHData['PFhkl']
     
    39373940    def OnPlotKeyPress(event):
    39383941        if event.key == 's':
    3939             choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
     3942            choice = [m for m in mpl.cm.datad.keys()]   # if not m.endswith("_r")
    39403943            choice.sort()
    39413944            dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice)
     
    40964099    def OnPlotKeyPress(event):
    40974100        if event.key == 's':
    4098             choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
     4101            choice = [m for m in mpl.cm.datad.keys()]   # if not m.endswith("_r")
    40994102            choice.sort()
    41004103            dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice)
  • 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)
  • trunk/config_example.py

    r2796 r2863  
    139139'''Specifies the width of phase tick marks in pixels.
    140140Fractional values do seem to produce an effect. Default is 1.'''
     141Contour_color = 'Paired'
     142''' Specifies the color map to be used for contour plots (images, pole figures, etc.)
     143'''
  • trunk/fsource/SConstruct

    r1357 r2863  
    3232# need command-line options for fortran command and fortran options
    3333F2PYflags = '' # compiler options for f2py command
     34F2PYpath = ARGUMENTS.get('F2PYpath', '')
    3435# find a default f2py relative to the scons location. Should be in the same place as f2py
    35 F2PYpath = ''
    36 for program in ['f2py','../f2py']:
    37     if sys.platform == "win32" and os.path.splitext(program)[1].lower() != '.exe':
    38         program = program + '.exe'
    39     spath = os.path.split(sys.executable)[0]
    40     print spath
    41     f2pyprogram = os.path.normpath(os.path.join(spath,program))
     36spath = os.path.normpath(os.path.split(sys.executable)[0])
     37for pth in [F2PYpath,spath,os.path.normpath(os.path.join(spath,'..')),os.path.join(spath,'Scripts')]:
     38    if not pth: continue
     39    if sys.platform == "win32":
     40        program = 'f2py.exe'
     41    else:
     42        program = 'f2py'
     43    f2pyprogram = os.path.join(pth,program)
    4244    if is_exe(f2pyprogram):
    43         F2PYpath = os.path.split(f2pyprogram)[0]
     45        F2PYpath,F2PYprog = os.path.split(f2pyprogram)
     46        break
     47    program = 'f2py.py'
     48    f2pyprogram = os.path.join(pth,program)
     49    if os.path.exists(f2pyprogram) and os.path.splitext(program)[1] == '.py':
     50        F2PYpath,F2PYprog = os.path.split(f2pyprogram)
    4451        break
    4552else:
    4653    print 'Note: Using f2py from path (hope that works!)'
    4754    F2PYpath = which_path('f2py')       # default path to f2py
     55    F2PYprog = 'f2py'
     56# check if we have a working path to f2py:
     57f2pyprogram = os.path.normpath(os.path.join(F2PYpath,F2PYprog))
     58if os.path.exists(f2pyprogram) and os.path.splitext(program)[1] == '.py':
     59    pass
     60elif is_exe(f2pyprogram):
     61    pass
     62else:
     63    print '''
     64ERROR: The f2py program was not found. If this program is installed
     65but not in your path, you should specify the path on the command line:
     66   scons -Q F2PYpath=/Library/Frameworks/Python.framework/Versions/6.2/bin/
     67   scons -Q F2PYpath=D:/Python27/Scripts
     68'''
     69    sys.exit()
    4870
    4971GFORTpath = which_path('gfortran')   # path to compiler
     
    144166#==========================================================================================
    145167# get the python version number from the python image in the f2py directory
    146 # first check if we have a working path to f2py:
    147 f2pyprogram = os.path.normpath(os.path.join(F2PYpath,'f2py'))
    148 if sys.platform == "win32" and os.path.splitext(f2pyprogram)[1].lower() != '.exe':
    149     f2pyprogram = f2pyprogram + '.exe'
    150 if not is_exe(f2pyprogram):
    151     print '''
    152 ERROR: The f2py program was not found. If this program is installed
    153 but not in your path, you should specify the path on the command line:
    154    scons -Q F2PYpath=/Library/Frameworks/Python.framework/Versions/6.2/bin/
    155    scons -Q F2PYpath=D:/Python27/Scripts
    156 '''
    157     sys.exit()
    158168# find the python location associated with the f2py in use. Note
    159169#   that on Windows it may be in the parent of the f2py location.
     
    213223    elif sys.platform == "darwin":
    214224        if F2PYflags == "": F2PYflags = '--fcompiler=gnu95 --f77exec=gfortran --f77flags="-fno-range-check -m32"'
     225    elif sys.platform == "win32":
     226         if F2PYflags == "": F2PYflags = '--compiler=mingw32 --fcompiler=gfortran --f77flags="-fno-range-check -m64"'
    215227elif FCompiler == 'g77':
    216228    if FORTpath == "": FORTpath = G77path
    217229    if sys.platform == "win32":
    218         if F2PYflags == "": F2PYflags = '--compiler=mingw32'
     230        if F2PYflags == "": F2PYflags = '--compiler=mingw32 --fcompiler=g77'
    219231        if FORTflags == "": FORTflags = ' -w -O2 -fno-automatic -finit-local-zero -malign-double -mwindows'
    220232    else:
     
    235247        for lib in liblist:
    236248            module = module + ' ' + str(lib)
    237     return os.path.join(F2PYpath,'f2py')  + ' -c $SOURCE -m ' + module + ' ' + F2PYflags
     249    f2pyprogram = os.path.normpath(os.path.join(F2PYpath,F2PYprog))
     250    if os.path.splitext(F2PYprog)[1] == '.py':
     251        return pythonprogram + ' ' + f2pyprogram + ' -c $SOURCE ' + ' -m ' + module + ' ' + F2PYflags
     252    else:
     253        return f2pyprogram + ' -c $SOURCE' + ' -m ' + module + ' ' + F2PYflags
    238254f2py = Builder(generator = generate_f2py)
    239255env.Append(BUILDERS = {'f2py' : f2py},)
     
    243259    obj = os.path.splitext(str(source[0]))[0]+'.o'
    244260    return os.path.join(FORTpath,FCompiler)  + ' -c $SOURCE ' + FORTflags + ' -I' + dir + ' -o' + obj
    245 fort = Builder(generator = generate_obj, suffix = '.o',
    246                src_suffix = '.for')
     261fort = Builder(generator = generate_obj, suffix = '.o', src_suffix = '.for')
    247262# create a library builder so we can control how it is done on windows
    248263def generate_lib(source, target, env, for_signature):
  • trunk/scanCCD.py

    r1378 r2863  
    7878        self.Image = []
    7979        self.Hxyw = []
    80         self.data = {'color':'Paired','range':[[0,1000],[0,1000]]}
     80        self.data = {'color':'gist_ncar','range':[[0,1000],[0,1000]]}
    8181
    8282    def ExitMain(self, event):
Note: See TracChangeset for help on using the changeset viewer.