Changeset 2788


Ignore:
Timestamp:
Apr 17, 2017 2:12:29 PM (5 years ago)
Author:
vondreele
Message:

make I/Ib floats in ImageCalibrants?.py
fix issue for SASD seq. refinement
fix some issues with SASD image integrations

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2783 r2788  
    26882688        else:
    26892689            if self.ExpandingAll:
    2690                 #if GSASIIpath.GetConfigValue('debug'): print('Skipping Tree selection due to ExpandAll')
     2690                if GSASIIpath.GetConfigValue('debug'): print('Skipping Tree selection due to ExpandAll')
    26912691                return
    26922692            pltNum = self.G2plotNB.nb.GetSelection()
  • trunk/GSASIIimage.py

    r2773 r2788  
    885885    if '2-theta' in data.get('binType','2-theta'):
    886886        lutth = LUtth               
    887     elif 'Q' == data['binType']:
    888         lutth = 4.*np.pi*npsind(LUtth/2.)/data['wavelength']
    889887    elif 'log(q)' in data['binType']:
    890888        lutth = np.log(4.*np.pi*npsind(LUtth/2.)/data['wavelength'])
     889    elif 'q' == data['binType'].lower():
     890        lutth = 4.*np.pi*npsind(LUtth/2.)/data['wavelength']
    891891    dtth = (lutth[1]-lutth[0])/numChans
    892892    muT = data.get('SampleAbs',[0.0,''])[0]
     
    925925            if 'log(q)' in data.get('binType',''):
    926926                tay = np.log(4.*np.pi*npsind(tay/2.)/data['wavelength'])
    927             elif 'Q' == data.get('binType',''):
     927            elif 'q' == data.get('binType','').lower():
    928928                tay = 4.*np.pi*npsind(tay/2.)/data['wavelength']
    929929            t0 = time.time()
     
    941941    if 'log(q)' in data.get('binType',''):
    942942        H2 = 2.*npasind(np.exp(H2)*data['wavelength']/(4.*np.pi))
    943     elif 'Q' == data.get('binType',''):
     943    elif 'q' == data.get('binType','').lower():
    944944        H2 = 2.*npasind(H2*data['wavelength']/(4.*np.pi))
    945945    if Dazm:       
  • trunk/GSASIIimgGUI.py

    r2782 r2788  
    811811            if Ltth > Utth:
    812812                Ltth,Utth = Utth,Ltth
    813             if 'Q' in data['binType']:
     813            if 'q' in data['binType'].lower():
    814814                data['IOtth'] = [2.*asind(Ltth*wave/(4.*math.pi)),2.*asind(Utth*wave/(4.*math.pi))]
    815815            else:
     
    895895        dataSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Inner/Outer '+binType),0,WACV)           
    896896        IOtth = data['IOtth'][:]
    897         if 'Q' in data['binType']:
     897        if 'q' in data['binType'].lower():
    898898            wave = data['wavelength']
    899899            IOtth = [4.*math.pi*sind(IOtth[0]/2.)/wave,4.*math.pi*sind(IOtth[1]/2.)/wave]
     
    10971097        comboSizer = wx.BoxSizer(wx.HORIZONTAL)
    10981098        comboSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Min ring I/Ib '),0,WACV)
    1099         cutOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'cutoff',nDig=(10,1),typeHint=float,min=0.1)
     1099        cutOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'cutoff',nDig=(10,2),min=0.1)
    11001100        comboSizer.Add(cutOff,0,WACV)
    11011101        calibSizer.Add(comboSizer,0)
     
    11851185    colorList = sorted([m for m in mpl.cm.datad.keys() if not m.endswith("_r")],key=lambda s: s.lower())
    11861186    calList = sorted([m for m in calFile.Calibrants.keys()],key=lambda s: s.lower())
    1187     typeList = ['PWDR - powder diffraction data','SASD - small angle scattering data',
    1188         'REFL - reflectometry data']
     1187    typeList = ['PWDR - powder diffraction data','SASD - small angle scattering data',]
    11891188    if not data.get('type'):                        #patch for old project files
    11901189        data['type'] = 'PWDR'
    1191     typeDict = {'PWDR':typeList[0],'SASD':typeList[1],'REFL':typeList[2]}
     1190    typeDict = {'PWDR':typeList[0],'SASD':typeList[1],}
    11921191    if G2frame.dataDisplay:
    11931192        G2frame.dataDisplay.Destroy()
  • trunk/GSASIIpwdGUI.py

    r2786 r2788  
    41724172                SeqResult = {}
    41734173                Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential SASD results')
     4174            SeqResult = {'SeqPseudoVars':{},'SeqParFitEqList':[]}
    41744175            SeqResult['histNames'] = names
    4175             SeqResult = {'SeqPseudoVars':{},'SeqParFitEqList':[]}
    41764176        else:
    41774177            dlg.Destroy()
     
    42044204                if i and CopyForward:
    42054205                    G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Models'),JModel)
    4206                 IProfDict,IProfile = G2frame.PatternTree.GetItemPyData(Id)[:2]
     4206                IProfDict,IProfile = G2frame.PatternTree.GetItemPyData(sId)[:2]
    42074207                IModel = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Models'))
    42084208                ISample = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,sId, 'Sample Parameters'))
  • trunk/ImageCalibrants.py

    r2696 r2788  
    1313as an example::
    1414
    15   'LaB6  SRM660a':([2,],['',][(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10)),
     15  'LaB6  SRM660a':([2,],['',][(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10.)),
    1616
    1717or where "Bravais num" and "(a,b,...)" are repeated in the case of mixtures::
    1818
    19   'LaB6 & CeO2':([2,0],['',''] [(4.1569,4.1569,4.1569,90,90,90),(5.4117,5.4117,5.4117,90,90,90)], 0, (1.0,2,1)),
     19  'LaB6 & CeO2':([2,0],['',''] [(4.1569,4.1569,4.1569,90,90,90),(5.4117,5.4117,5.4117,90,90,90)], 0, (1.0,2,1.)),
    2020
    2121To expand this list with locally needed additions, do not modify this file,
     
    3535"""
    3636Calibrants={
    37 '':([0,],['',],[(0,0,0,0,0,0),],0,(1.0,10,10)),
    38 'LaB6  SRM660b':([2,],[''],[(4.15689,4.15689,4.15689,90,90,90),],0,(1.0,10,10)),
    39 'LaB6  SRM660a':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10)),
    40 'LaB6  SRM660a skip 1':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],1,(1.0,10,10)),
    41 'LaB6  SRM660': ([2,],[''],[(4.15695,4.15695,4.15695,90,90,90),],0,(1.0,10,10)),
    42 'Si    SRM640c':([0,],['F d 3 m'],[(5.4311946,5.4311946,5.4311946,90,90,90),],0,(1.,10,10)),
    43 'CeO2  SRM674b':([0,],[''],[(5.411651,5.411651,5.411651,90,90,90),],0,(1.0,2,1)),
    44 'Al2O3 SRM676a':([3,],['R -3 c'],[(4.759091,4.759091,12.991779,90,90,120),],0,(1.0,5,5)),
    45 'Ni   @ 298K':([0,],[''],[(3.52475,3.52475,3.52475,90,90,90),],0,(1.0,10,10)),
    46 'NaCl @ 298K':([0,],[''],[(5.6402,5.6402,5.6402,90,90,90),],0,(1.0,10,10)),
    47 'NaCl even hkl only':([2,],[''],[(2.8201,2.8201,2.8201,90,90,90),],0,(1.0,10,10)),
    48 'Ag behenate':([6,],[''],[(1.0,1.0,58.380,90,90,90),],0,(7.0,5,1)),
    49 'Spun Si 3600 line/mm grating':([6,],[''],[(1.0,1.0,2777.78,90,90,90),],2,(200.,5,1)),
    50 'Spun Si 7200 line/mm grating':([6,],[''],[(1.0,1.0,1388.89,90,90,90),],1,(200.,5,1)),
    51 'Pt   @ 298K':([0,],[''],[(3.9231,3.9231,3.9231,90,90,90),],0,(1.0,5,1)),
    52 'LaB6 & CeO2':([2,0],['','',],[(4.1569162,4.1569162,4.1569162,90,90,90),(5.411651,5.411651,5.411651,90,90,90)],0,(1.0,2,1)),
     37'':([0,],['',],[(0,0,0,0,0,0),],0,(1.0,10,10.)),
     38'LaB6  SRM660b':([2,],[''],[(4.15689,4.15689,4.15689,90,90,90),],0,(1.0,10,10.)),
     39'LaB6  SRM660a':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10.)),
     40'LaB6  SRM660a skip 1':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],1,(1.0,10,10.)),
     41'LaB6  SRM660': ([2,],[''],[(4.15695,4.15695,4.15695,90,90,90),],0,(1.0,10,10.)),
     42'Si    SRM640c':([0,],['F d 3 m'],[(5.4311946,5.4311946,5.4311946,90,90,90),],0,(1.,10,10.)),
     43'CeO2  SRM674b':([0,],[''],[(5.411651,5.411651,5.411651,90,90,90),],0,(1.0,2,1.)),
     44'Al2O3 SRM676a':([3,],['R -3 c'],[(4.759091,4.759091,12.991779,90,90,120),],0,(1.0,5,5.)),
     45'Ni   @ 298K':([0,],[''],[(3.52475,3.52475,3.52475,90,90,90),],0,(1.0,10,10.)),
     46'NaCl @ 298K':([0,],[''],[(5.6402,5.6402,5.6402,90,90,90),],0,(1.0,10,10.)),
     47'NaCl even hkl only':([2,],[''],[(2.8201,2.8201,2.8201,90,90,90),],0,(1.0,10,10.)),
     48'Ag behenate':([6,],[''],[(1.0,1.0,58.380,90,90,90),],0,(7.0,5,1.)),
     49'Spun Si 3600 line/mm grating':([6,],[''],[(1.0,1.0,2777.78,90,90,90),],2,(200.,5,1.)),
     50'Spun Si 7200 line/mm grating':([6,],[''],[(1.0,1.0,1388.89,90,90,90),],1,(200.,5,1.)),
     51'Pt   @ 298K':([0,],[''],[(3.9231,3.9231,3.9231,90,90,90),],0,(1.0,5,1.)),
     52'LaB6 & CeO2':([2,0],['','',],[(4.1569162,4.1569162,4.1569162,90,90,90),(5.411651,5.411651,5.411651,90,90,90)],0,(1.0,2,1.)),
    5353}
    5454   
Note: See TracChangeset for help on using the changeset viewer.