Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
cronjobs/ios/compact.sh
*.log
*.json
*.config.py
4 changes: 3 additions & 1 deletion SNOPlusSlowControl/DB/pilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
{"dbname":"AV_dP","channels":[1],"address":"DeltaV_321-DPT002/SCLR1/OUT.CV","method":1},\
{"dbname":"AV_scint_height","channels":[1],"address":"DeltaV_LIC-AV-01-MOD/PID1/PV.CV","method":1},\
{"dbname":"cavity_bathtub","channels":[1],"address":"DeltaV_311-LIT-100/AI1/PV.CV","method":1},\
{"dbname":"scint_volume_calc","channels":[1],"address":"DeltaV_FIC-AV-01-MOD-PID1/TOTALIZER.CV","method":1}]
{"dbname":"scint_volume_calc","channels":[1],"address":"DeltaV_FIC-AV-01-MOD-PID1/TOTALIZER.CV","method":1},\
{"dbname":"interface_bubbler_calc","channels":[1],"address":"SNMP_LAB_Interface_Height_Bubbler_calc","method":1},\
{"dbname":"interface_volumetric_calc","channels":[1],"address":"SNMP_LAB_Interface_Height_Volumetric_calc","method":1}]
#Any dbs not in this list will search for new data in the most recent minute according to now's time
#Any dbs in this list grab the most recent data point in the PI server
getrecent_list = ["deck_humidity","deck_temp","control_room_temp","cover_gas","equator_monitor","AVsensorRope","AVneck",\
Expand Down
2 changes: 1 addition & 1 deletion SNOPlusSlowControl/lib/config/alarmdbconfig.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os.path import expanduser
home = expanduser("~")
#Information for connecting to alarm GUI postgres database
ALARMCREDDIR = home + "/config/alascred.conf"
ALARMCREDDIR = "/home/uwslowcontrol/config/alascred.conf"
ALARMHOST = "dbug.sp.snolab.ca"
ALARMDBNAME = "detector"

6 changes: 3 additions & 3 deletions SNOPlusSlowControl/lib/config/logconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import logging

#LOCAL LOGGING CONFIGURATIOn
LOG_FILENAME = home + '/SNOPlusSlowControl/SNOPlusSlowControl/log/IOSlog.log' #logfile source assuming homedir install
LOG_FILENAME = '/home/uwslowcontrol/tester/SNOPlusSlowControl/SNOPlusSlowControl/log/pilog.log' #logfile source assuming homedir install
LOG_FORMAT = '%(asctime)s %(name)8s %(levelname)5s %(message)s'
LOG_LEVEL = logging.INFO

#EMAIL LIST FOR SENDING ALARMS/MESSAGES TO (Assumes homedir install)
GMAILCREDS = home + "/config/gmailcred.conf"
EMAIL_RECIPIENTS_FILE = home + "/SNOPlusSlowControl/SNOPlusSlowControl/DB/emailList.txt"
GMAILCREDS = "/home/uwslowcontrol/tester/config/gmailcred.conf"
EMAIL_RECIPIENTS_FILE = "~/SNOPlusSlowControl/SNOPlusSlowControl/DB/emailList.txt"
7 changes: 4 additions & 3 deletions SNOPlusSlowControl/lib/config/pidbconfig.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

from os.path import expanduser
home = expanduser("~")

DEBUG = False
ALARMCREDDIR = home + "/config/alascred.conf"
DEBUG = True
ALARMCREDDIR = "/home/uwslowcontrol/config/alascred.conf"
ALARMHOST,ALARMDBNAME = "dbug","detector"

TIMESERIESURL = 'http://pi.snolab.ca/PIWebServices/PITimeSeries.svc?wsdl'
Expand All @@ -11,7 +12,7 @@


COUCHADDRESS = 'http://couch.snopl.us'
COUCHCREDS = home + "/config/couchcred.conf"
COUCHCREDS = "/home/uwslowcontrol/config/couchcred.conf"
CHANNELDBVIEW = 'slowcontrol/recent'
CHANNELDBURL = 'slowcontrol-channeldb'
ONEMINDBURL = "slowcontrol-data-1min"
Expand Down
17 changes: 10 additions & 7 deletions SNOPlusSlowControl/lib/dataconverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ def __init__(self):
self.Matrix = []

def GetRopeValue(self,rope):
rope1 = rope[5] - 46.149
rope2 = rope[6] - 55.498
rope3 = rope[0] - 62.733
rope4 = rope[2] - 52.514
rope5 = rope[3] - 60.132
rope6 = rope[4] - 55.679
self.rope = [rope1,rope2,rope3,rope4,rope5,rope6]
try:
rope1 = rope[5] - 46.149
rope2 = rope[6] - 55.498
rope3 = rope[0] - 62.733
rope4 = rope[2] - 52.514
rope5 = rope[3] - 60.132
rope6 = rope[4] - 55.679
self.rope = [rope1,rope2,rope3,rope4,rope5,rope6]
except:
print("Having issue getting rope values")

def partial_derivative(self,func,var=0,point=[]):
args = point[:]
Expand Down
11 changes: 11 additions & 0 deletions SNOPlusSlowControl/log/IOSlog.log
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,14 @@ None
None
2019-01-25 12:04:53,801 root ERROR Traceback: [' File "main_ios.py", line 122, in <module>\n time.sleep(c.POLL_WAITTIME)\n']
None
2019-09-10 15:35:34,612 __main__ INFO PI_DB SCRIPT INITIALIZING...
2019-09-10 15:35:34,612 lib.alarmserver INFO Starting connection pool for alarms database
2019-09-10 15:35:34,618 lib.alarmserver INFO Starting alarm server connection heartbeat
2019-09-10 15:35:34,623 lib.couchutils INFO CouchDBConn: Got server instance successfully.
2019-09-10 15:35:34,787 __main__ INFO main.py: Most recent channel database acquired on startup.
2019-09-10 15:35:43,121 root ERROR Uncaught exception: matrices are not aligned
None
2019-09-10 15:35:43,121 root ERROR Error type: <type 'exceptions.ValueError'>
None
2019-09-10 15:35:43,121 root ERROR Traceback: [' File "main_pidb.py", line 79, in <module>\n Nonlin_AVPos = DataConverter.Rope_to_AVPos(Rope)\n', ' File "/raid/home/uwslowcontrol/tester/SNOPlusSlowControl/SNOPlusSlowControl/lib/dataconverters.py", line 85, in Rope_to_AVPos\n x.append(np.dot(self.Matrix[i,:],self.rope) + dc.offset[i])\n']
None
Loading