Преглед на файлове

Adds setup routine

This commit add install routine.
Therefore the program has been modified to work as a module and was thus
moved into a subfolder.
Patrick Schreiber преди 8 години
родител
ревизия
7988500ae6
променени са 100 файла, в които са добавени 50 реда и са изтрити 84 реда
  1. 0 38
      .kcf
  2. 0 0
      KCG/Documentation/Makefile
  3. 0 0
      KCG/Documentation/source/Dev/_static/example_widget.png
  4. 0 0
      KCG/Documentation/source/Dev/backendinterface.rst
  5. 0 0
      KCG/Documentation/source/Dev/groupedelements.rst
  6. 0 0
      KCG/Documentation/source/Dev/index.rst
  7. 0 0
      KCG/Documentation/source/Dev/kcgwidget.rst
  8. 0 0
      KCG/Documentation/source/Dev/multiWidget.rst
  9. 0 0
      KCG/Documentation/source/Dev/settings.rst
  10. 0 0
      KCG/Documentation/source/Dev/widgets.rst
  11. 0 0
      KCG/Documentation/source/Makefile
  12. 0 0
      KCG/Documentation/source/Man/_static/.directory
  13. 0 0
      KCG/Documentation/source/Man/_static/AcquireSettings.png
  14. 0 0
      KCG/Documentation/source/Man/_static/BitsTableView.png
  15. 0 0
      KCG/Documentation/source/Man/_static/Controlwidget.png
  16. 0 0
      KCG/Documentation/source/Man/_static/Controlwidget_Prepared.png
  17. 0 0
      KCG/Documentation/source/Man/_static/Controlwidget_buttons.png
  18. 0 0
      KCG/Documentation/source/Man/_static/Controlwidget_buttons.xcf
  19. 0 0
      KCG/Documentation/source/Man/_static/MultiView.png
  20. 0 0
      KCG/Documentation/source/Man/_static/MultiViewFile.png
  21. 0 0
      KCG/Documentation/source/Man/_static/MultiViewFilePlot.png
  22. 0 0
      KCG/Documentation/source/Man/_static/MultiViewFilePlotWindow.png
  23. 0 0
      KCG/Documentation/source/Man/_static/MultiViewGetThere.png
  24. 0 0
      KCG/Documentation/source/Man/_static/MultiViewLive.png
  25. 0 0
      KCG/Documentation/source/Man/_static/MultiViewLivePlot.png
  26. 0 0
      KCG/Documentation/source/Man/_static/NewPlotQuestion.png
  27. 0 0
      KCG/Documentation/source/Man/_static/Sessionname.png
  28. 0 0
      KCG/Documentation/source/Man/_static/Settings.png
  29. 0 0
      KCG/Documentation/source/Man/_static/SingleAndContinuousRead.png
  30. 0 0
      KCG/Documentation/source/Man/_static/TimeScanResult.png
  31. 0 0
      KCG/Documentation/source/Man/_static/TimingWidget.png
  32. 0 0
      KCG/Documentation/source/Man/_static/TimingWidgetTimeScan.png
  33. 0 0
      KCG/Documentation/source/Man/_static/clock.png
  34. 0 0
      KCG/Documentation/source/Man/_static/folder.png
  35. 0 0
      KCG/Documentation/source/Man/_static/graph.png
  36. 0 0
      KCG/Documentation/source/Man/_static/project.png
  37. 0 0
      KCG/Documentation/source/Man/_static/wrench.png
  38. 0 0
      KCG/Documentation/source/Man/acquisition.rst
  39. 0 0
      KCG/Documentation/source/Man/config.rst
  40. 0 0
      KCG/Documentation/source/Man/index.rst
  41. 0 0
      KCG/Documentation/source/Man/overview.rst
  42. 0 0
      KCG/Documentation/source/Man/plots.rst
  43. 0 0
      KCG/Documentation/source/Man/settings.rst
  44. 0 0
      KCG/Documentation/source/Man/singleandcontinuousread.rst
  45. 0 0
      KCG/Documentation/source/Man/timing.rst
  46. 0 0
      KCG/Documentation/source/Requirements.rst
  47. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/__init__.py
  48. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/breadcrumbs.html
  49. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/footer.html
  50. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/layout.html
  51. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/layout_old.html
  52. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/search.html
  53. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/searchbox.html
  54. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/css/badge_only.css
  55. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/css/theme.css
  56. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf
  57. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Inconsolata.ttf
  58. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Lato-Bold.ttf
  59. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Lato-Regular.ttf
  60. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.ttf
  61. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.ttf
  62. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot
  63. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg
  64. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf
  65. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff
  66. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/js/modernizr.min.js
  67. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/static/js/theme.js
  68. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/theme.conf
  69. 0 0
      KCG/Documentation/source/_themes/sphinx_rtd_theme/versions.html
  70. 0 0
      KCG/Documentation/source/conf.py
  71. 0 0
      KCG/Documentation/source/index.rst
  72. 0 0
      KCG/Documentation/svg_png.sh
  73. 0 0
      KCG/VERSION
  74. 0 0
      KCG/__init__.py
  75. 0 0
      KCG/base/__init__.py
  76. 0 0
      KCG/base/backend/__init__.py
  77. 3 3
      KCG/base/backend/board.py
  78. 1 1
      KCG/base/backend/dataset.py
  79. 2 2
      KCG/base/backend/io.py
  80. 3 3
      KCG/base/backendinterface.py
  81. 0 0
      KCG/base/bitsTable.py
  82. 3 2
      KCG/base/controlwidget.py
  83. 0 0
      KCG/base/groupedelements.py
  84. 14 13
      KCG/base/kcg.py
  85. 3 2
      KCG/base/kcgwidget.py
  86. 5 5
      KCG/base/leftbar.py
  87. 3 3
      KCG/base/log.py
  88. 3 3
      KCG/base/multiWidget.py
  89. 7 6
      KCG/base/multipage.py
  90. 0 0
      KCG/base/plotWidget.py
  91. 3 3
      KCG/base/settings.py
  92. 0 0
      KCG/base/storage.py
  93. 0 0
      KCG/base/test_groupedObjects.py
  94. 0 0
      KCG/config.py
  95. 0 0
      KCG/icons/ICON-LICENSE
  96. 0 0
      KCG/icons/K.png
  97. 0 0
      KCG/icons/K.svg
  98. 0 0
      KCG/icons/KCG_Logo.png
  99. 0 0
      KCG/icons/KCG_Logo_r.png
  100. 0 0
      KCG/icons/SwitchButtonLeft.png

+ 0 - 38
.kcf

@@ -1,38 +0,0 @@
-#
-#     HEB   (Hot Electron Bolometer) Configuration file
-#
-#  (c) Karlsruhe Institute of Technology, 2014
-#  All rights reserved.
-#
-#  Applicable Firmware Version(s):
-#
-
-[Config]
-chip_delay_factor = 3
-th_delay = 3
-header = True
-adc_3_delay = 4
-chip_1_delay = 4
-th_to_adc_cycles = 7
-adc_delay_factor = 150
-fpga_delay_factor = 150
-fpga_delay_max = 15
-adc_1_delay_individual = -1
-adc_4_delay = 4
-chip_3_delay = 4
-th_delay_factor = 150
-adc_2_delay = 4
-orbits_skip = 2
-chip_2_delay = 4
-chip_4_delay = 4
-orbits_count = 10
-th_delay_max = 15
-fpga_delay = 0
-pilot_bunch = False
-adc_delay_max = 15
-orbits_observe = 100
-orbits_wait_time = 15
-chip_delay_max = 31
-adc_1_delay = 4
-build_spectrograms = False
-

+ 0 - 0
Documentation/Makefile → KCG/Documentation/Makefile


+ 0 - 0
Documentation/source/Dev/_static/example_widget.png → KCG/Documentation/source/Dev/_static/example_widget.png


+ 0 - 0
Documentation/source/Dev/backendinterface.rst → KCG/Documentation/source/Dev/backendinterface.rst


+ 0 - 0
Documentation/source/Dev/groupedelements.rst → KCG/Documentation/source/Dev/groupedelements.rst


+ 0 - 0
Documentation/source/Dev/index.rst → KCG/Documentation/source/Dev/index.rst


+ 0 - 0
Documentation/source/Dev/kcgwidget.rst → KCG/Documentation/source/Dev/kcgwidget.rst


+ 0 - 0
Documentation/source/Dev/multiWidget.rst → KCG/Documentation/source/Dev/multiWidget.rst


+ 0 - 0
Documentation/source/Dev/settings.rst → KCG/Documentation/source/Dev/settings.rst


+ 0 - 0
Documentation/source/Dev/widgets.rst → KCG/Documentation/source/Dev/widgets.rst


+ 0 - 0
Documentation/source/Makefile → KCG/Documentation/source/Makefile


+ 0 - 0
Documentation/source/Man/_static/.directory → KCG/Documentation/source/Man/_static/.directory


+ 0 - 0
Documentation/source/Man/_static/AcquireSettings.png → KCG/Documentation/source/Man/_static/AcquireSettings.png


+ 0 - 0
Documentation/source/Man/_static/BitsTableView.png → KCG/Documentation/source/Man/_static/BitsTableView.png


+ 0 - 0
Documentation/source/Man/_static/Controlwidget.png → KCG/Documentation/source/Man/_static/Controlwidget.png


+ 0 - 0
Documentation/source/Man/_static/Controlwidget_Prepared.png → KCG/Documentation/source/Man/_static/Controlwidget_Prepared.png


+ 0 - 0
Documentation/source/Man/_static/Controlwidget_buttons.png → KCG/Documentation/source/Man/_static/Controlwidget_buttons.png


+ 0 - 0
Documentation/source/Man/_static/Controlwidget_buttons.xcf → KCG/Documentation/source/Man/_static/Controlwidget_buttons.xcf


+ 0 - 0
Documentation/source/Man/_static/MultiView.png → KCG/Documentation/source/Man/_static/MultiView.png


+ 0 - 0
Documentation/source/Man/_static/MultiViewFile.png → KCG/Documentation/source/Man/_static/MultiViewFile.png


+ 0 - 0
Documentation/source/Man/_static/MultiViewFilePlot.png → KCG/Documentation/source/Man/_static/MultiViewFilePlot.png


+ 0 - 0
Documentation/source/Man/_static/MultiViewFilePlotWindow.png → KCG/Documentation/source/Man/_static/MultiViewFilePlotWindow.png


+ 0 - 0
Documentation/source/Man/_static/MultiViewGetThere.png → KCG/Documentation/source/Man/_static/MultiViewGetThere.png


+ 0 - 0
Documentation/source/Man/_static/MultiViewLive.png → KCG/Documentation/source/Man/_static/MultiViewLive.png


+ 0 - 0
Documentation/source/Man/_static/MultiViewLivePlot.png → KCG/Documentation/source/Man/_static/MultiViewLivePlot.png


+ 0 - 0
Documentation/source/Man/_static/NewPlotQuestion.png → KCG/Documentation/source/Man/_static/NewPlotQuestion.png


+ 0 - 0
Documentation/source/Man/_static/Sessionname.png → KCG/Documentation/source/Man/_static/Sessionname.png


+ 0 - 0
Documentation/source/Man/_static/Settings.png → KCG/Documentation/source/Man/_static/Settings.png


+ 0 - 0
Documentation/source/Man/_static/SingleAndContinuousRead.png → KCG/Documentation/source/Man/_static/SingleAndContinuousRead.png


+ 0 - 0
Documentation/source/Man/_static/TimeScanResult.png → KCG/Documentation/source/Man/_static/TimeScanResult.png


+ 0 - 0
Documentation/source/Man/_static/TimingWidget.png → KCG/Documentation/source/Man/_static/TimingWidget.png


+ 0 - 0
Documentation/source/Man/_static/TimingWidgetTimeScan.png → KCG/Documentation/source/Man/_static/TimingWidgetTimeScan.png


+ 0 - 0
Documentation/source/Man/_static/clock.png → KCG/Documentation/source/Man/_static/clock.png


+ 0 - 0
Documentation/source/Man/_static/folder.png → KCG/Documentation/source/Man/_static/folder.png


+ 0 - 0
Documentation/source/Man/_static/graph.png → KCG/Documentation/source/Man/_static/graph.png


+ 0 - 0
Documentation/source/Man/_static/project.png → KCG/Documentation/source/Man/_static/project.png


+ 0 - 0
Documentation/source/Man/_static/wrench.png → KCG/Documentation/source/Man/_static/wrench.png


+ 0 - 0
Documentation/source/Man/acquisition.rst → KCG/Documentation/source/Man/acquisition.rst


+ 0 - 0
Documentation/source/Man/config.rst → KCG/Documentation/source/Man/config.rst


+ 0 - 0
Documentation/source/Man/index.rst → KCG/Documentation/source/Man/index.rst


+ 0 - 0
Documentation/source/Man/overview.rst → KCG/Documentation/source/Man/overview.rst


+ 0 - 0
Documentation/source/Man/plots.rst → KCG/Documentation/source/Man/plots.rst


+ 0 - 0
Documentation/source/Man/settings.rst → KCG/Documentation/source/Man/settings.rst


+ 0 - 0
Documentation/source/Man/singleandcontinuousread.rst → KCG/Documentation/source/Man/singleandcontinuousread.rst


+ 0 - 0
Documentation/source/Man/timing.rst → KCG/Documentation/source/Man/timing.rst


+ 0 - 0
Documentation/source/Requirements.rst → KCG/Documentation/source/Requirements.rst


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/__init__.py → KCG/Documentation/source/_themes/sphinx_rtd_theme/__init__.py


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/breadcrumbs.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/breadcrumbs.html


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/footer.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/footer.html


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/layout.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/layout.html


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/layout_old.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/layout_old.html


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/search.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/search.html


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/searchbox.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/searchbox.html


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/css/badge_only.css → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/css/badge_only.css


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/css/theme.css → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/css/theme.css


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Inconsolata.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Inconsolata.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Lato-Bold.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Lato-Bold.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Lato-Regular.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/Lato-Regular.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/js/modernizr.min.js → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/js/modernizr.min.js


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/static/js/theme.js → KCG/Documentation/source/_themes/sphinx_rtd_theme/static/js/theme.js


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/theme.conf → KCG/Documentation/source/_themes/sphinx_rtd_theme/theme.conf


+ 0 - 0
Documentation/source/_themes/sphinx_rtd_theme/versions.html → KCG/Documentation/source/_themes/sphinx_rtd_theme/versions.html


+ 0 - 0
Documentation/source/conf.py → KCG/Documentation/source/conf.py


+ 0 - 0
Documentation/source/index.rst → KCG/Documentation/source/index.rst


+ 0 - 0
Documentation/svg_png.sh → KCG/Documentation/svg_png.sh


+ 0 - 0
VERSION → KCG/VERSION


+ 0 - 0
__init__.py → KCG/__init__.py


+ 0 - 0
base/__init__.py → KCG/base/__init__.py


+ 0 - 0
base/backend/__init__.py → KCG/base/backend/__init__.py


+ 3 - 3
base/backend/board.py → KCG/base/backend/board.py

@@ -5,7 +5,7 @@ import subprocess
 import ConfigParser
 import numpy as np
 import socket
-import config as kcg_config
+from ... import config as kcg_config
 
 log = logging.getLogger(__name__)
 
@@ -538,8 +538,8 @@ def acquire_data(filename, simulate=False):
 
 
 def wait_for_revolutions():
-    n = read_pci(1, '0x9020', decimal=True)[0]  # Get the amount of orbits to observe
-    # n = 1 # Use this for debugging purposes if no board is connected
+    # n = read_pci(1, '0x9020', decimal=True)[0]  # Get the amount of orbits to observe
+    n = 1 # Use this for debugging purposes if no board is connected
     spin_time_ns = kcg_config.tRev * n
     time.sleep(spin_time_ns * 1.4)  # 40% Safety margin
 

+ 1 - 1
base/backend/dataset.py → KCG/base/backend/dataset.py

@@ -4,7 +4,7 @@ import time
 import numpy as np
 from numpy.polynomial.polynomial import polyval
 
-import config
+from ... import config
 
 
 def _pad_array(array):

+ 2 - 2
base/backend/io.py → KCG/base/backend/io.py

@@ -4,7 +4,7 @@ import logging
 
 import numpy as np
 
-from config import bunches_per_turn as BUNCHES_PER_TURN
+from ...config import bunches_per_turn as BUNCHES_PER_TURN
 from board import HEADER_SIZE_BYTES
 from dataset import DataSet
 import board
@@ -134,4 +134,4 @@ def read_from_string(raw_data, force=False, header=False, cache=False, cache_fil
         logging.info('Saving pre-computed data')
         np.save('{}.npy'.format(cache_filename), result)
 
-    return dataset
+    return dataset

+ 3 - 3
base/backendinterface.py → KCG/base/backendinterface.py

@@ -18,7 +18,7 @@ from backend import io
 from backend import dataset
 from groupedelements import Checkboxes, Buttons, Elements, live_plot_windows
 import storage
-import config
+from .. import config
 import kcgwidget as kcgw
 from log import log
 
@@ -833,7 +833,7 @@ def _bif_stop_acquisition():
     board.acquisition_progressbar.remove(0)
     board.acquisition_timer.stop()
     for elem in Elements.getElements("acquireTrigger"):
-        elem.setIcon(QtGui.QIcon(config.startIcon))
+        elem.setIcon(QtGui.QIcon(config.install_path + config.startIcon))
         elem.setText(tr("Button", "Start Acquisition"))
     # self.continuous_read_checkbox.setEnabled(True)
     # self.acquisition_progressbar.reset()
@@ -850,7 +850,7 @@ def _bif_start_acquisition():
     board.status.acquisition = True
     Elements.setEnabled('acquire', False)
     for elem in Elements.getElements("acquireTrigger"):
-        elem.setIcon(QtGui.QIcon(config.stopIcon))
+        elem.setIcon(QtGui.QIcon(config.install_path + config.stopIcon))
         elem.setText(tr("Button", "Stop Acquisition"))
     board.acquisition_timer = QtCore.QTimer()
     num_acquisitions = board.config.get("orbits_count")

+ 0 - 0
base/bitsTable.py → KCG/base/bitsTable.py


+ 3 - 2
base/controlwidget.py → KCG/base/controlwidget.py

@@ -10,6 +10,7 @@ from backend import board
 from groupedelements import Checkboxes, Buttons, Elements
 import backendinterface as bif
 import storage
+from .. import config
 
 tr = kcgw.tr
 
@@ -224,7 +225,7 @@ class ControlWidget(kcgw.KCGWidgets):
 
         self.layout.addLayout(self.gridLayout)
         self.layout.addStretch(1)
-        self.layout.addWidget(self.createLabel(image=QtGui.QPixmap("style/KAPTURE.jpg")))
+        self.layout.addWidget(self.createLabel(image=QtGui.QPixmap(config.install_path+"style/KAPTURE.jpg")))
         self.log_area = QtGui.QTextEdit()
         self.log_area.setReadOnly(True)
         self.overlayout.addWidget(self.log_area)
@@ -332,4 +333,4 @@ class ControlWidget(kcgw.KCGWidgets):
 
         except IndexError:
             QtGui.QMessageBox.critical(self, "Status Update Error", "Not enough registers given for status update.")
-            return
+            return

+ 0 - 0
base/groupedelements.py → KCG/base/groupedelements.py


+ 14 - 13
base/kcg.py → KCG/base/kcg.py

@@ -15,19 +15,20 @@ from multiWidget import MultiWidget
 from groupedelements import MenuItems, Elements
 from multipage import MultiPage
 import bitsTable as bt
-from base import log
+import log
 # ---------[ Widgets IMPORTANT!!! ]------------------
 # this enables widgets. If this is not imported (even though it is not directly used) no widgets will be available
-from widgets import *
+from ..widgets import *
 # from widgets import *  # copy in case the above line gets removed by ide
 # ---------[ IMPORTANT ]---------------------
 
 tr = kcgw.tr
 
-import config
+from .. import config
 import time
 import getpass
 
+
 Elements.setFlags({'autoremove': True, 'warn': True, 'exception_on_deleted': False})
 
 def readconfig(parent):
@@ -39,9 +40,9 @@ def readconfig(parent):
     """
 
     nec_conf = ['acquireSettingsIcon', 'bunches_per_turn', 'default_log_entries', 'default_save_location', 'default_subdirectory_name',
-                 'epics_base_path', 'epics_log_entry_pvs', 'force_ask', 'guiIcon', 'language', 'logCommentIcon', 'logIcon',
-                 'newPlotDataIcon', 'newPlotLiveIcon', 'save_header', 'show_advanced_control', 'singleReadIcon', 'startIcon',
-                 'stopIcon', 'style', 'tRev', 'timingIcon', 'epics_test_pv']
+                 'epics_base_path', 'epics_log_entry_pvs', 'epics_test_pv', 'force_ask', 'guiIcon', 'language', 'logCommentIcon',
+                 'logIcon', 'newPlotDataIcon', 'newPlotLiveIcon', 'save_header', 'show_advanced_control', 'singleReadIcon', 'startIcon',
+                 'stopIcon', 'style', 'tRev', 'timingIcon']
     missing_conf = []
     for c in nec_conf:
         if c not in dir(config):
@@ -171,7 +172,7 @@ class Gui(QtGui.QMainWindow):
         :return: -
         """
         self.setWindowTitle("KCG - Kapture Control Gui")
-        self.setWindowIcon(QtGui.QIcon(config.guiIcon))
+        self.setWindowIcon(QtGui.QIcon(config.install_path + config.guiIcon))
 
         self.statusbar.showMessage(board.status.status_text)
 
@@ -195,10 +196,10 @@ class Gui(QtGui.QMainWindow):
         """
         self.populate_storage()
 
-        with open("style/style.css") as f:
+        with open(config.install_path+"style/style.css") as f:
             styleSheet = f.read()
         if config.style == 'blue':
-            with open('style/blue.css') as f:
+            with open(config.install_path+'style/blue.css') as f:
                 styleSheet += f.read()
         self.setStyleSheet(styleSheet)
 
@@ -244,18 +245,18 @@ class Gui(QtGui.QMainWindow):
         self.saveConfigAction = self.fileMenu.addAction(tr("Button", "Save Board Configuration"), self.saveConfig)
         self.saveConfigAction = self.fileMenu.addAction(tr("Button", "Load Board Configuration"), self.loadConfig)
         self.settingsAction = self.fileMenu.addAction(tr("Button", "Settings"), self.showSettings, "Ctrl+P")
-        self.quitAction = self.fileMenu.addAction(QtGui.QIcon("icons/exit.png"), tr("Button", "Quit"), self.close, "Ctrl+Q")
+        self.quitAction = self.fileMenu.addAction(QtGui.QIcon(config.install_path + "icons/exit.png"), tr("Button", "Quit"), self.close, "Ctrl+Q")
         self.menu.setCornerWidget(self.cw.pagesWidget.leftright)
 
         # ----------[ Page specific Menu Entries ]-------------
         self.multiMenu = self.menu.addMenu("&"+tr("Button", "Windows"))
         MenuItems.addMenuItem(_MultiView_Name_, self.multiMenu)
-        self.plotAction = self.multiMenu.addAction(QtGui.QIcon(config.newPlotLiveIcon), tr("Button", "New Plot"), self.cw.mainMultiWidget.leftBar.add_plot)
+        self.plotAction = self.multiMenu.addAction(QtGui.QIcon(config.install_path + config.newPlotLiveIcon), tr("Button", "New Plot"), self.cw.mainMultiWidget.leftBar.add_plot)
         self.addWindowMenuEntries()
 
         self.acquireMenu = self.menu.addMenu("&"+tr("Button", "Acquire"))
         MenuItems.addMenuItem(_MultiView_Name_, self.acquireMenu)
-        self.startAcquisitionAction = self.acquireMenu.addAction(QtGui.QIcon(config.startIcon), tr("Button", "Start Acquisition"), bif.bk_acquire)
+        self.startAcquisitionAction = self.acquireMenu.addAction(QtGui.QIcon(config.install_path + config.startIcon), tr("Button", "Start Acquisition"), bif.bk_acquire)
         self.startAcquisitionAction.setObjectName("start_acquisition_action")
 
         MenuItems.addMenuItem("continuous_read", self.startAcquisitionAction)
@@ -267,7 +268,7 @@ class Gui(QtGui.QMainWindow):
 
         self.help = self.menu.addMenu("&"+tr("Button", "Help"))
         import webbrowser
-        self.help.addAction(tr("Button", "Open Manual"), lambda: webbrowser.open("Documentation/build/html/index.html"))
+        self.help.addAction(tr("Button", "Open Manual"), lambda: webbrowser.open(config.install_path + "Documentation/build/html/index.html"))
         self.help.addAction(tr("Button", "About"), self.showAbout)
 
     def saveConfig(self):

+ 3 - 2
base/kcgwidget.py → KCG/base/kcgwidget.py

@@ -3,6 +3,7 @@ Base Classes used in KCG.
 This module also contains various helpful Classes to make live easier ;)
 """
 from PyQt4 import QtGui, QtCore, QtSvg
+from .. import config
 
 
 def tr(_, x):
@@ -59,9 +60,9 @@ class switchLabel(QtGui.QLabel):
         :return: -
         """
         super(switchLabel, self).__init__()
-        self.leftSwitch = QtGui.QPixmap("icons/SwitchButtonLeft.png")
+        self.leftSwitch = QtGui.QPixmap(config.install_path+"icons/SwitchButtonLeft.png")
         self.leftSwitch = self.leftSwitch.scaled(40, 20, transformMode=QtCore.Qt.SmoothTransformation)
-        self.rightSwitch = QtGui.QPixmap("icons/SwitchButtonRight.png")
+        self.rightSwitch = QtGui.QPixmap(config.install_path+"icons/SwitchButtonRight.png")
         self.rightSwitch = self.rightSwitch.scaled(40, 20, transformMode=QtCore.Qt.SmoothTransformation)
         if startRight:
             self.setPixmap(self.rightSwitch)

+ 5 - 5
base/leftbar.py → KCG/base/leftbar.py

@@ -6,7 +6,7 @@ from plotWidget import PlotWidget
 from backend import board
 from backend import io
 import storage
-import widgets.acquiresettings as acqs
+from ..widgets import acquiresettings as acqs
 from groupedelements import Buttons, Elements
 import backendinterface as bif
 import log
@@ -14,7 +14,7 @@ import log
 
 tr = kcgw.tr
 
-import config
+from .. import config
 
 LIVE = 1
 FILE = 2
@@ -63,10 +63,10 @@ class AcquisitionAndInfo(kcgw.KCGWidgets):
             connect=acqs.addAcquireSettingsWidgets
         )
         board.config.observe(self.orbitswait, lambda x: self.orbitswait.setText(tr("Label", "T_wait:")+ " " + str(x)), 'orbits_wait_time')
-        self.acquire = self.createButton(tr("Button", "Start Acquisition"), icon=QtGui.QIcon(config.startIcon), connect=bif.bk_acquire)
+        self.acquire = self.createButton(tr("Button", "Start Acquisition"), icon=QtGui.QIcon(config.install_path + config.startIcon), connect=bif.bk_acquire)
 
-        self.log = self.createButton(tr("Button", "Log"), icon=QtGui.QIcon(config.logIcon), connect=lambda: log.log(additional="Manual Log"), tooltip="Rightclick to Configure")
-        self.log_w_comment = self.createButton(tr("Button", "Log"), icon=QtGui.QIcon(config.logCommentIcon), connect=self.do_log_w_comment, tooltip="Log with Comment\nRightclick to Configure")
+        self.log = self.createButton(tr("Button", "Log"), icon=QtGui.QIcon(config.install_path + config.logIcon), connect=lambda: log.log(additional="Manual Log"), tooltip="Rightclick to Configure")
+        self.log_w_comment = self.createButton(tr("Button", "Log"), icon=QtGui.QIcon(config.install_path + config.logCommentIcon), connect=self.do_log_w_comment, tooltip="Log with Comment\nRightclick to Configure")
         self.log.contextMenuEvent = self.log_configure_context_menu
         self.log_w_comment.contextMenuEvent = self.log_configure_context_menu
 

+ 3 - 3
base/log.py → KCG/base/log.py

@@ -5,10 +5,10 @@ This is a custom logfile creation module
 import datetime
 from PyQt4 import QtGui, QtCore
 import kcgwidget as kcgw
-from base.backend import board
+from backend import board
 import numpy as np
 import codecs
-import config
+from .. import config
 import storage
 import logging
 try:
@@ -191,7 +191,7 @@ class ConfigureLog(QtGui.QDialog):
         super(ConfigureLog, self).__init__()
 
         self.setWindowTitle("Configure Measurement Log Entries")
-        self.setWindowIcon(QtGui.QIcon(config.guiIcon))
+        self.setWindowIcon(QtGui.QIcon(config.install_path + config.guiIcon))
 
         self.sl = QtGui.QVBoxLayout()
         self.setLayout(self.sl)

+ 3 - 3
base/multiWidget.py → KCG/base/multiWidget.py

@@ -3,7 +3,7 @@ from PyQt4 import QtGui, QtCore
 import kcgwidget as kcgw
 from leftbar import LeftBar
 import leftbar
-import config
+from .. import config
 
 tr = kcgw.tr
 
@@ -67,13 +67,13 @@ class MultiWidget(QtGui.QWidget):
         kcgw.area = self.area
 
         # --------[ ToolBar ]--------
-        self.new_live_action = QtGui.QAction(QtGui.QIcon(config.newPlotLiveIcon), tr("Button", "New Live Plot"), self)
+        self.new_live_action = QtGui.QAction(QtGui.QIcon(config.install_path + config.newPlotLiveIcon), tr("Button", "New Live Plot"), self)
         self.new_live_action.setShortcut("Ctrl+L")
         self.toolbar.addAction(self.new_live_action)
         self.new_live_action.triggered.connect(lambda: self.leftBar.add_plot(leftbar.LIVE))
         self.new_live_action.setToolTip(tr("Button", "New Live Plot") + "\n(Ctrl+L)")
 
-        self.new_data_action = QtGui.QAction(QtGui.QIcon(config.newPlotDataIcon), tr("Button", "New Data Plot"), self)
+        self.new_data_action = QtGui.QAction(QtGui.QIcon(config.install_path + config.newPlotDataIcon), tr("Button", "New Data Plot"), self)
         self.new_data_action.setShortcut("Ctrl+D")
         self.toolbar.addAction(self.new_data_action)
         self.new_data_action.triggered.connect(lambda: self.leftBar.add_plot(leftbar.FILE))

+ 7 - 6
base/multipage.py → KCG/base/multipage.py

@@ -1,6 +1,7 @@
 from PyQt4 import QtGui, QtCore
 from groupedelements import Elements, MenuItems
 import kcgwidget as kcgw
+from .. import config
 
 class RightSwitch(kcgw.ClickableSVG):
     """
@@ -16,7 +17,7 @@ class RightSwitch(kcgw.ClickableSVG):
         :param hidden: (bool) whether this switch is shown or hidden
         :return: -
         """
-        super(RightSwitch, self).__init__("icons/chevron-right.svg", width, height, wwidth)
+        super(RightSwitch, self).__init__(config.install_path+"icons/chevron-right.svg", width, height, wwidth)
         self.setObjectName("right_switch")
         if not hidden:
             self.show()
@@ -37,7 +38,7 @@ class LeftSwitch(kcgw.ClickableSVG):
         :param hidden: (bool) whether this switch is shown or hidden
         :return: -
         """
-        super(LeftSwitch, self).__init__("icons/chevron-left.svg", width, height, wwidth)
+        super(LeftSwitch, self).__init__(config.install_path+"icons/chevron-left.svg", width, height, wwidth)
         self.setObjectName("left_switch")
         if not hidden:
             self.show()
@@ -69,14 +70,14 @@ class LeftRightSwitch(QtGui.QWidget):
         """
         # self.left.setStyleSheet("border-radius: 4px; background-color: lightgrey;")
         self.left.setStyleSheet("#leftright:hover { background-color: none;}")
-        self.left.changeSvg("icons/grey/chevron-left.svg")
+        self.left.changeSvg(config.install_path+"icons/grey/chevron-left.svg")
     def enable_left(self):
         """
         Enable the switch to the page left of the current one
         :return: -
         """
         self.left.setStyleSheet("")
-        self.left.changeSvg("icons/chevron-left.svg")
+        self.left.changeSvg(config.install_path+"icons/chevron-left.svg")
     def disable_right(self):
         """
         Disable the switch to the page right of the current one
@@ -84,14 +85,14 @@ class LeftRightSwitch(QtGui.QWidget):
         """
         # self.right.setStyleSheet("border-radius: 4px; background-color: lightgrey;")
         self.right.setStyleSheet("#leftright:hover { background-color: none;}")
-        self.right.changeSvg("icons/grey/chevron-right.svg")
+        self.right.changeSvg(config.install_path+"icons/grey/chevron-right.svg")
     def enable_right(self):
         """
         Enable the switch to the page right of the current one
         :return: -
         """
         self.right.setStyleSheet("")
-        self.right.changeSvg("icons/chevron-right.svg")
+        self.right.changeSvg(config.install_path+"icons/chevron-right.svg")
 
 
 class MultiPage(QtGui.QStackedWidget):

+ 0 - 0
base/plotWidget.py → KCG/base/plotWidget.py


+ 3 - 3
base/settings.py → KCG/base/settings.py

@@ -1,7 +1,7 @@
 from PyQt4 import QtGui, QtCore
 
 import kcgwidget as kcgw
-import config
+from .. import config
 
 tr = kcgw.tr
 
@@ -69,7 +69,7 @@ class Settings(kcgw.KCGWidgets):
         self.hbox.addWidget(self.applyButton)
         self.hbox.addWidget(self.cancelButton)
         self.setWindowTitle(tr("Heading", "KCG - Settings"))
-        self.setWindowIcon(QtGui.QIcon(config.guiIcon))
+        self.setWindowIcon(QtGui.QIcon(config.install_path + config.guiIcon))
 
     def build_new_setting(self, handle, value):
         """
@@ -122,4 +122,4 @@ class Settings(kcgw.KCGWidgets):
 
     def keyPressEvent(self, QKeyEvent):
         if QKeyEvent.key() == QtCore.Qt.Key_Escape:
-            self.close()
+            self.close()

+ 0 - 0
base/storage.py → KCG/base/storage.py


+ 0 - 0
base/test_groupedObjects.py → KCG/base/test_groupedObjects.py


+ 0 - 0
config.py → KCG/config.py


+ 0 - 0
icons/ICON-LICENSE → KCG/icons/ICON-LICENSE


+ 0 - 0
icons/K.png → KCG/icons/K.png


+ 0 - 0
icons/K.svg → KCG/icons/K.svg


+ 0 - 0
icons/KCG_Logo.png → KCG/icons/KCG_Logo.png


+ 0 - 0
icons/KCG_Logo_r.png → KCG/icons/KCG_Logo_r.png


+ 0 - 0
icons/SwitchButtonLeft.png → KCG/icons/SwitchButtonLeft.png


Някои файлове не бяха показани, защото твърде много файлове са промени