source: trunk/ImageCalibrants.py @ 3406

Last change on this file since 3406 was 3136, checked in by vondreele, 8 years ago

make GSAS-II python 3.6 compliant & preserve python 2.7 use;changes:
do from future import division, print_function for all GSAS-II py sources
all menu items revised to be py 2.7/3.6 compliant
all wx.OPEN --> wx.FD_OPEN in file dialogs
all integer divides (typically for image pixel math) made explicit with ; ambiguous ones made floats as appropriate
all print "stuff" --> print (stuff)
all print >> pFile,'stuff' --> pFile.writeCIFtemplate('stuff')
all read file opens made explicit 'r' or 'rb'
all cPickle imports made for py2.7 or 3.6 as cPickle or _pickle; test for '2' platform.version_tuple[0] for py 2.7
define cPickleload to select load(fp) or load(fp,encoding='latin-1') for loading gpx files; provides cross compatibility between py 2.7/3.6 gpx files
make dict.keys() as explicit list(dict.keys()) as needed (NB: possible source of remaining py3.6 bugs)
make zip(a,b) as explicit list(zip(a,b)) as needed (NB: possible source of remaining py3.6 bugs)
select unichr/chr according test for '2' platform.version_tuple[0] for py 2.7 (G2pwdGUI * G2plot) for special characters
select wg.EVT_GRID_CELL_CHANGE (classic) or wg.EVT_GRID_CELL_CHANGED (phoenix) in grid Bind
maxint --> maxsize; used in random number stuff
raise Exception,"stuff" --> raise Exception("stuff")
wx 'classic' sizer.DeleteWindows?() or 'phoenix' sizer.Clear(True)
wx 'classic' SetToolTipString?(text) or 'phoenix' SetToolTip?(wx.ToolTip?(text)); define SetToolTipString?(self,text) to handle the choice in plots
status.SetFields? --> status.SetStatusText?
'classic' AddSimpleTool? or 'phoenix' self.AddTool? for plot toolbar; Bind different as well
define GetItemPydata? as it doesn't exist in wx 'phoenix'
allow python versions 2.7 & 3.6 to run GSAS-II
Bind override commented out - no logging capability (NB: remove all logging code?)
all import ContentsValidator? open filename & test if valid then close; filepointer removed from Reader
binary importers (mostly images) test for 'byte' type & convert as needed to satisfy py 3.6 str/byte rules

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Author Revision URL Id
File size: 3.2 KB
Line 
1"""
2*ImageCalibrants: Calibration Standards*
3----------------------------------------
4
5GSASII powder calibrants as a dictionary ``ImageCalibrants.Calibrants`` with substances
6commonly used for powder calibrations for image data.
7
8Each entry in ``ImageCalibrants`` consists of::
9
10  'key':([Bravais num,],[space group,],[(a,b,c,alpha,beta,gamma),],no. lines skipped,(dmin,pixLimit,cutOff))
11  (The space group may be an empty string)
12
13as an example::
14
15  'LaB6  SRM660a':([2,],['',][(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10.)),
16
17or where "Bravais num" and "(a,b,...)" are repeated in the case of mixtures::
18
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.)),
20
21To expand this list with locally needed additions, do not modify this file,
22because you may lose these changes during a software update. Instead
23duplicate the format of this file in a file named `UserCalibrants.py`
24and there define the material(s) you want::
25
26  Calibrants={
27    'LaB6 skip 2 lines':([2,],['',],[(4.1569162,4.1569162,4.1569162,90,90,90),],2,(1.0,10,10)),
28  }
29
30New key values will be added to the list of options.
31If a key is duplicated, the information in  `UserCalibrants.py` will
32override the information in this file.
33
34Note, the Bravais numbers are:
35            * 0 F cubic
36            * 1 I cubic
37            * 2 P cubic
38            * 3 R hexagonal (trigonal not rhombohedral)
39            * 4 P hexagonal
40            * 5 I tetragonal
41            * 6 P tetragonal
42            * 7 F orthorhombic
43            * 8 I orthorhombic
44            * 9 C orthorhombic
45            * 10 P orthorhombic
46            * 11 C monoclinic
47            * 12 P monoclinic
48            * 13 P triclinic
49"""
50Calibrants={
51'':([0,],['',],[(0,0,0,0,0,0),],0,(1.0,10,10.)),
52'LaB6  SRM660b':([2,],[''],[(4.15689,4.15689,4.15689,90,90,90),],0,(1.0,10,10.)),
53'LaB6  SRM660a':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10.)),
54'LaB6  SRM660a skip 1':([2,],[''],[(4.1569162,4.1569162,4.1569162,90,90,90),],1,(1.0,10,10.)),
55'LaB6  SRM660': ([2,],[''],[(4.15695,4.15695,4.15695,90,90,90),],0,(1.0,10,10.)),
56'Si    SRM640c':([0,],['F d 3 m'],[(5.4311946,5.4311946,5.4311946,90,90,90),],0,(1.,10,10.)),
57'CeO2  SRM674b':([0,],[''],[(5.411651,5.411651,5.411651,90,90,90),],0,(1.0,2,1.)),
58'Al2O3 SRM676a':([3,],['R -3 c'],[(4.759091,4.759091,12.991779,90,90,120),],0,(1.0,5,5.)),
59'Ni   @ 298K':([0,],[''],[(3.52475,3.52475,3.52475,90,90,90),],0,(1.0,10,10.)),
60'NaCl @ 298K':([0,],[''],[(5.6402,5.6402,5.6402,90,90,90),],0,(1.0,10,10.)),
61'NaCl even hkl only':([2,],[''],[(2.8201,2.8201,2.8201,90,90,90),],0,(1.0,10,10.)),
62'Ag behenate':([6,],[''],[(1.0,1.0,58.380,90,90,90),],0,(7.0,5,1.)),
63'Spun Si 3600 line/mm grating':([6,],[''],[(1.0,1.0,2777.78,90,90,90),],2,(200.,5,1.)),
64'Spun Si 7200 line/mm grating':([6,],[''],[(1.0,1.0,1388.89,90,90,90),],1,(200.,5,1.)),
65'Pt   @ 298K':([0,],[''],[(3.9231,3.9231,3.9231,90,90,90),],0,(1.0,5,1.)),
66'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.)),
67}
68   
69# this should not be duplicated in the UserCalibrants.py file:
70try:
71    import UserCalibrants as userFile
72    Calibrants.update(userFile.Calibrants)
73except:
74    pass
Note: See TracBrowser for help on using the repository browser.