Changeset 5272


Ignore:
Timestamp:
May 6, 2022 2:02:14 PM (5 months ago)
Author:
toby
Message:

fix Pawley guidance & some html bookmarks

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r5271 r5272  
    397397 * We know of problems with Python <2.7 and <3.6.
    398398 * A problem has been noted with wx4.0.7.post2 with Python 3.10 that we can't yet duplicate (2/4/22).
     399 * We anticipate that Python 3.10 will flag code that previously worked fine
     400    with errors where we pass a floating point number to a wxpython routine that
     401    expects a int value.
    399402
    400403* wxPython:
     
    446449    if compareVersions(platform.python_version(),
    447450                        versionDict['tooNewWarn']['python']) >= 0:
    448         print (22*' '+"-- This version of Python is too new for testing")
    449     Image = None
     451        print (22*' '+"-- We are anticipating significant problems with this new version of Python. Please report them.")
    450452    version = '?'
    451453    versionDict['errors'] = ''
     
    478480                    break
    479481        print("  {:12s}{}  {}".format(s+':',m.__version__,msg))
     482    Image = None
    480483    try:
    481484        from PIL import Image
  • trunk/GSASIIphsGUI.py

    r5269 r5272  
    36083608            G2frame.GetStatusBar().SetStatusText('Warning: The location of the origin is arbitrary in '+SGData['SGPolax'],1)
    36093609        if 'phoenix' in wx.version():
     3610            Atoms.Unbind(wg.EVT_GRID_CELL_CHANGED)
    36103611            Atoms.Bind(wg.EVT_GRID_CELL_CHANGED, ChangeAtomCell)
    36113612        else:
     3613            Atoms.Unbind(wg.EVT_GRID_CELL_CHANGE)
    36123614            Atoms.Bind(wg.EVT_GRID_CELL_CHANGE, ChangeAtomCell)
     3615        Atoms.Unbind(wg.EVT_GRID_CELL_LEFT_DCLICK)
     3616        Atoms.Unbind(wg.EVT_GRID_LABEL_LEFT_DCLICK)
     3617        Atoms.Unbind(wg.EVT_GRID_LABEL_LEFT_CLICK)
     3618        Atoms.Unbind(wg.EVT_GRID_LABEL_RIGHT_CLICK)
    36133619        Atoms.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, AtomTypeSelect)
    36143620        Atoms.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, RefreshAtomGrid)
     
    89698975        drawAtoms.SetColSize(colLabels.index('Color'),50)
    89708976        if 'phoenix' in wx.version():
     8977            drawAtoms.Unbind(wg.EVT_GRID_CELL_CHANGED)
    89718978            drawAtoms.Bind(wg.EVT_GRID_CELL_CHANGED, RefreshDrawAtomGrid)
    89728979        else:
     8980            drawAtoms.Unbind(wg.EVT_GRID_CELL_CHANGE)
    89738981            drawAtoms.Bind(wg.EVT_GRID_CELL_CHANGE, RefreshDrawAtomGrid)
     8982        drawAtoms.Unbind(wg.EVT_GRID_LABEL_LEFT_DCLICK)
     8983        drawAtoms.Unbind(wg.EVT_GRID_CELL_LEFT_DCLICK)
     8984        drawAtoms.Unbind(wg.EVT_GRID_LABEL_LEFT_CLICK)
    89748985        drawAtoms.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, RefreshDrawAtomGrid)
    89758986        drawAtoms.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, RefreshDrawAtomGrid)
     
    1330213313        # FillPawleyReflectionsGrid executable starts here
    1330313314        G2frame.GetStatusBar().SetStatusText('To delete a Pawley reflection: select row & press Delete',1)                       
    13304         # oldSizer = PawleyRefList.GetSizer()
    13305         # if oldSizer: oldSizer.Clear(True)
     13315        if G2frame.PawleyRefl in G2frame.phaseDisplay.gridList:
     13316            G2frame.phaseDisplay.gridList.remove(G2frame.PawleyRefl)
     13317        oldSizer = PawleyRefList.GetSizer()
     13318        if oldSizer: oldSizer.Clear(True)
    1330613319        generalData = data['General']
    1330713320        PawleyPeaks = data['Pawley ref']
    13308         # removed because it interfered with normal ops. & crashed GSAS-II
    13309         # if len(PawleyPeaks) == 0 or not generalData['doPawley']:
    13310         #     msg = ('Pawley refinement not yet set up. Use the "Pawley setup"'+
    13311         #             ' and "Pawley create" menu commands to change this. '+
    13312         #             '(Note settings also found on General tab).')
    13313         #     if not generalData['doPawley']:
    13314         #         msg += '\n\nCall Pawley setup?'
    13315         #     else:
    13316         #         msg += '\n\nCall Pawley create?'
    13317         #     dlg = wx.MessageDialog(G2frame,msg,'Pawley not setup',
    13318         #                            wx.YES_NO | wx.ICON_QUESTION)
    13319         #     try:
    13320         #         dlg.CenterOnParent()
    13321         #         result = dlg.ShowModal()
    13322         #         if result == wx.ID_YES and not generalData['doPawley']:
    13323         #             wx.CallAfter(OnPawleySet,None)
    13324         #         elif result == wx.ID_YES:
    13325         #             wx.CallAfter(OnPawleyLoad,None)
    13326         #     finally:
    13327         #         dlg.Destroy()
     13321
    1332813322        mainSizer = wx.BoxSizer(wx.VERTICAL)
    1332913323        topSizer = wx.BoxSizer(wx.HORIZONTAL)
    13330         topSizer.Add(wx.StaticText(PawleyRefList,label='Pawley reflections for %s:'%generalData['Name']),0,WACV)
     13324        if len(PawleyPeaks) and generalData['doPawley']:           
     13325            topSizer.Add(wx.StaticText(PawleyRefList,label='Pawley reflections for %s:'%generalData['Name']),0,WACV)
     13326        else:
     13327            topSizer.Add(wx.StaticText(PawleyRefList,label='There are no Pawley reflections for %s:'%generalData['Name']),0,WACV)
    1333113328        topSizer.Add((-1,-1),1,wx.EXPAND)
    1333213329        topSizer.Add(G2G.HelpButton(PawleyRefList,helpIndex=G2frame.dataWindow.helpKey))
    1333313330        mainSizer.Add(topSizer,0,wx.EXPAND)
    1333413331        rowLabels = []
    13335         if len(PawleyPeaks):           
     13332        if len(PawleyPeaks) and generalData['doPawley']:
    1333613333            for i in range(len(PawleyPeaks)): rowLabels.append(str(i))
    1333713334            if generalData['Modulated']:
     
    1334613343                pos = [5,6]
    1334713344            PawleyTable = G2G.Table(PawleyPeaks,rowLabels=rowLabels,colLabels=colLabels,types=Types)
     13345            G2frame.PawleyRefl = G2G.GSGrid(PawleyRefList)
    1334813346            G2frame.PawleyRefl.SetTable(PawleyTable, True)
    13349             G2frame.PawleyRefl.Bind(wx.EVT_KEY_DOWN, KeyEditPawleyGrid)                 
     13347            G2frame.PawleyRefl.Unbind(wx.EVT_KEY_DOWN)
     13348            G2frame.PawleyRefl.Bind(wx.EVT_KEY_DOWN, KeyEditPawleyGrid)
     13349            G2frame.PawleyRefl.Unbind(wg.EVT_GRID_LABEL_LEFT_DCLICK)
    1335013350            G2frame.PawleyRefl.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, onRefineDClick)
    1335113351            for r in range(G2frame.PawleyRefl.GetNumberRows()):
     
    1335913359            mainSizer.Add(G2frame.PawleyRefl)
    1336013360        else:
    13361             mainSizer.Add(wx.StaticText(PawleyRefList,label=' There are no Pawley reflections'))
     13361            msg = ('\tPawley refinement has not yet been set up. Use the Operations->"Pawley setup"'+
     13362                       ' menu command to change this.\n\t'+
     13363                       '(If Pawley settings have already been set on the General tab, use Operations->"Pawley create").')
     13364            mainSizer.Add(wx.StaticText(PawleyRefList,label=msg))
    1336213365        SetPhaseWindow(PawleyRefList,mainSizer)
    1336313366                   
     
    1337013373            pawlNegWt.Enable(generalData['doPawley'])
    1337113374        generalData = data['General']
    13372         startPawley = generalData['doPawley']
     13375        prevPawleySetting = generalData['doPawley']
     13376        generalData['doPawley'] = True  # make Pawley extraction the default if we get here
    1337313377        startDmin = generalData['Pawley dmin']
    1337413378        genDlg = wx.Dialog(G2frame,title='Set Pawley Parameters',
     
    1342513429        res = genDlg.ShowModal()
    1342613430        genDlg.Destroy()
    13427 
    13428         if generalData['doPawley'] and res == wx.ID_OK and (not startPawley or startDmin != generalData['Pawley dmin']):
    13429             dlg = wx.MessageDialog(G2frame,'Do you want to initialize the Pawley reflections with the settings?','Initialize Pawley?',
     13431        if res == wx.ID_NO: return
     13432
     13433        # ask to generate the reflections if the extraction setting or dmin has changed
     13434        if generalData['doPawley'] and res == wx.ID_OK and (
     13435                not prevPawleySetting or startDmin != generalData['Pawley dmin']):
     13436            dlg = wx.MessageDialog(G2frame,'Do you want to generate the Pawley reflections with these settings? ("Pawley create" command)','Initialize Pawley?',
    1343013437                wx.YES_NO | wx.ICON_QUESTION)
    1343113438            try:
     
    1367813685            G2frame.MapPeaksTable = G2G.Table(mapPeaks,rowLabels=rowLabels,colLabels=colLabels,types=Types)
    1367913686            MapPeaks.SetTable(G2frame.MapPeaksTable, True)
     13687            MapPeaks.Unbind(wg.EVT_GRID_LABEL_LEFT_CLICK)
    1368013688            MapPeaks.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK, RowSelect)
    1368113689            for r in range(MapPeaks.GetNumberRows()):
     
    1453614544    Pages.append('Texture')
    1453714545    PawleyRefList = wx.ScrolledWindow(G2frame.phaseDisplay)
    14538     G2frame.PawleyRefl = G2G.GSGrid(PawleyRefList)
     14546    G2frame.PawleyRefl = None  # grid now created when needed
     14547#    G2frame.PawleyRefl = G2G.GSGrid(PawleyRefList) 
    1453914548#    G2frame.PawleyRefl.SetScrollRate(0,0)
    14540     G2frame.phaseDisplay.gridList.append(G2frame.PawleyRefl)
     14549#    G2frame.phaseDisplay.gridList.append(G2frame.PawleyRefl)
    1454114550    G2frame.phaseDisplay.AddPage(PawleyRefList,'Pawley reflections')
    1454214551    Pages.append('Pawley reflections')
  • trunk/help/gsasII-phase.html

    r5262 r5272  
    56465646this way. <o:p></o:p></span></p>
    56475647
    5648 <h4 style='margin-left:.25in'><a name=Texture></a><a name="_Ref74983049"></a><a
     5648<h4 style='margin-left:.25in'><a name=Phase-Texture></a><a name="_Ref74983049"></a><a
    56495649name=Phase-Texture></a>Texture</h4>
    56505650
     
    69786978
    69796979<p class=MsoNormal style='margin-left:.5in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
    6980 name="_Pawley_reflections"></a><o:p>&nbsp;</o:p></p>
     6980name="Phase-Pawley_reflections"></a><o:p>&nbsp;</o:p></p>
    69816981
    69826982<h4>Pawley reflections</h4>
     
    74837483</span></div>
    74847484
    7485 <p class=MsoNormal><span style='mso-fareast-font-family:"Times New Roman"'><!-- hhmts start -->Last
    7486 modified: Thu Mar 24 16:28:36 CDT 2022 <!-- hhmts end --><o:p></o:p></span></p>
     7485<p class=MsoNormal><span style='mso-fareast-font-family:"Times New Roman"'><!-- hhmts start -->Last modified: Fri May  6 13:29:00 CDT 2022 <!-- hhmts end --><o:p></o:p></span></p>
    74877486
    74887487</div>
  • trunk/help/gsasII-pwdr.html

    r5262 r5272  
    48254825style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></u></h4>
    48264826
    4827 <p class=MsoNormal><a name=Background></a><span style='mso-fareast-font-family:
     4827<p class=MsoNormal><a name=PWDR_Background></a><span style='mso-fareast-font-family:
    48284828"Times New Roman"'>This window shows the choice of background functions and
    48294829coefficients to be used in fitting this powder pattern. There are four types of
     
    60416041
    60426042<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
    6043 style='mso-fareast-font-family:"Times New Roman"'><!-- hhmts start -->Last
    6044 modified: Wed Mar 23 12:18:41 CDT 2022 <!-- hhmts end --><o:p></o:p></span></p>
     6043style='mso-fareast-font-family:"Times New Roman"'><!-- hhmts start -->Last modified: Fri May  6 13:32:49 CDT 2022 <!-- hhmts end --><o:p></o:p></span></p>
    60456044
    60466045</div>
Note: See TracChangeset for help on using the changeset viewer.