Package theia :: Package helpers :: Module settings
[hide private]
[frames] | no frames]

Source Code for Module theia.helpers.settings

 1  '''Module to initiate all global variables for theia.''' 
 2   
 3  # Provides: 
 4  #   init 
 5   
6 -def init(dic):
7 '''Initiate globals with dictionary. 8 9 dic: dictionary holding values for globals. [dictionary] 10 11 ''' 12 # these are *all* the theia globals 13 global info 14 global warning 15 global text 16 global cad 17 global fname 18 global fclib 19 20 #geometry 21 global zero #geometrical 0 distance (for seperation) 22 global inf # geometrical infinite 23 global flatK # curvature of a flat surface 24 25 #distionary of orders in which input is given in .tia 26 global inOrder 27 28 #geometry 29 zero = 1.e-10 30 inf = 1.e15 31 flatK = 1.e-5 32 33 #order of data in .tia 34 inOrder = {} 35 inOrder['bm'] = ['Wx','Wy','WDistx','WDisty','Wl','P', 36 'X','Y','Z','Theta','Phi','Alpha','Ref'] 37 38 inOrder['mr'] = ['X','Y','Z','Theta','Phi','Wedge','Alpha', 39 'HRK','ARK','Diameter','Thickness','N','HRr','HRt','ARr','ARt', 40 'KeepI', 'Ref'] 41 42 inOrder['th'] = ['X','Y','Z','Theta','Phi','Focal','Diameter', 43 'R','T','KeepI','Ref'] 44 45 inOrder['tk'] = ['X','Y','Z','Theta','Phi','K1','K2','Diameter', 46 'Thickness','N','R','T','KeepI','Ref'] 47 48 inOrder['bd'] = ['X','Y','Z','Theta','Phi','Diameter','Thickness', 'Ref'] 49 inOrder['gh'] = ['X','Y','Z','Theta','Phi','Diameter', 'Ref'] 50 inOrder['bo'] = ['X', 'Y', 'Z'] 51 52 #parsed from command line 53 info = dic['info'] 54 warning = dic['warning'] 55 text = dic['text'] 56 cad = dic['cad'] 57 fname = dic['fname'] 58 fclib = dic['fclib']
59