PyCOMPLETE / LHCMeasurementTools

0 stars 2 forks source link

Issue with pytimber for stable phase data download #11

Closed giadarol closed 2 years ago

giadarol commented 3 years ago

Mail sent to Riccardo and Piotr:

Hi Riccardo and Piotr, I stumbled in an issue with pytimber, which appears both with cals and nxcals. You should be able to reproduce it with the example below. I believe that this was working in the past, it might be a regression from a recent version. Thanks in advance with your help with this.

Cheers,

Gianni


Here the script:

import pytimber
db = pytimber.LoggingDB(source='ldb')

t_start = 1527627525.149
t_stop = 1527662512.979

cav_list = [
  'ACSCA.UX45.L1B1:CAV_FIELD', 
  'ACSCA.UX45.L2B1:CAV_FIELD', 
  'ACSCA.UX45.L3B1:CAV_FIELD',
  'ACSCA.UX45.L4B1:CAV_FIELD',
  'ACSCA.UX45.L5B1:CAV_FIELD',
  'ACSCA.UX45.L6B1:CAV_FIELD',
  'ACSCA.UX45.L7B1:CAV_FIELD',
  'ACSCA.UX45.L8B1:CAV_FIELD']

db.getAligned(['LONGDIAG.SR4.B1:STABLE_PHASE_MEAN_REL',
                'LHC.BCTFR.A6R4.B1:BUNCH_INTENSITY']+cav_list, master='LONGDIAG.SR4.B1:STABLE_PHASE_MEAN_REL', 
                t1=t_start, t2=t_stop)

And here the error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-52680c029e4d> in <module>
     15   'ACSCA.UX45.L8B1:CAV_FIELD']
     16
---> 17 db.getAligned(['LONGDIAG.SR4.B1:STABLE_PHASE_MEAN_REL',
     18                 'LHC.BCTFR.A6R4.B1:BUNCH_INTENSITY']+cav_list, master='LONGDIAG.SR4.B1:STABLE_PHASE_MEAN_REL',
     19                 t1=t_start, t2=t_stop)

/afs/cern.ch/work/l/lhcecld/miniconda/lib/python3.8/site-packages/pytimber/pytimber.py in getAligned(self, pattern_or_list, t1, t2, fundamental, master, unixtime)
    515                 master_variable = variables.getVariable(0)
    516         else:
--> 517             master_variable = variables.getVariable(master)
    518
    519         if master_variable is None:

AttributeError: 'java.util.TreeMap.Values' object has no attribute 'getVariable'
kparasch commented 2 years ago

No longer an issue