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
+ 17
5
Compare changes
  • Side-by-side
  • Inline
+ 17
5
#!/usr/bin/env python
# coding=utf-8
"""
Online Acoustic Monitoring
Usage:
acoustics.py [options]
acoustics.py (-h | --help)
Options:
-d DET_ID Detector ID
-o PLOT_DIR The directory to save the plot
-h --help Show this screen.
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
@@ -12,7 +25,7 @@ import argparse
parser = argparse.ArgumentParser(description='Online_monitoring')
parser.add_argument('-d', dest='det_id', type=str, nargs=1, required=True,
help='The detector ID (e.g. D0ARCA001)')
help='The detector ID (e.g. D_ORCA005)')
parser.add_argument('-o', dest='plot_dir', type=str, nargs=1, required=True,
help='Directory in which the plot is saved')
@@ -24,7 +37,6 @@ def diff(first, second):
second = set(second)
return [item for item in first if item not in second]
#detid='D_ORCA005'
#print(time.time())
db = kp.db.DBManager()
@@ -33,11 +45,11 @@ table=db.run_table(detid)
AB=[12,14,16] # Acoustic Beacons
ACOUSTIC_BEACONS = [12, 14, 16]
DOM=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] # DOMs
DU=[1,2,3,4,5] # DUs
#AB=[16] # Acoustic Beacons
#ACOUSTIC_BEACONS=[16] # Acoustic Beacons
#DOM=[7] #
#DU=[3] # DUs
@@ -57,7 +69,7 @@ while check==True:
COL=[]
for i in DU:
DUx=[]
for j in AB:
for j in ACOUSTIC_BEACONS:
for k in DOM:
try:
macaddress = db.doms.via_omkey((i,k), detid).dom_id
Loading