Changeset 2910


Ignore:
Timestamp:
Jul 5, 2017 3:41:45 PM (4 years ago)
Author:
vondreele
Message:

fix G2 includes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIdataGUI.py

    r2909 r2910  
    2323import os
    2424import glob
    25 import random as ran
    2625import imp
    2726import inspect
     
    5150import GSASIIconstrGUI as G2cnstG
    5251import GSASIIrestrGUI as G2restG
    53 import GSASIIpy3 as G2py3
    5452import GSASIIobj as G2obj
    5553import GSASIIexprGUI as G2exG
    5654import GSASIIlog as log
    5755import GSASIIctrlGUI as G2G
     56import GSASIIElem as G2elem
     57import GSASIIpwd as G2pwd
     58import GSASIIstrMain as G2stMn
    5859
    5960# trig functions in degrees
     
    158159Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',)
    159160
    160 # these data definitions probably should be moved -- to lattice?
    161 commonTrans = {'abc':np.eye(3),'a-cb':np.array([[1.,0.,0.],[0.,0.,-1.],[0.,1.,0.]]),
    162     'ba-c':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','a-cb','ba-c','-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!
    174161
    175162def SetDefaultDData(dType,histoName,NShkl=0,NDij=0):
     
    199186################################################################################
    200187
     188               
    201189class MergeDialog(wx.Dialog):
    202190    ''' HKL transformation & merge dialog
     
    205193    :param data: HKLF data
    206194   
    207     #NB: commonNames & commonTrans defined at top of this file     
    208195    '''       
     196    commonTrans = {'abc':np.eye(3),'a-cb':np.array([[1.,0.,0.],[0.,0.,-1.],[0.,1.,0.]]),
     197        'ba-c':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','a-cb','ba-c','-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               
    209210    def __init__(self,parent,data):
    210211        wx.Dialog.__init__(self,parent,wx.ID_ANY,'Setup HKLF merge',
     
    386387    import scipy as sp
    387388    import wx
    388     #import wx.lib.scrolledpanel as wxscroll
    389389    import matplotlib as mpl
    390390    import OpenGL as ogl
    391     # load the GSAS routines to update versions with GSASIIpath.SetVersionNumber
    392391    import GSASIIpath
    393     import GSASIIIO as G2IO
    394     import GSASIIElem as G2elem
    395     import GSASIIctrlGUI as G2G
    396     import GSASIIplot as G2plt
    397     import GSASIIpwd as G2pwd
    398     import GSASIIpwdGUI as G2pdG
    399     import GSASIIspc as G2spc
    400     import GSASIIstrMain as G2stMn
    401     import GSASIIstrIO as G2stIO
    402     import GSASIImath as G2mth
    403     import GSASIImapvars as G2mv
    404     import GSASIIobj as G2obj
    405     import GSASIIlattice as G2lat
    406     import GSASIIlog as log
    407 #                GSASIIpath.IPyBreak()
    408392    # print versions
    409393    print "Python module versions loaded:"
     
    39593943        the project.
    39603944        '''
    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)
    39623946        try:
    39633947            result = dlg.ShowModal()
Note: See TracChangeset for help on using the changeset viewer.