Changeset 4553 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Aug 21, 2020 10:17:41 AM (16 months ago)
Author:
vondreele
Message:

reimplement new PeaksUnique? code & make more general. Now finds unique peaks closest to x=0, y=0, z=0, origin or center.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4551 r4553  
    1196711967            Ind = getAtomSelections(MapPeaks)
    1196811968            if Ind:
     11969                choice = ['x=0','y=0','z=0','origin','center']
     11970                dlg = wx.SingleChoiceDialog(G2frame,'Peaks closest to:','Select',choice)
     11971                if dlg.ShowModal() == wx.ID_OK:
     11972                    sel = dlg.GetSelection()+1
     11973                    dlg.Destroy()
     11974                else:
     11975                    dlg.Destroy()
     11976                    return
    1196911977                wx.BeginBusyCursor()
    1197011978                try:
    11971                     Ind = G2mth.PeaksUnique(data,Ind)
     11979                    Ind = G2mth.PeaksUnique(data,Ind,sel)
    1197211980                    print (' No. unique peaks: %d Unique peak fraction: %.3f'%(len(Ind),float(len(Ind))/len(mapPeaks)))
    1197311981                    tbl = MapPeaks.GetTable().data
Note: See TracChangeset for help on using the changeset viewer.