Skip to content

Commit

Permalink
Merge pull request #2 from SarthakJariwala/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ltaing27 authored Aug 22, 2019
2 parents 87732af + e2f3e9a commit 670352d
Show file tree
Hide file tree
Showing 19 changed files with 1,440 additions and 1,461 deletions.
95 changes: 50 additions & 45 deletions PythonGUI_apps/DataBrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
from pathlib import Path

import pyqtgraph as pg
from pyqtgraph.Qt import QtGui
from pyqtgraph.Qt import QtGui, QtCore

from Lifetime_analysis import Lifetime_plot_fit
from Spectrum_analysis import Spectra_plot_fit
from FLIM_analysis import FLIM_plot
from UV_Vis_analysis import uv_vis_analysis
from PLQE_analysis import plqe_analysis
from H5_Pkl import h5_pkl_view, h5_view_and_plot

from Image_analysis import Image_analysis
pg.mkQApp()
pg.setConfigOption('background', 'w')
#pg.setConfigOption('background', 'w')

base_path = Path(__file__).parent
file_path = (base_path / "DataBrowser_GUI.ui").resolve()
Expand All @@ -29,50 +29,55 @@

WindowTemplate, TemplateBaseClass = pg.Qt.loadUiType(uiFile)

class MainWindow(TemplateBaseClass):
def __init__(self):
TemplateBaseClass.__init__(self)
# Create the main window
self.ui = WindowTemplate()
self.ui.setupUi(self)
self.ui.select_comboBox.addItems(["Lifetime Analysis", "Spectrum Analysis", "FLIM Analysis",
"UV-Vis Analysis", "PLQE Analysis", "H5 View/Plot", "H5/PKL Viewer"])
self.ui.load_pushButton.clicked.connect(self.load_app)
self.show()
class MainWindow(TemplateBaseClass):
def __init__(self):
TemplateBaseClass.__init__(self)
# Create the main window
self.ui = WindowTemplate()
self.ui.setupUi(self)
self.ui.select_comboBox.addItems(["Lifetime Analysis", "Spectrum Analysis", "FLIM Analysis",
"UV-Vis Analysis", "PLQE Analysis", "H5 View/Plot", "H5/PKL Viewer", "Image Analysis"])
self.ui.load_pushButton.clicked.connect(self.load_app)
self.show()


def load_app(self):

analysis_software = self.ui.select_comboBox.currentText()

if analysis_software == "Lifetime Analysis":
self.lifetime_window = Lifetime_plot_fit.MainWindow()
self.lifetime_window.show()
elif analysis_software == "Spectrum Analysis":
self.spectrum_window = Spectra_plot_fit.MainWindow()
self.spectrum_window.show()
elif analysis_software == "FLIM Analysis":
self.flim_window = FLIM_plot.MainWindow()
self.flim_window.show()
elif analysis_software == "UV-Vis Analysis":
self.uv_vis_window = uv_vis_analysis.MainWindow()
self.uv_vis_window.show()
elif analysis_software == "PLQE Analysis":
self.plqe_window = plqe_analysis.MainWindow()
self.plqe_window.show()
elif analysis_software == "H5 View/Plot":
app = h5_view_and_plot.H5ViewPlot(sys.argv)
#sys.exit(app.exec_())
elif analysis_software == "H5/PKL Viewer":
app = h5_pkl_view.H5PklView(sys.argv)
#sys.exit(app.exec_())

def load_app(self):

analysis_software = self.ui.select_comboBox.currentText()

if analysis_software == "Lifetime Analysis":
self.lifetime_window = Lifetime_plot_fit.MainWindow()
self.lifetime_window.show()
elif analysis_software == "Spectrum Analysis":
self.spectrum_window = Spectra_plot_fit.MainWindow()
self.spectrum_window.show()
elif analysis_software == "FLIM Analysis":
self.flim_window = FLIM_plot.MainWindow()
self.flim_window.show()
elif analysis_software == "UV-Vis Analysis":
self.uv_vis_window = uv_vis_analysis.MainWindow()
self.uv_vis_window.show()
elif analysis_software == "PLQE Analysis":
self.plqe_window = plqe_analysis.MainWindow()
self.plqe_window.show()
elif analysis_software == "H5 View/Plot":
app = h5_view_and_plot.H5ViewPlot(sys.argv)
#sys.exit(app.exec_())
elif analysis_software == "H5/PKL Viewer":
app = h5_pkl_view.H5PklView(sys.argv)
#sys.exit(app.exec_())
elif analysis_software == "Image Analysis":
self.image_window = Image_analysis.MainWindow()
self.image_window.show()



def run():
win = MainWindow()
QtGui.QApplication.instance().exec_()
return
win = MainWindow()
QtGui.QApplication.instance().exec_()
return

run()
17 changes: 10 additions & 7 deletions PythonGUI_apps/DataBrowser_GUI.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@
<rect>
<x>0</x>
<y>0</y>
<width>684</width>
<height>403</height>
<width>435</width>
<height>221</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
<string>GLabViz - DataBrowser</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>20</pointsize>
<pointsize>30</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Welcome to the GLabViz</string>
<string>GLabViz</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
Expand Down Expand Up @@ -82,8 +85,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>684</width>
<height>38</height>
<width>435</width>
<height>21</height>
</rect>
</property>
</widget>
Expand Down
Loading

0 comments on commit 670352d

Please sign in to comment.