Changeset 2696


Ignore:
Timestamp:
Feb 9, 2017 9:03:55 AM (5 years ago)
Author:
vondreele
Message:

use F d 3 m for Si space group in ImageCalibrants? - should eliminate forbidden lines
add new menu item in Image Controls/Parms? to do reset of dist to set dist

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2695 r2696  
    9595[ wxID_IMCALIBRATE,wxID_IMRECALIBRATE,wxID_IMINTEGRATE, wxID_IMCLEARCALIB,wxID_IMRECALIBALL, 
    9696    wxID_IMCOPYCONTROLS, wxID_INTEGRATEALL, wxID_IMSAVECONTROLS, wxID_IMLOADCONTROLS, wxID_IMAUTOINTEG,
    97     wxID_IMCOPYSELECTED, wxID_SAVESELECTEDCONTROLS, wxID_IMXFERCONTROLS,
    98 ] = [wx.NewId() for item in range(13)]
     97    wxID_IMCOPYSELECTED, wxID_SAVESELECTEDCONTROLS, wxID_IMXFERCONTROLS,wxID_IMRESETDIST,
     98] = [wx.NewId() for item in range(14)]
    9999
    100100[ wxID_MASKCOPY, wxID_MASKSAVE, wxID_MASKLOAD, wxID_NEWMASKSPOT,wxID_NEWMASKARC,wxID_NEWMASKRING,
     
    21072107        ImageParams.Append(help='Transfer integration range for other detector distances',
    21082108            id=wxID_IMXFERCONTROLS, kind=wx.ITEM_NORMAL,text='Xfer angles')
     2109        ImageParams.Append(help='Reset all detector dist to set dist',
     2110            id=wxID_IMRESETDIST, kind=wx.ITEM_NORMAL,text='Reset dist')
    21092111       
    21102112        self.PostfillDataMenu()
  • trunk/GSASIIimgGUI.py

    r2695 r2696  
    343343        # sort both lists together, ordered by keyText
    344344        selectedKeys = []
    345         dlg = G2G.G2MultiChoiceDialog(
    346             G2frame.dataFrame,
    347             'Select which image controls\nto copy',
     345        dlg = G2G.G2MultiChoiceDialog(G2frame.dataFrame,'Select which image controls\nto copy',
    348346            'Select image controls', keyText)
    349347        try:
     
    356354        for parm in selectedKeys:
    357355            copyDict[parm] = data[parm]
    358         dlg = G2G.G2MultiChoiceDialog(
    359             G2frame.dataFrame,
    360             'Copy image controls from\n'+Source+' to...',
     356        dlg = G2G.G2MultiChoiceDialog(G2frame.dataFrame,'Copy image controls from\n'+Source+' to...',
    361357            'Copy image controls', Names)
    362358        try:
     
    411407            return
    412408        dlg = G2G.G2MultiChoiceDialog(G2frame, 'Which images to select?',
    413                                       'Select images', imglist, wx.CHOICEDLG_STYLE)
     409            'Select images', imglist, wx.CHOICEDLG_STYLE)
    414410        try:
    415411            if dlg.ShowModal() == wx.ID_OK:
     
    506502                     "label_3":"Xfer scaled 2-theta max", "value_3":True,
    507503                     }
    508         dlg = G2G.G2MultiChoiceDialog(G2frame,'Xfer angles',
    509                                       'Transfer integration range from '+Source+' to:',Names,
    510                                       extraOpts=extraopts)
     504        dlg = G2G.G2MultiChoiceDialog(G2frame,'Xfer angles','Transfer integration range from '+Source+' to:',
     505            Names,extraOpts=extraopts)
    511506        try:
    512507            if dlg.ShowModal() == wx.ID_OK:
     
    547542            dlg.Destroy()
    548543            G2frame.PatternTree.SelectItem(G2frame.PickId)       
     544           
     545    def OnResetDist(event):
     546        dlg = wx.MessageDialog(G2frame,'Are you sure you want to do this?',caption='Reset dist to set dist',style=wx.YES_NO|wx.ICON_EXCLAMATION)
     547        if dlg.ShowModal() != wx.ID_YES:
     548            dlg.Destroy()
     549            return
     550        dlg.Destroy()
     551        Names = G2gd.GetPatternTreeDataNames(G2frame,['IMG ',])
     552        dlg = G2G.G2MultiChoiceDialog(G2frame,'Reset dist','Reset dist to set dist for:',Names)
     553        try:
     554            if dlg.ShowModal() == wx.ID_OK:
     555                items = dlg.GetSelections()
     556                for item in items:
     557                    name = Names[item]
     558                    Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,name)
     559                    Data = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Image Controls'))
     560                    Data['distance'] = Data['setdist']
     561        finally:
     562            dlg.Destroy()
     563        wx.CallAfter(UpdateImageControls,G2frame,data,masks)
    549564           
    550565# Sizers
     
    11151130                dlg = G2G.G2HistoDataDialog(G2frame,' Edit sample goniometer data:',
    11161131                    'Edit data',['Omega','Chi','Phi'],['%.2f','%.2f','%.2f'],Names,Items)
    1117             try:
    1118                 if dlg.ShowModal() == wx.ID_OK:
    1119                     result = dlg.GetData()      #?? what was this for?
    1120                     id, cookie = G2frame.PatternTree.GetFirstChild(G2frame.root)
    1121                     while id:
    1122                         name = G2frame.PatternTree.GetItemText(id)
    1123                         if 'IMG' in name:
    1124                             ctrls = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,id,'Image Controls'))
    1125                             vals = Items[Names.index(name)]
    1126                             ctrls['GonioAngles'] = vals
    1127                         id, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie)
    1128             finally:
    1129                 dlg.Destroy()
    1130                 G2frame.PatternTree.SelectItem(G2frame.PickId)
     1132                try:
     1133                    if dlg.ShowModal() == wx.ID_OK:
     1134                        id, cookie = G2frame.PatternTree.GetFirstChild(G2frame.root)
     1135                        while id:
     1136                            name = G2frame.PatternTree.GetItemText(id)
     1137                            if 'IMG' in name:
     1138                                ctrls = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,id,'Image Controls'))
     1139                                vals = Items[Names.index(name)]
     1140                                ctrls['GonioAngles'] = vals
     1141                            id, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie)
     1142                finally:
     1143                    dlg.Destroy()
     1144                    G2frame.PatternTree.SelectItem(G2frame.PickId)
    11311145       
    11321146        gonioSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    11941208    G2frame.dataFrame.Bind(wx.EVT_MENU, OnLoadControls, id=G2gd.wxID_IMLOADCONTROLS)
    11951209    G2frame.dataFrame.Bind(wx.EVT_MENU, OnTransferAngles, id=G2gd.wxID_IMXFERCONTROLS)
     1210    G2frame.dataFrame.Bind(wx.EVT_MENU, OnResetDist, id=G2gd.wxID_IMRESETDIST)
    11961211    def OnDestroy(event):
    11971212        G2frame.autoIntFrame = None
  • trunk/ImageCalibrants.py

    r2041 r2696  
    4040'LaB6  SRM660a skip 1':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],1,(1.0,10,10)),
    4141'LaB6  SRM660': ([2,],[''],[(4.15695,4.15695,4.15695,90,90,90),],0,(1.0,10,10)),
    42 'Si    SRM640c':([0,],[''],[(5.4311946,5.4311946,5.4311946,90,90,90),],0,(1.,10,10)),
     42'Si    SRM640c':([0,],['F d 3 m'],[(5.4311946,5.4311946,5.4311946,90,90,90),],0,(1.,10,10)),
    4343'CeO2  SRM674b':([0,],[''],[(5.411651,5.411651,5.411651,90,90,90),],0,(1.0,2,1)),
    4444'Al2O3 SRM676a':([3,],['R -3 c'],[(4.759091,4.759091,12.991779,90,90,120),],0,(1.0,5,5)),
Note: See TracChangeset for help on using the changeset viewer.