Skip to content
Snippets Groups Projects

Add acoustics monitoring

Merged Carlo Guidi requested to merge cguidi/km3mon:undefined into master
Compare and Show latest version
1 file
+ 8
5
Compare changes
  • Side-by-side
  • Inline
+ 8
5
@@ -55,6 +55,9 @@ DUS = range(1, N_DUS + 1)
#DOMS=[7] # DOMs
#DUS=[3] # DUs
TIT=600 # Time Interval between Trains of acoustic pulses)
SSW=160 # Signal Security Window (Window size with signal)
check=True
while check==True:
@@ -64,7 +67,7 @@ while check==True:
mintime=mintime1.values
maxrun=table["RUN"][len(table["RUN"])-1]
now=time.time()
if (now-mintime/1000)<600:
if (now-mintime/1000)<TIT:
minrun=table["RUN"][len(table["RUN"])-1]-1
print(now)
@@ -75,13 +78,13 @@ while check==True:
for dom in DOMS:
try:
macaddress = db.doms.via_omkey((du,dom), detid).dom_id
toas_all = sds.toashort(detid=detid, minrun=minrun, maxrun=maxrun, domid=macaddress, emitterid=ab) # Prendere i dati basandosi sul tempo e non sul run????
toas_all = sds.toashort(detid=detid, minrun=minrun, maxrun=maxrun, domid=macaddress, emitterid=ab)
QF_abdom=toas_all["QUALITYFACTOR"]
UTB_abdom=toas_all["UNIXTIMEBASE"]
TOAS_abdom=toas_all["TOA_S"]
UTB_abdom=UTB_abdom.values
up=np.where(UTB_abdom>(now-600))
up=np.where(UTB_abdom>(now-TIT))
down=np.where(UTB_abdom<(now))
intr=np.intersect1d(up,down)
UTB_abdom=UTB_abdom[intr]
@@ -91,8 +94,8 @@ while check==True:
QFlist.sort(reverse=True)
QF_max=max(QF_abdom)
QF_max_index=np.where(QF_abdom==QF_max)
UTB_signal_min=UTB_abdom[QF_max_index]-80
UTB_signal_max=UTB_abdom[QF_max_index]+80
UTB_signal_min=UTB_abdom[QF_max_index]-SSW/2
UTB_signal_max=UTB_abdom[QF_max_index]+SSW/2
temp1=np.where(UTB_abdom>(UTB_signal_min[0]))
temp2=np.where(UTB_abdom<(UTB_signal_max[0]))
inter=np.intersect1d(temp1,temp2)
Loading