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 19 #geometry 20 global zero #geometrical 0 distance (for seperation) 21 global inf # geometrical infinite 22 global flatK # curvature of a flat surface 23 24 #distionary of orders in which input is given in .tia 25 global inOrder 26 27 #geometry 28 zero = 1.e-10 29 inf = 1.e15 30 flatK = 1.e-5 31 32 #order of data in .tia 33 inOrder = {} 34 inOrder['bm'] = ['Wx','Wy','WDistx','WDisty','Wl','P', 35 'X','Y','Z','Theta','Phi','Alpha','Name','Ref'] 36 37 inOrder['mr'] = ['X','Y','Z','Theta','Phi','Wedge','Alpha', 38 'HRK','ARK','Diameter','Thickness','N','HRr','HRt','ARr','ARt', 39 'KeepI', 'Name','Ref'] 40 41 inOrder['th'] = ['X','Y','Z','Theta','Phi','Focal','Diameter', 42 'R','T','KeepI','Name','Ref'] 43 44 inOrder['tk'] = ['X','Y','Z','Theta','Phi','K1','K2','Diameter', 45 'Thickness','N','R','T','KeepI','Name','Ref'] 46 47 inOrder['bd'] = ['X','Y','Z','Theta','Phi','Diameter','Thickness', 48 'Name', 'Ref'] 49 50 #parsed from command line 51 info = dic['info'] 52 warning = dic['warning'] 53 text = dic['text'] 54 cad = dic['cad'] 55 fname = dic['fname']
56