Skip to content

Commit

Permalink
Fix and extend getIntervalsByLHCModes
Browse files Browse the repository at this point in the history
  • Loading branch information
rdemaria committed Sep 5, 2017
1 parent e77ee2e commit b3758ea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pytimber/pytimber.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,15 @@ def getIntervalsByLHCModes(self, t1, t2, mode1, mode2, unixtime=True,
out=[]
for fill in fills:
fn=[fill['fillNumber']]
mode1=[]
mode2=[]
m1=[]
m2=[]
for bm in fill['beamModes']:
if bm['mode']==mode1:
mode1.append(bm[mode1time])
m1.append(bm[mode1time])
if bm['mode']==mode2:
mode2.append(bm[mode2time])
out.append([fn,mode1[mode1idx],mode2[mode2idx]])
m2.append(bm[mode2time])
if len(m1)>0 and len(m2)>0:
out.append([fn,m1[mode1idx],m2[mode2idx]])
return out
def getMetaData(self,pattern_or_list):
"""Get All MetaData for a variable defined by a pattern_or_list"""
Expand Down

0 comments on commit b3758ea

Please sign in to comment.