Project

General

Profile

Bug #1184

Updated by Carlisle, Timothy over 9 years ago


 @ python Example_3.py 
 ========= XBOA example 3 ========= 
 This example shows how to make cuts 
 Loading file... 
 Loaded 
 Traceback (most recent call last): 
   File "Example_3.py", line 51, in <module> 
     bunch_list[0].cut({'amplitude x y':30.}, operator.ge, global_cut=True) 
   File "/home/carlisle/maus2/devel_2/third_party/install/lib/python2.7/site-packages/xboa/Bunch.py", line 741, in cut 
     if type(Hit()[variable]) != type(0.): 
   File "/home/carlisle/maus2/devel_2/third_party/install/lib/python2.7/site-packages/xboa/Hit.py", line 88, in __getitem__ 
     return self.get(variable) 
   File "/home/carlisle/maus2/devel_2/third_party/install/lib/python2.7/site-packages/xboa/Hit.py", line 298, in get 
     raise IndexError('Key \''+str(key)+'\' could not be found for Hit.get() - should be one of '+str(Hit.get_variables())) 
 IndexError: Key 'amplitude x y' could not be found for Hit.get() - should be one of ['x', 'y', 'z', 't', 'px', 'py', 'pz', 'energy', 'mass', 'local_weight', 'global_weight', 'weight', 'bx', 'by', 'bz', 'ex', 'ey', 'ez', 'sx', 'sy', 'sz', 'path_length', 'proper_time', 'e_dep', 'charge', 'event_number', 'station', 'pid', 'status', 'particle_number', 'eventNumber', 'particleNumber', '', 'phi', 'weight', "ct'", 'pt', "z'", "x'", "y'", 'r_squared', 'p', 'r', 'pphi', "r'", "t'", 'kinetic_energy', 'spin', 'l_kin', 'ct']@ 

 Was the amplitude calc. never implemented? Or taken out? Running the Example scripts in addition to the Tests automatically upon installation would ensure the Examples are kept maintained...does this sound sensible? They're very useful... 

 Thanks, 

 Tim 

Back