Changeset 4619 for trunk


Ignore:
Timestamp:
Oct 23, 2020 9:53:06 AM (13 months ago)
Author:
vondreele
Message:

Add pink beam check box to image data GUI
When selected, integration will set inst parms to pink beam defaults based on Sector 35 LSS data

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r4573 r4619  
    102102    :returns: the (usually) shortened version of the string
    103103    '''
    104     return re.sub('\s+', ' ', val).strip()
     104    return re.sub('\\s+', ' ', val).strip()
    105105
    106106def FileDlgFixExt(dlg,file):
     
    842842            codes = [0 for i in range(14)]
    843843        else:
    844             names = ['Type','Lam','Zero','Polariz.','U','V','W','X','Y','Z','SH/L','Azimuth']
    845             codes = [0 for i in range(12)]
     844            if data.get('IfPink',False):
     845                names = ['Type','Lam','Zero','Polariz.','U','V','W','X','Y','Z','alpha-0','alpha-1','beta-0','beta-1','Azimuth']
     846                codes = [0 for i in range(15)]
     847            else:
     848                names = ['Type','Lam','Zero','Polariz.','U','V','W','X','Y','Z','SH/L','Azimuth']
     849                codes = [0 for i in range(12)]
    846850    elif 'SASD' in name:
    847851        names = ['Type','Lam','Zero','Azimuth']
     
    895899                parms = ['PXC',wave1,wave2,0.5,0.0,polariz,290.,-40.,30.,6.,-14.,0.0,0.0001,Azms[i]]
    896900            else:
    897                 parms = ['PXC',data['wavelength'],0.0,polariz,1.0,-0.10,0.4,0.30,1.0,0.0,0.0001,Azms[i]]
     901                if data.get('IfPink',False):
     902                    parms = ['PXB',data['wavelength'],0.0,polariz,0.,8000.,-150.,-24.,0.,0.,0.,13.,-1300.,3.,-7.,Azms[i]]   #from Sect 35 LSS
     903                else:
     904                    parms = ['PXC',data['wavelength'],0.0,polariz,1.0,-0.10,0.4,0.30,1.0,0.0,0.0001,Azms[i]]
    898905        elif 'SASD' in Aname:
    899906            Sample['Trans'] = data['SampleAbs'][0]
     
    18131820            their standard uncertainty (or a negative value)
    18141821          * td is contains a list with either one or six pairs of numbers:
    1815             if one number it is U\ :sub:`iso` and with six numbers it is
    1816             U\ :sub:`11`, U\ :sub:`22`, U\ :sub:`33`, U\ :sub:`12`, U\ :sub:`13` & U\ :sub:`23`
     1822            if one number it is U\\ :sub:`iso` and with six numbers it is
     1823            U\\ :sub:`11`, U\\ :sub:`22`, U\\ :sub:`33`, U\\ :sub:`12`, U\\ :sub:`13` & U\\ :sub:`23`
    18171824            paired with their standard uncertainty (or a negative value)
    18181825        """
  • trunk/GSASIIimgGUI.py

    r4594 r4619  
    11641164        def OnApplyPola(event):
    11651165            data['PolaVal'][1] = not data['PolaVal'][1]
     1166           
     1167        def OnIfPink(event):
     1168            data['IfPink'] = not data['IfPink']
    11661169               
    11671170        dataSizer = wx.FlexGridSizer(0,2,5,3)
    1168         dataSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' Integration coefficients'),0,WACV)   
     1171        dataSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Integration coefficients'),0,WACV)   
    11691172        dataSizer.Add((5,0),0)
    11701173        if 'PWDR' in data['type']:
     
    11721175        elif 'SASD' in data['type']:
    11731176            binChoice = ['2-theta','Q','log(q)']
    1174         dataSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' Bin style: Constant step bins in'),0,WACV)           
    1175         binSel = wx.ComboBox(parent=G2frame.dataWindow,value=data['binType'],choices=binChoice,
     1177        dataSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Bin style: Constant step bins in'),0,WACV)
     1178        littleSizer = wx.BoxSizer(wx.HORIZONTAL)                   
     1179        binSel = wx.ComboBox(G2frame.dataWindow,value=data['binType'],choices=binChoice,
    11761180            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    11771181        binSel.Bind(wx.EVT_COMBOBOX, OnNewBinType)
    1178         dataSizer.Add(binSel,0,WACV)
     1182        littleSizer.Add(binSel,0,WACV)
     1183        pinkSel = wx.CheckBox(G2frame.dataWindow,label=' Pink beam source?')
     1184        pinkSel.SetValue(data['IfPink'])
     1185        pinkSel.Bind(wx.EVT_CHECKBOX,OnIfPink)
     1186        littleSizer.Add(pinkSel,0,WACV)
     1187        dataSizer.Add(littleSizer)
    11791188        binType = '2-theta'
    11801189        if 'q' in data['binType'].lower():
     
    14801489    if 'PolaVal' not in data:
    14811490        data['PolaVal'] = [0.99,False]
     1491    if 'IfPink' not in data:
     1492        data['IfPink'] = False
    14821493    #end fix
    14831494   
Note: See TracChangeset for help on using the changeset viewer.