Changeset 5025 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Sep 14, 2021 11:55:59 AM (3 months ago)
Author:
vondreele
Message:

Add shell plots to 3D reflection plots.
Fix escape character issues in CopyRietveld2Origin
Revise LeBail? operation - now works in sequential refinements. Remove "Fit LeBail?" from Calculate menu.
OnLeBail? does 10 cycles instead of 3 in the "zero cycle" step.
Initial FOSQ set to Scale*Phase fr. instead of 1.0 - improves initial LeBaill? fit.
Put newLeBail flag in Controls - as more global.
Allow LeBail? refinements in sequential refinements.
Remove a wx.Yield() - obsolete
Disable deletion of selected parameters in a LeBail? refinement & let the LS handle any singularities that may ensue
Derivatives no longer controlled by LeBail? flag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r5023 r5025  
    15391539        elif key in 'Z':
    15401540            Data['Zone'] = not Data['Zone']
     1541            if Data['Zone']:
     1542                Data['Shell'] = [.0,False]
    15411543        elif key in 'B':
    15421544            ifBox = not ifBox
     1545        elif key in 'R':
     1546            Data['Shell'][1] = not Data['Shell'][1]
    15431547        elif key in ['+','=']:
    1544             Data['Scale'] *= 1.25
     1548            if Data['Shell'][1]:
     1549                Data['Shell'][0] += 0.1
     1550            else:
     1551                Data['Scale'] *= 1.25
    15451552        elif key == '-':
    1546             Data['Scale'] /= 1.25
     1553            if Data['Shell'][1]:
     1554                Data['Shell'][0] = max(Data['Shell'][0]-0.1,0.0)
     1555            else:
     1556                Data['Scale'] /= 1.25
    15471557        elif key == 'P':
    15481558            vec = viewChoice[Data['viewKey']][0]
     
    15541564            drawingData['viewPoint'][0] = np.array([0,0,0])
    15551565            Data['Scale'] = 1.0
     1566            Data['Shell'][0] = 0.0
    15561567        elif key == 'I':
    15571568            Data['Iscale'] = not Data['Iscale']
     
    15741585    if Super:
    15751586        SuperVec = np.array(Data['SuperVec'][0])
     1587    if 'Shell' not in Data:
     1588        Data['Shell'] = [0.0,False]
    15761589    Amat,Bmat = G2lat.cell2AB(cell)         #Amat - crystal to cartesian, Bmat - inverse
    15771590    Gmat,gmat = G2lat.cell2Gmat(cell)
     
    15981611        HKL = []
    15991612        for i,refl in enumerate(hklRef):
     1613            if Data['Shell'][1]:
     1614                if not (Data['Shell'][0] <= 0.5/refl[4+Super] <= Data['Shell'][0]+.1):
     1615                    continue
    16001616            H = refl[:3]
    16011617            if 'HKLF' in Name:
     
    18691885        if Data['Zone']:
    18701886            G2frame.G2plotNB.status.SetStatusText   \
    1871                 ('Plot type = %s for %s; RF = %6.2f%%, RF%s = %6.2f%% layer %s'%    \
    1872                 (Data['Type'],Name,RF,super2,RF2,str(list(drawingData['viewPoint'][0]))),1)           
     1887                ('Plot type = %s for %s; N = %d, RF = %6.2f%%, RF%s = %6.2f%% layer %s'%    \
     1888                (Data['Type'],Name,len(HKL),RF,super2,RF2,str(list(drawingData['viewPoint'][0]))),1)
     1889        elif Data['Shell'][1]:
     1890            G2frame.G2plotNB.status.SetStatusText   \
     1891                ('Plot type = %s for %s; N = %d, RF = %6.2f%%, RF%s = %6.2f%% shell %.1f'%    \
     1892                (Data['Type'],Name,len(HKL),RF,super2,RF2,Data['Shell'][0]),1)
    18731893        else:
    18741894            G2frame.G2plotNB.status.SetStatusText   \
    1875                 ('Plot type = %s for %s; RF = %6.2f%%, RF%s = %6.2f%%'%(Data['Type'],Name,RF,super2,RF2),1)
     1895                ('Plot type = %s for %s; N = %d, RF = %6.2f%%, RF%s = %6.2f%%'%     \
     1896                (Data['Type'],Name,len(HKL),RF,super2,RF2),1)
    18761897       
    18771898        SetBackground()
     
    19121933    Font = Page.GetFont()
    19131934    Page.Choice = None
    1914     choice = [' save as/key:','jpeg','tiff','bmp','h: view down h','k: view down k','l: view down l',
     1935    choice = [' save as/key:','jpeg','tiff','bmp','h: view down h','k: view down k','l: view down l','r: plot radial shell',
    19151936    'z: zero zone toggle','p: increment layer','m: decrement layer','c: reset to default','o: set view point = 0,0,0','b: toggle box ','+: increase scale','-: decrease scale',
    19161937    'f: Fobs','s: Fobs**2','u: unit','d: Fo-Fc','w: DF/sig','i: toggle intensity scaling']
     
    43524373            plot.symbol_kind = 10
    43534374            plot.color = 4 + j
    4354             refLegendText = refLegendText + "\l(" + str(4 + k) + ") " + lblList[i] + " "
     4375            refLegendText = refLegendText + "\\l(" + str(4 + k) + ") " + lblList[i] + " "
    43554376            # Increment phase counter
    43564377            k += 1
     
    43804401        # Set up legend
    43814402        label = gl.label('Legend')
    4382         label.text = '\l(1) %(1)\l(2) %(2)\l(3) %(3)\l(4) %(4) %(CRLF)' + refLegendText
     4403        label.text = '\\l(1) %(1)\\l(2) %(2)\\l(3) %(3\\l(4) %(4) %(CRLF)' + refLegendText
    43834404
    43844405    def CopyRietveld2Igor(Pattern,Plot,Page,plotOpt,filename,G2frame):
Note: See TracChangeset for help on using the changeset viewer.