Changeset 153


Ignore:
Timestamp:
Aug 9, 2010 11:00:16 AM (13 years ago)
Author:
vondreel
Message:

GetAtomColors? & GetElemColor? now deleted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElem.py

    r151 r153  
    4747    return FormFactors
    4848   
    49 def GetAtomColors():
    50     import ColorTable as CT
    51     filename = os.path.join(sys.path[1],'atmdata.dat')
    52     try:
    53         FFdata = open(filename,'Ur')
    54     except:
    55         wx.MessageBox(message="File atmdata.dat not found in directory %s" % sys.path[0],
    56             caption="No atmdata.dat file",style=wx.OK | wx.ICON_EXCLAMATION | wx.STAY_ON_TOP)
    57         sys.exit()
    58     S = '1'
    59     Colors = []
    60     while S:       
    61         S = FFdata.readline()
    62         if S[5:9] == '_SIZ':
    63             print S,int(S[37:42])-1
    64             Color = CT.ColorTable[int(S[37:42])-1][0]
    65             if not Colors.count(Color):
    66                 Colors.append(Color)
    67     FFdata.close()
    68     return Colors
    69    
    70 def GetElemColor(El):
    71     import ColorTable as CT
    72     filename = os.path.join(sys.path[1],'atmdata.dat')
    73     ElS = El.upper().rjust(2)
    74     try:
    75         FFdata = open(filename,'Ur')
    76     except:
    77         wx.MessageBox(message="File atmdata.dat not found in directory %s" % sys.path[0],
    78             caption="No atmdata.dat file",style=wx.OK | wx.ICON_EXCLAMATION | wx.STAY_ON_TOP)
    79         sys.exit()
    80     S = '1'
    81     Colors = []
    82     while S:       
    83         S = FFdata.readline()
    84         if S[3:9] == ElS+'_SIZ':
    85             return CT.ColorTable[int(S[37:42])-1][0]
    86     FFdata.close()
    87     return wx.Color(255,255,255)
    88 
    8949def GetAtomInfo(El):
    9050   
Note: See TracChangeset for help on using the changeset viewer.