Changeset 2910 for branch/2frame
 Timestamp:
 Jul 5, 2017 3:41:45 PM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branch/2frame/GSASIIdataGUI.py
r2909 r2910 23 23 import os 24 24 import glob 25 import random as ran26 25 import imp 27 26 import inspect … … 51 50 import GSASIIconstrGUI as G2cnstG 52 51 import GSASIIrestrGUI as G2restG 53 import GSASIIpy3 as G2py354 52 import GSASIIobj as G2obj 55 53 import GSASIIexprGUI as G2exG 56 54 import GSASIIlog as log 57 55 import GSASIIctrlGUI as G2G 56 import GSASIIElem as G2elem 57 import GSASIIpwd as G2pwd 58 import GSASIIstrMain as G2stMn 58 59 59 60 # trig functions in degrees … … 158 159 Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',) 159 160 160 # these data definitions probably should be moved  to lattice?161 commonTrans = {'abc':np.eye(3),'acb':np.array([[1.,0.,0.],[0.,0.,1.],[0.,1.,0.]]),162 'bac':np.array([[0.,1.,0.],[1.,0.,0.],[0.,0.,1.]]),'cba':np.array([[0.,0.,1.],[0.,1.,0.],[1.,0.,0.]]),163 'bca':np.array([[0.,1.,0.],[0.,0.,1.],[1.,0.,0.]]),'cab':np.array([[0.,0.,1.],[1.,0.,0.],[0.,1.,0.]]),164 'R>H':np.array([[1.,1.,0.],[0.,1.,1.],[1.,1.,1.]]),'H>R':np.array([[2./3,1./3,1./3],[1./3,1./3,1./3],[1./3,2./3,1./3]]),165 'P>A':np.array([[1.,0.,0.],[0.,1.,1.],[0.,1.,1.]]),'R>O':np.array([[1.,0.,0.],[0.,1.,0.],[0.,0.,1.]]),166 'P>B':np.array([[1.,0.,1.],[0.,1.,0.],[1.,0.,1.]]),'B>P':np.array([[.5,0.,.5],[0.,1.,0.],[.5,0.,.5]]),167 'P>C':np.array([[1.,1.,0.],[1.,1.,0.],[0.,0.,1.]]),'C>P':np.array([[.5,.5,0.],[.5,.5,0.],[0.,0.,1.]]),168 'P>F':np.array([[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]]),'F>P':np.array([[0.,.5,.5],[.5,0.,.5],[.5,.5,0.]]),169 'P>I':np.array([[0.,1.,1.],[1.,0.,1.],[1.,1.,0.]]),'I>P':np.array([[.5,.5,.5],[.5,.5,.5],[.5,.5,.5]]),170 'A>P':np.array([[1.,0.,0.],[0.,.5,.5],[0.,.5,.5]]),'O>R':np.array([[1.,0.,0.],[0.,1.,0.],[0.,0.,1.]]),171 'abc*':np.eye(3), }172 commonNames = ['abc','bca','cab','acb','bac','cba','P>A','A>P','P>B','B>P','P>C','C>P',173 'P>I','I>P','P>F','F>P','H>R','R>H','R>O','O>R','abc*','setting 1>2'] #don't put any new ones after the setting one!174 161 175 162 def SetDefaultDData(dType,histoName,NShkl=0,NDij=0): … … 199 186 ################################################################################ 200 187 188 201 189 class MergeDialog(wx.Dialog): 202 190 ''' HKL transformation & merge dialog … … 205 193 :param data: HKLF data 206 194 207 #NB: commonNames & commonTrans defined at top of this file208 195 ''' 196 commonTrans = {'abc':np.eye(3),'acb':np.array([[1.,0.,0.],[0.,0.,1.],[0.,1.,0.]]), 197 'bac':np.array([[0.,1.,0.],[1.,0.,0.],[0.,0.,1.]]),'cba':np.array([[0.,0.,1.],[0.,1.,0.],[1.,0.,0.]]), 198 'bca':np.array([[0.,1.,0.],[0.,0.,1.],[1.,0.,0.]]),'cab':np.array([[0.,0.,1.],[1.,0.,0.],[0.,1.,0.]]), 199 'R>H':np.array([[1.,1.,0.],[0.,1.,1.],[1.,1.,1.]]),'H>R':np.array([[2./3,1./3,1./3],[1./3,1./3,1./3],[1./3,2./3,1./3]]), 200 'P>A':np.array([[1.,0.,0.],[0.,1.,1.],[0.,1.,1.]]),'R>O':np.array([[1.,0.,0.],[0.,1.,0.],[0.,0.,1.]]), 201 'P>B':np.array([[1.,0.,1.],[0.,1.,0.],[1.,0.,1.]]),'B>P':np.array([[.5,0.,.5],[0.,1.,0.],[.5,0.,.5]]), 202 'P>C':np.array([[1.,1.,0.],[1.,1.,0.],[0.,0.,1.]]),'C>P':np.array([[.5,.5,0.],[.5,.5,0.],[0.,0.,1.]]), 203 'P>F':np.array([[1.,1.,1.],[1.,1.,1.],[1.,1.,1.]]),'F>P':np.array([[0.,.5,.5],[.5,0.,.5],[.5,.5,0.]]), 204 'P>I':np.array([[0.,1.,1.],[1.,0.,1.],[1.,1.,0.]]),'I>P':np.array([[.5,.5,.5],[.5,.5,.5],[.5,.5,.5]]), 205 'A>P':np.array([[1.,0.,0.],[0.,.5,.5],[0.,.5,.5]]),'O>R':np.array([[1.,0.,0.],[0.,1.,0.],[0.,0.,1.]]), 206 'abc*':np.eye(3), } 207 commonNames = ['abc','bca','cab','acb','bac','cba','P>A','A>P','P>B','B>P','P>C','C>P', 208 'P>I','I>P','P>F','F>P','H>R','R>H','R>O','O>R','abc*','setting 1>2'] #don't put any new ones after the setting one! 209 209 210 def __init__(self,parent,data): 210 211 wx.Dialog.__init__(self,parent,wx.ID_ANY,'Setup HKLF merge', … … 386 387 import scipy as sp 387 388 import wx 388 #import wx.lib.scrolledpanel as wxscroll389 389 import matplotlib as mpl 390 390 import OpenGL as ogl 391 # load the GSAS routines to update versions with GSASIIpath.SetVersionNumber392 391 import GSASIIpath 393 import GSASIIIO as G2IO394 import GSASIIElem as G2elem395 import GSASIIctrlGUI as G2G396 import GSASIIplot as G2plt397 import GSASIIpwd as G2pwd398 import GSASIIpwdGUI as G2pdG399 import GSASIIspc as G2spc400 import GSASIIstrMain as G2stMn401 import GSASIIstrIO as G2stIO402 import GSASIImath as G2mth403 import GSASIImapvars as G2mv404 import GSASIIobj as G2obj405 import GSASIIlattice as G2lat406 import GSASIIlog as log407 # GSASIIpath.IPyBreak()408 392 # print versions 409 393 print "Python module versions loaded:" … … 3959 3943 the project. 3960 3944 ''' 3961 #dlg = wx.MessageDialog(self, 'Save current project?', ' ', wx.YES  wx.NO  wx.CANCEL)3945 dlg = wx.MessageDialog(self, 'Save current project?', ' ', wx.YES  wx.NO  wx.CANCEL) 3962 3946 try: 3963 3947 result = dlg.ShowModal()
Note: See TracChangeset
for help on using the changeset viewer.