Changeset 4898 for trunk


Ignore:
Timestamp:
Apr 28, 2021 12:34:26 PM (5 months ago)
Author:
toby
Message:

NIST requests to pretty up FPA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIfpaGUI.py

    r4894 r4898  
    110110    '''Set the parameters to the two-line Cu K alpha 1+2 spectrum
    111111    '''
    112     parmDict['wave'] = {i:v for i,v in enumerate((1.540596,1.544493))}
     112    parmDict['wave'] = {i:v for i,v in enumerate((1.5405925, 1.5443873))}
    113113    parmDict['int'] = {i:v for i,v in enumerate((0.653817, 0.346183))}
    114114    parmDict['lwidth'] = {i:v for i,v in enumerate((0.501844,0.626579))}
    115115
    116 def SetCu5Wave():
    117     '''Set the parameters to the five-line (4 for incident beam mono)
     116def SetCu6wave():
     117    '''Set the parameters to the NIST six-line (4 for incident beam mono)
    118118    Cu K alpha spectrum
    119119    '''
    120120    # values from Marcus Mendenhall from atan_windowed_FP_profile.py
    121     parmDict['wave'] = {i:v for i,v in enumerate((1.53471, 1.5405925, 1.5410769, 1.5443873, 1.5446782))}
    122     parmDict['int'] = {i:v for i,v in enumerate([0.0043303 , 0.58384351, 0.07077796, 0.2284605 , 0.11258773])}
    123     parmDict['lwidth'] = {i:v for i,v in enumerate((2.93 , 0.436, 0.558, 0.487, 0.63))}
     121    parmDict['wave'] = {i:v for i,v in enumerate((1.5405925, 1.5443873, 1.5446782, 1.5410769, 1.53471, 1.53382, ))}
     122    parmDict['int'] = {i:v for i,v in enumerate((0.58384351, 0.2284605 , 0.11258773, 0.07077796, 0.0043303, 0.00208613, ))}
     123    parmDict['lwidth'] = {i:v for i,v in enumerate((0.436, 0.487, 0.63, 0.558, 2.93, 2.93,))}
    124124
    125125def SetMonoWave():
    126     '''Eliminates the short-wavelength line from the five-line Cu K
    127     alpha spectrum when incident beam mono; resets it to 5 if no mono
     126    '''Eliminates the short-wavelength line from the six-line Cu K
     127    alpha spectrum when incident beam mono; resets it to 6 if no mono
    128128    '''
    129     if IBmono and len(parmDict['wave']) == 5:
     129    if IBmono and len(parmDict['wave']) == 6:
    130130        for key in 'wave','int','lwidth':
    131             if 0 in parmDict[key]: del parmDict[key][0]
     131            if 5 in parmDict[key]: del parmDict[key][5]
     132            if 4 in parmDict[key]: del parmDict[key][4]
    132133    if (not IBmono) and len(parmDict['wave']) == 4:
    133         SetCu5Wave()
     134        SetCu6wave()
    134135
    135136def writeNIST(filename):
     
    150151       
    151152#SetCu2Wave() # use these as default
    152 SetCu5Wave() # use these as default
     153SetCu6wave() # use these as default
    153154SetMonoWave()
    154155
     
    227228                del parmDict[key][lastkey]
    228229        wx.CallAfter(MakeTopasFPASizer,G2frame,FPdlg,SetButtonStatus)
    229     def _onSetCu5Wave(event):
    230         SetCu5Wave()
     230    def _onSetCu6wave(event):
     231        SetCu6wave()
    231232        SetMonoWave()
    232233        wx.CallAfter(MakeTopasFPASizer,G2frame,FPdlg,SetButtonStatus)
     
    321322    btnsizer.Add(btn)
    322323    btn.Bind(wx.EVT_BUTTON,_onSetCu2Wave)
    323     btn = wx.Button(FPdlg, wx.ID_ANY,'CuKa-5wave')
     324    btn = wx.Button(FPdlg, wx.ID_ANY,'NIST CuKa')
    324325    btnsizer.Add(btn)
    325     btn.Bind(wx.EVT_BUTTON,_onSetCu5Wave)
     326    btn.Bind(wx.EVT_BUTTON,_onSetCu6wave)
    326327    MainSizer.Add(btnsizer, 0, wx.ALIGN_CENTER, 0)
    327328    MainSizer.Add((-1,5))
     
    393394    px,py = prmSizer.GetSize()
    394395    dx,dy = FPdlg.GetSize()
     396    FPdlg.SetMinSize((-1,-1))
     397    FPdlg.SetMaxSize((-1,-1))
    395398    FPdlg.SetMinSize((dx,dy+200)) # leave a min of 200 points for scroll panel
    396399    FPdlg.SetMaxSize((max(dx,700),850))
Note: See TracChangeset for help on using the changeset viewer.