Changeset 5003
- Timestamp:
- Jul 28, 2021 3:04:06 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r5000 r5003 4517 4517 config = G2G.GetConfigValsDocs() 4518 4518 GSASIIpath.addPrevGPX(self.GSASprojectfile,config) 4519 G2G.SaveConfigVars(config) 4519 4520 return True 4520 4521 else: -
trunk/GSASIIddataGUI.py
r4972 r5003 822 822 G2frame.bottomSizer.DeleteWindows() 823 823 Indx.clear() 824 G2frame.bottomSizer = ShowHistogramInfo()824 G2frame.bottomSizer,LeBailMsg = ShowHistogramInfo() 825 825 mainSizer.Add(G2frame.bottomSizer) 826 826 mainSizer.Layout() … … 829 829 DData.Scroll(0,Scroll) 830 830 G2frame.dataWindow.SendSizeEvent() 831 if LeBailMsg: 832 G2G.G2MessageBox(G2frame,LeBailMsg, 833 title='LeBail refinement changes') 831 834 832 835 def ShowHistogramInfo(): … … 904 907 UseList[G2frame.hist]['Layer Disp'] = [0.0,False] 905 908 #end patch 909 offMsg = '' 906 910 bottomSizer = wx.BoxSizer(wx.VERTICAL) 907 911 useBox = wx.BoxSizer(wx.HORIZONTAL) … … 1032 1036 bottomSizer.Add(BabSizer(),0,wx.BOTTOM,5) 1033 1037 else: #turn off PWDR intensity related paramters for LeBail refinement 1034 UseList[G2frame.hist]['Scale'][1] = False 1035 UseList[G2frame.hist]['Pref.Ori.'][2] = False 1036 UseList[G2frame.hist]['Extinction'][1] = False 1038 if UseList[G2frame.hist]['Scale'][1]: 1039 offMsg = "Phase fraction" 1040 UseList[G2frame.hist]['Scale'][1] = False 1041 if UseList[G2frame.hist]['Pref.Ori.'][2]: 1042 UseList[G2frame.hist]['Pref.Ori.'][2] = False 1043 if offMsg: offMsg += ', ' 1044 offMsg += 'Preferred orientation' 1045 if UseList[G2frame.hist]['Extinction'][1]: 1046 UseList[G2frame.hist]['Extinction'][1] = False 1047 if offMsg: offMsg += ', ' 1048 offMsg += 'Extinction' 1049 flag = False 1037 1050 for item in UseList[G2frame.hist]['Babinet']: 1038 UseList[G2frame.hist]['Babinet'][item][1] = False 1039 G2G.G2MessageBox(G2frame,'Refinement flags for Phase fraction, Preferred orientation, Extinction & Babinet are now off', 1040 title='LeBail refinement flag notice') 1051 if UseList[G2frame.hist]['Babinet'][item][1]: 1052 UseList[G2frame.hist]['Babinet'][item][1] = False 1053 flag = True 1054 if flag: 1055 if offMsg: offMsg += ', ' 1056 offMsg += 'Babinet' 1057 # make sure that the at least one phase uses the histogram... 1058 allLeBail = True 1059 hists,phases = G2frame.GetUsedHistogramsAndPhasesfromTree() 1060 for key in phases: 1061 d = phases[key] 1062 if G2frame.hist not in d['Histograms']: continue 1063 if not d['Histograms'][G2frame.hist]['Use']: continue 1064 if not d['Histograms'][G2frame.hist]['LeBail']: 1065 #print('Phase',key,'is used as non-LeBail') 1066 allLeBail = False 1067 break 1068 # ...or turn off scale 1069 if allLeBail: 1070 if hists[G2frame.hist]['Sample Parameters']['Scale'][1]: 1071 hists[G2frame.hist]['Sample Parameters']['Scale'][1] = False 1072 if offMsg: offMsg += ', ' 1073 offMsg += 'Histogram scale factor' 1074 if offMsg: 1075 offMsg = "Refinement flags turned for: " + offMsg 1041 1076 elif G2frame.hist[:4] == 'HKLF': 1042 1077 bottomSizer.Add(ExtSizer('HKLF'),0,wx.BOTTOM,5) … … 1045 1080 bottomSizer.Add(FlackSizer(),0,wx.BOTTOM,5) 1046 1081 bottomSizer.Add(twinSizer(),0,wx.BOTTOM,5) 1047 return bottomSizer 1082 return bottomSizer,offMsg 1048 1083 1049 1084 ###################################################################### … … 1053 1088 keyList = G2frame.GetHistogramNames(['PWDR','HKLF']) 1054 1089 UseList = data['Histograms'] 1055 # look for histgrams that are no longer in the project ( should not happen!)1090 # look for histgrams that are no longer in the project (can happen when histogram deleted from tree) 1056 1091 broken = [i for i in UseList if i not in keyList] 1057 1092 if broken: … … 1061 1096 msg += j 1062 1097 del data['Histograms'][j] 1063 G2G.G2MessageBox(G2frame,msg,' Removing bad histograms')1098 G2G.G2MessageBox(G2frame,msg,'Dereferencing Removed histograms') 1064 1099 if UseList: 1065 1100 G2frame.dataWindow.DataMenu.Enable(G2G.wxID_DATADELETE,True) … … 1097 1132 topSizer.Add(G2G.HelpButton(DData,helpIndex=G2frame.dataWindow.helpKey)) 1098 1133 mainSizer.Add(topSizer,0,wx.EXPAND) 1134 LeBailMsg = None 1099 1135 if G2frame.hist: 1100 1136 topSizer = wx.FlexGridSizer(1,2,5,5) … … 1108 1144 topSizer.Add(PlotSizer()) 1109 1145 mainSizer.Add(topSizer) 1110 G2frame.bottomSizer = ShowHistogramInfo()1146 G2frame.bottomSizer,LeBailMsg = ShowHistogramInfo() 1111 1147 mainSizer.Add(G2frame.bottomSizer) 1112 1148 elif not keyList: … … 1120 1156 1121 1157 G2phG.SetPhaseWindow(DData,mainSizer,Scroll=Scroll) 1158 if LeBailMsg: 1159 G2G.G2MessageBox(G2frame,LeBailMsg, 1160 title='LeBail refinement changes') 1122 1161 1123 1162 def MakeHistPhaseWin(G2frame): -
trunk/GSASIIscriptable.py
r4980 r5003 42 42 class Encapsulates 43 43 =============================== =============================================================================================================== 44 :class:`G2Project` aGSAS-II project file, provides references to objects below,44 :class:`G2Project` A GSAS-II project file, provides references to objects below, 45 45 each corresponding to a tree item 46 (excepting :class:`G2AtomRecord`) 47 :class:`G2Phase` a phase 48 :class:`G2PwdrData` a powder histogram 49 :class:`G2Image` an image 50 :class:`G2PDF` a PDF histogram 51 :class:`G2SeqRefRes` the sequential results table 52 :class:`G2AtomRecord` an atom within a phase 46 (exception is :class:`G2AtomRecord`) 47 :class:`G2Phase` Provides phase information access 48 (also provides access to atom info via :class:`G2AtomRecord`) 49 :class:`G2AtomRecord` Access to an atom within a phase 50 :class:`G2PwdrData` Access to powder histogram info 51 :class:`G2Image` Access to image info 52 :class:`G2PDF` PDF histogram info 53 :class:`G2SeqRefRes` The sequential results table 53 54 =============================== =============================================================================================================== 54 55
Note: See TracChangeset
for help on using the changeset viewer.