Skip to content
Snippets Groups Projects
Commit 29d49e62 authored by Carlo Guidi's avatar Carlo Guidi
Browse files

Update acoustics.py

parent 81370aa8
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......@@ -81,7 +84,7 @@ while check==True:
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment