Browse Source

first commit for laser raman system (lara).

Signed-off-by: Nicholas Tan Jerome <nicholas.jerome@kit.edu>
Nicholas Tan Jerome 5 years ago
commit
d3a49a088c
8 changed files with 693 additions and 0 deletions
  1. 3 0
      .gitmodules
  2. 6 0
      app.py
  3. BIN
      background.png
  4. 1 0
      bora
  5. 9 0
      requirements.txt
  6. 644 0
      style.yaml
  7. 3 0
      trigger.sh
  8. 27 0
      varname.yaml

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "bora"]
+	path = bora
+	url = https://github.com/kit-ipe/bora.git

+ 6 - 0
app.py

@@ -0,0 +1,6 @@
+import subprocess
+import os
+from shutil import copyfile
+
+copyfile("./background.png", "./bora/static/background.png")
+subprocess.call(["python", "./bora/core.py"])

BIN
background.png


+ 1 - 0
bora

@@ -0,0 +1 @@
+Subproject commit 6f42327669e1ea1401a06cdd4961c0d3456a3782

+ 9 - 0
requirements.txt

@@ -0,0 +1,9 @@
+PyYAML==3.12
+backports-abc==0.4
+backports.ssl-match-hostname==3.5.0.1
+certifi==2016.8.31
+requests==2.11.1
+singledispatch==3.4.0.3
+six==1.10.0
+tornado==4.4.1
+wsgiref==0.1.2

+ 644 - 0
style.yaml

@@ -0,0 +1,644 @@
+611-HCL-5-3012-0002:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Water :     '
+    weight: '400'
+  height: 24.4
+  larger: ''
+  left: 606px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-HCL-5-3012-0002
+  top: 754.333px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '     °C'
+    weight: '400'
+  width: 202.4
+611-HCL-5-3012-0003:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Water chiller "no faults"                                     '
+    weight: '700'
+  height: 62.4
+  larger: ''
+  left: 1551px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-HCL-5-3012-0003
+  top: 384px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                                     '
+    weight: '400'
+  width: 252.4
+611-HCL-5-3012-0005:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Tank level low :              '
+    weight: '400'
+  height: 24.4
+  larger: '0'
+  left: 606px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-HCL-5-3012-0005
+  top: 796px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '              '
+    weight: '400'
+  width: 232.4
+611-HCL-5-3012-0006:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Pump failure :             '
+    weight: '400'
+  height: 24.4
+  larger: ''
+  left: 606px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-HCL-5-3012-0006
+  top: 839px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '             '
+    weight: '400'
+  width: 208.4
+611-HCL-5-3012-0007:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Pump slow :            '
+    weight: '400'
+  height: 26.4
+  larger: '0'
+  left: 606px
+  lesser: '0'
+  linkhtml: 'true'
+  ref: 611-HCL-5-3012-0007
+  top: 883px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '            '
+    weight: '400'
+  width: 188.4
+611-HCL-5-3012-0008:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Pump off :          '
+    weight: '400'
+  height: 28.4
+  larger: '0'
+  left: 606px
+  lesser: '0'
+  linkhtml: 'true'
+  ref: 611-HCL-5-3012-0008
+  top: 928px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '          '
+    weight: '400'
+  width: 166.4
+611-LVI-0-3010-0002:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Laser "on/off"                                      '
+    weight: '700'
+  height: 64.4
+  larger: ''
+  left: 1551px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-LVI-0-3010-0002
+  top: 310px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                                      '
+    weight: '400'
+  width: 153.4
+611-LVI-0-3010-0003:
+  background_color: rgba(0, 0, 0, 0)
+  decimal: '0'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Laser Output power :                '
+    weight: '400'
+  height: 33.4
+  larger: ''
+  left: 130px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-LVI-0-3010-0003
+  top: 783px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                mW'
+    weight: '400'
+  width: 332.4
+611-LVI-0-3010-0005:
+  background_color: rgba(0, 0, 0, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Laser head temp. :                 '
+    weight: '400'
+  height: 26.4
+  larger: ''
+  left: 130px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-LVI-0-3010-0005
+  top: 822px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                 °C'
+    weight: '400'
+  width: 270.4
+611-RCR-8-0002-0002:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '      '
+    weight: '400'
+  height: 39.4
+  larger: ''
+  left: 856px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0002
+  top: 229px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '      %'
+    weight: '400'
+  width: 164.4
+611-RCR-8-0002-0003:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                                     '
+    weight: '400'
+  height: 34.4
+  larger: ''
+  left: 972px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0003
+  top: 306px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                                     %'
+    weight: '400'
+  width: 152.4
+611-RCR-8-0002-0004:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                                    '
+    weight: '400'
+  height: 35.4
+  larger: ''
+  left: 971px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0004
+  top: 467px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                                    %'
+    weight: '400'
+  width: 166.4
+611-RCR-8-0002-0005:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                                   '
+    weight: '400'
+  height: 26.4
+  larger: ''
+  left: 444px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0005
+  top: 305px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                                   %'
+    weight: '400'
+  width: 164.4
+611-RCR-8-0002-0006:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                                  '
+    weight: '400'
+  height: 24.4
+  larger: ''
+  left: 562px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0006
+  top: 537px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                                  %'
+    weight: '400'
+  width: 164.4
+611-RCR-8-0002-0007:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                                '
+    weight: '400'
+  height: 22.4
+  larger: ''
+  left: 444px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0007
+  top: 468px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                                %'
+    weight: '400'
+  width: 164.4
+611-RCR-8-0002-0008:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                               '
+    weight: '400'
+  height: 44.4
+  larger: ''
+  left: 1278px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0008
+  top: 407px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                               %'
+    weight: '400'
+  width: 164.4
+611-RCR-8-0002-0009:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                              '
+    weight: '400'
+  height: 55.4
+  larger: ''
+  left: 1278px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0009
+  top: 338px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                              %'
+    weight: '400'
+  width: 160.4
+611-RCR-8-0002-0010:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 25
+    title: '                                             '
+    weight: '400'
+  height: 103.4
+  larger: ''
+  left: 1278px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0010
+  top: 481px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                             %'
+    weight: '400'
+  width: 162.4
+611-RCR-8-0002-0011:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 30
+    title: '         '
+    weight: '400'
+  height: 40.4
+  larger: ''
+  left: 211px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0011
+  top: 297px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '         '
+    weight: '400'
+  width: 60.4
+611-RCR-8-0002-0012:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 18
+    title: '                                                        '
+    weight: '400'
+  height: 28.4
+  larger: ''
+  left: 213px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RCR-8-0002-0012
+  top: 474px
+  trend: 'true'
+  type: data
+  unit:
+    size: 30
+    title: '                                                        '
+    weight: '400'
+  width: 144.4
+611-RRC-0-3060-0002:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'CCD Temperature                                    '
+    weight: '700'
+  height: 52.4
+  larger: ''
+  left: 1083px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RRC-0-3060-0002
+  top: 748px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                                    °C'
+    weight: '400'
+  width: 183.4
+611-RRP-0-3040-0002:
+  background_color: rgba(0, 0, 0, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: '20'
+    title: Signal PD1
+    weight: '700'
+  height: 56.4
+  larger: ''
+  left: 1085px
+  lesser: ''
+  linkhtml: 'false'
+  ref: 611-RRP-0-3040-0002
+  top: 873px
+  trend: 'false'
+  type: data
+  unit:
+    size: '20'
+    title: V
+    weight: '400'
+  width: 122.4
+611-RRP-0-3040-0003:
+  background_color: rgba(0, 0, 0, 0)
+  condition: ''
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Signal PD2   '
+    weight: '700'
+  height: 58.4
+  larger: ''
+  left: 1085px
+  lesser: ''
+  linkhtml: 'false'
+  ref: 611-RRP-0-3040-0003
+  top: 935px
+  trend: 'false'
+  type: data
+  unit:
+    size: 20
+    title: '  V'
+    weight: '400'
+  width: 122.4
+611-RRY-0-3030-0002:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Laser Power :                  '
+    weight: '400'
+  height: 24.4
+  larger: ''
+  left: 130px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RRY-0-3030-0002
+  top: 910px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                  mW'
+    weight: '400'
+  width: 272.4
+611-RRY-0-3030-0003:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Beam pos. x :                    '
+    weight: '400'
+  height: 26.4
+  larger: ''
+  left: 129px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RRY-0-3030-0003
+  top: 951px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                    mm'
+    weight: '400'
+  width: 304.4
+611-RRY-0-3030-0004:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Beam pos. y :                   '
+    weight: '400'
+  height: 22.4
+  larger: ''
+  left: 129px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RRY-0-3030-0004
+  top: 992px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                   mm'
+    weight: '400'
+  width: 272.4
+611-RTP-0-4060-0002:
+  background_color: rgba(255, 255, 255, 0)
+  decimal: '2'
+  exponential: 'false'
+  formula: ''
+  header:
+    size: 20
+    title: 'Enclosure temp.                                   '
+    weight: '700'
+  height: 51.4
+  larger: ''
+  left: 1083px
+  lesser: ''
+  linkhtml: 'true'
+  ref: 611-RTP-0-4060-0002
+  top: 812px
+  trend: 'true'
+  type: data
+  unit:
+    size: 20
+    title: '                                   °C'
+    weight: '400'
+  width: 183.4
+header_laser:
+  background_color: rgba(255, 255, 255, 0)
+  header:
+    size: 20
+    title: 'Laser                           '
+    weight: '700'
+  height: 24.4
+  left: 130px
+  top: 743px
+  type: header
+  width: 50.4
+header_laser-power-meter:
+  background_color: rgba(255, 255, 255, 0)
+  header:
+    size: 20
+    title: 'Laser power meter                        '
+    weight: '700'
+  height: 24.4
+  left: 129px
+  top: 870.333px
+  type: header
+  width: 204.4

+ 3 - 0
trigger.sh

@@ -0,0 +1,3 @@
+# This is a manual trigger to the CPS pod at the OpenShift platform.
+# Only run this when the webhook is not working.
+curl -X POST -k https://kaas.kit.edu:8443/oapi/v1/namespaces/bora/buildconfigs/cps/webhooks/<SECRET>/generic

+ 27 - 0
varname.yaml

@@ -0,0 +1,27 @@
+611-HCL-5-3012-0002: db_server=lara&db_name=611_LARA&db_group=WaterChiller&db_mask=1
+611-HCL-5-3012-0003: db_server=lara&db_name=611_LARA&db_group=WaterChiller&db_mask=2
+611-HCL-5-3012-0005: db_server=lara&db_name=611_LARA&db_group=WaterChiller&db_mask=4
+611-HCL-5-3012-0006: db_server=lara&db_name=611_LARA&db_group=WaterChiller&db_mask=5
+611-HCL-5-3012-0007: db_server=lara&db_name=611_LARA&db_group=WaterChiller&db_mask=6
+611-HCL-5-3012-0008: db_server=lara&db_name=611_LARA&db_group=WaterChiller&db_mask=7
+611-LVI-0-3010-0002: db_server=lara&db_name=611_LARA&db_group=Laser&db_mask=1
+611-LVI-0-3010-0003: db_server=lara&db_name=611_LARA&db_group=Laser&db_mask=2
+611-LVI-0-3010-0005: db_server=lara&db_name=611_LARA&db_group=Laser&db_mask=4
+611-RCR-8-0002-0002: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=1
+611-RCR-8-0002-0003: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=2
+611-RCR-8-0002-0004: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=3
+611-RCR-8-0002-0005: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=4
+611-RCR-8-0002-0006: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=5
+611-RCR-8-0002-0007: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=6
+611-RCR-8-0002-0008: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=7
+611-RCR-8-0002-0009: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=8
+611-RCR-8-0002-0010: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=9
+611-RCR-8-0002-0011: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=10
+611-RCR-8-0002-0012: db_server=lara&db_name=611_LARA&db_group=WGTSGas&db_mask=11
+611-RRC-0-3060-0002: db_server=lara&db_name=611_LARA&db_group=CCDCamera&db_mask=1
+611-RRP-0-3040-0002: db_server=lara&db_name=611_LARA&db_group=PhotoDiodes&db_mask=1
+611-RRP-0-3040-0003: db_server=lara&db_name=611_LARA&db_group=PhotoDiodes&db_mask=2
+611-RRY-0-3030-0002: db_server=lara&db_name=611_LARA&db_group=LaserPower&db_mask=1
+611-RRY-0-3030-0003: db_server=lara&db_name=611_LARA&db_group=LaserPower&db_mask=2
+611-RRY-0-3030-0004: db_server=lara&db_name=611_LARA&db_group=LaserPower&db_mask=3
+611-RTP-0-4060-0002: db_server=lara&db_name=611_LARA&db_group=Pt100&db_mask=1