Changeset 2735


Ignore:
Timestamp:
Mar 2, 2017 12:48:10 PM (6 years ago)
Author:
vondreele
Message:

set default flight path = 20. in case FPATH0 missing from TOF Iparm file.
fix problem editing flight path
modify SetPhaseWindow? to take Size as optional variable & make sizer an optional variable
Use it for all table only phase windows in place of set SizePosLeft? - fixes issues of windows jumping about after Refine.
for initial LeBail? refinement exclude all hap variables (size, mustrain, etc.)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2734 r2735  
    12231223                if 'INS  1DETAZM' in Iparm:
    12241224                    azm = float(Iparm['INS  1DETAZM'])
    1225                 s = Iparm['INS   FPATH1'].split()
    1226                 fltPath0 = G2IO.sfloat(s[0])
     1225                fltPath0 = 20.                      #arbitrary
     1226                if 'INS   FPATH1' in Iparm:                   
     1227                    s = Iparm['INS   FPATH1'].split()
     1228                    fltPath0 = G2IO.sfloat(s[0])
    12271229                if 'INS  1BNKPAR' not in Iparm:     #bank missing from Iparm file
    12281230                    return []
  • trunk/GSASIIphsGUI.py

    r2726 r2735  
    6767atan2d = lambda x,y: 180.*np.arctan2(y,x)/np.pi
    6868
    69 def SetPhaseWindow(mainFrame,phasePage,mainSizer,Scroll=0):
    70     phasePage.SetSizer(mainSizer)
    71     Size = mainSizer.GetMinSize()
     69def SetPhaseWindow(mainFrame,phasePage,mainSizer=None,Size=None,Scroll=0):
     70    if not mainSizer is None:
     71        phasePage.SetSizer(mainSizer)
     72        Size = mainSizer.GetMinSize()
    7273    Size[0] += 40
    7374    Size[1] = min(Size[1]+ 150,500)
     
    17831784                            Atoms.SetCellStyle(row,c,VERY_LIGHT_GREY,True)
    17841785            Atoms.AutoSizeColumns(False)
    1785             G2frame.dataFrame.setSizePosLeft([700,300])
     1786            SetPhaseWindow(G2frame.dataFrame,Atoms,Size=[700,300])
    17861787
    17871788        # FillAtomsGrid executable code starts here
     
    18511852        Atoms.SetMargins(0,0)
    18521853       
    1853 #        G2frame.dataFrame.setSizePosLeft([700,300])
    18541854        Paint()
    18551855
     
    33983398        bottomSizer.Add(StackSizer())
    33993399        mainSizer.Add(bottomSizer)
    3400         SetPhaseWindow(G2frame.dataFrame,G2frame.layerData,mainSizer,Scroll)
     3400        SetPhaseWindow(G2frame.dataFrame,G2frame.layerData,mainSizer,Scroll=Scroll)
    34013401       
    34023402    def OnCopyPhase(event):
     
    38353835        G2frame.bottomSizer = ShowAtomInfo()
    38363836        mainSizer.Add(G2frame.bottomSizer)
    3837         SetPhaseWindow(G2frame.dataFrame,G2frame.waveData,mainSizer,Scroll)
     3837        SetPhaseWindow(G2frame.dataFrame,G2frame.waveData,mainSizer,Scroll=Scroll)
    38383838   
    38393839    def OnWaveVary(event):
     
    42054205           if colLabels[c] not in ['Style','Label','Color']:
    42064206                drawAtoms.SetColAttr(c,attr)
    4207         G2frame.dataFrame.setSizePosLeft([600,300])
     4207        SetPhaseWindow(G2frame.dataFrame,drawAtoms,Size=[600,300])
    42084208
    42094209        FindBondsDraw(data)
     
    72377237            G2frame.PawleyRefl.SetMargins(0,0)
    72387238            G2frame.PawleyRefl.AutoSizeColumns(False)
    7239             G2frame.dataFrame.setSizePosLeft([450,300])
     7239            SetPhaseWindow(G2frame.dataFrame,G2frame.PawleyRefl,Size=[450,300])
    72407240                   
    72417241    def OnPawleySet(event):
     
    75227522            G2plt.PlotStructure(G2frame,data)                   
    75237523           
    7524         G2frame.dataFrame.setSizePosLeft([500,300])
    75257524        G2frame.dataFrame.SetStatusText('')
    75267525        if 'Map Peaks' in data:
     
    75397538            MapPeaks.SetMargins(0,0)
    75407539            MapPeaks.AutoSizeColumns(False)
     7540            SetPhaseWindow(G2frame.dataFrame,MapPeaks,Size=[440,300])
    75417541                   
    75427542    def OnPeaksMove(event):
  • trunk/GSASIIpwdGUI.py

    r2730 r2735  
    13661366    Draw()
    13671367   
    1368    
    1369    
    13701368################################################################################
    13711369#####  Instrument parameters
     
    18201818                subSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,txt.strip()),0,WACV)
    18211819                labelLst.append('flight path')
    1822                 elemKeysLst.append(['fltpath',1])
     1820                elemKeysLst.append(['fltPath',1])
    18231821                dspLst.append([10,2])
    18241822                refFlgElem.append(None)                   
  • trunk/GSASIIstrIO.py

    r2732 r2735  
    22562256                    hapDict[pfx+name] = hapData['HStrain'][0][i]
    22572257                    HSvals.append(hapDict[pfx+name])
    2258                     if hapData['HStrain'][1][i]:
     2258                    if hapData['HStrain'][1][i] and not hapDict[pfx+'newLeBail']:
    22592259                        hapVary.append(pfx+name)
    22602260                    controlDict[pfx+'poType'] = hapData['Pref.Ori.'][0]
     
    22832283                    controlDict[pfx+item+'Type'] = hapData[item][0]
    22842284                    hapDict[pfx+item+';mx'] = hapData[item][1][2]
    2285                     if hapData[item][2][2]:
     2285                    if hapData[item][2][2] and not hapDict[pfx+'newLeBail']:
    22862286                        hapVary.append(pfx+item+';mx')
    22872287                    if hapData[item][0] in ['isotropic','uniaxial']:
    22882288                        hapDict[pfx+item+';i'] = hapData[item][1][0]
    2289                         if hapData[item][2][0]:
     2289                        if hapData[item][2][0] and not hapDict[pfx+'newLeBail']:
    22902290                            hapVary.append(pfx+item+';i')
    22912291                        if hapData[item][0] == 'uniaxial':
    22922292                            controlDict[pfx+item+'Axis'] = hapData[item][3]
    22932293                            hapDict[pfx+item+';a'] = hapData[item][1][1]
    2294                             if hapData[item][2][1]:
     2294                            if hapData[item][2][1] and not hapDict[pfx+'newLeBail']:
    22952295                                hapVary.append(pfx+item+';a')
    22962296                    else:       #generalized for mustrain or ellipsoidal for size
     
    23062306                            sfx = ';'+str(i)
    23072307                            hapDict[pfx+item+sfx] = hapData[item][4][i]
    2308                             if hapData[item][5][i]:
     2308                            if hapData[item][5][i] and not hapDict[pfx+'newLeBail']:
    23092309                                hapVary.append(pfx+item+sfx)
    23102310                if Phases[phase]['General']['Type'] != 'magnetic':
Note: See TracChangeset for help on using the changeset viewer.