Ejemplo n.º 1
0
    def __init__(self):
        Qt.QWidget.__init__(self)
        
        global global_results
        from OneStopTrack import global_results

        self.cmBox1 = Qt.QComboBox()

        for key in global_results.keys():
            self.cmBox1.addItem(str(key))
        
        self.cmBox2 = Qt.QComboBox()
        self.cmBox2.addItems(["Total_Distance_Travelled", "Linear_Distance_Travelled",
                              "Horizontal_Distance_Travelled", "Vertical_Distance_Travelled",
                              "Average_Velocity"])
        
        self.pshBtn1 = Qt.QPushButton('Graph Locomotor Parameter', self)
        self.pshBtn1.clicked.connect(self.handleButton1)

        spacer1 = Qt.QLabel()
        spacer2 = Qt.QLabel()
        
        layout1 = Qt.QVBoxLayout(self)
        layout1.addWidget(self.cmBox1)
        layout1.addWidget(spacer1)
        layout1.addWidget(self.cmBox2)
        layout1.addWidget(spacer2)
        layout1.addWidget(self.pshBtn1)

        self.setWindowTitle(self.tr("Locomotor Parameters"))
Ejemplo n.º 2
0
    def __init__(self, parent=None):
        super(Results, self).__init__(parent)

        global global_results
        from OneStopTrack import global_results

        self.setWindowTitle(self.tr("Raw Data"))

        self.cmBox1 = Qt.QComboBox()
        for key in global_results.keys():
            self.cmBox1.addItem(str(key))

        label1 = Qt.QLabel("Date")
        self.lneEdt1 = Qt.QLineEdit()

        label2 = Qt.QLabel("Start Time")
        self.lneEdt2 = Qt.QLineEdit()

        label3 = Qt.QLabel("End Time")
        self.lneEdt3 = Qt.QLineEdit()

        label4 = Qt.QLabel("Duration (sec)")
        self.lneEdt4 = Qt.QLineEdit()

        label5 = Qt.QLabel("Comments")
        self.txtEdt1 = Qt.QTextEdit()

        self.cmBox2 = Qt.QComboBox()

        self.pshBtn1 = Qt.QPushButton("Show Trial")
        self.pshBtn1.clicked.connect(self.change_trial)

        self.pshBtn2 = Qt.QPushButton("Show Variable")
        self.pshBtn2.clicked.connect(self.change_var)

        self.pshBtn3 = Qt.QPushButton(self.tr('EXPORT TRIAL'))
        self.pshBtn3.clicked.connect(self.export_trial)

        self.table = Qt.QTableWidget()
        self.table.setRowCount(1)
        self.table.setColumnCount(1)
        self.table.horizontalHeader().setStretchLastSection(True)
        #self.table.resizeColumnsToContents()

        layout1 = Qt.QFormLayout()
        layout1.addRow(self.cmBox1)
        layout1.addRow(self.pshBtn1)
        layout1.addRow(label1, self.lneEdt1)
        layout1.addRow(label2, self.lneEdt2)
        layout1.addRow(label3, self.lneEdt3)
        layout1.addRow(label4, self.lneEdt4)
        layout1.addRow(label5, self.txtEdt1)

        layout2 = Qt.QVBoxLayout()
        layout2.addWidget(self.cmBox2)
        layout2.addWidget(self.pshBtn2)
        layout2.addWidget(self.table)

        layout3 = Qt.QHBoxLayout()
        layout3.addLayout(layout1)
        layout3.addLayout(layout2)

        layout4 = Qt.QVBoxLayout()
        layout4.addWidget(self.pshBtn3)
        layout4.insertStretch(1)

        layout5 = Qt.QHBoxLayout()
        layout5.addLayout(layout3)
        layout5.addLayout(layout4)

        self.setLayout(layout5)
Ejemplo n.º 3
0
    def __init__(self):
        Qt.QWidget.__init__(self)

        global global_results
        from OneStopTrack import global_results

        self.cmBox1 = Qt.QComboBox()
        for key in global_results.keys():
            self.cmBox1.addItem(str(key))

        lbl1 = Qt.QLabel("Arena width (cm):")
        self.lneEdt1 = Qt.QLineEdit()
        lbl1.setBuddy(self.lneEdt1)

        lbl2 = Qt.QLabel("Arena height (cm):")
        self.lneEdt2 = Qt.QLineEdit()
        lbl2.setBuddy(self.lneEdt2)

        lbl3 = Qt.QLabel("Number of vertical lines dividing arena:")
        self.spnBox1 = Qt.QSpinBox()
        lbl3.setBuddy(self.spnBox1)

        lbl4 = Qt.QLabel("Number of horizontal lines dividing arena:")
        self.spnBox2 = Qt.QSpinBox()
        lbl4.setBuddy(self.spnBox2)

        self.radBtn1 = Qt.QRadioButton(
            self.
            tr("Load arena picture for arena setup subplot background (OPTIONAL)"
               ))
        self.radBtn1.setChecked(False)
        self.radBtn1.clicked.connect(self.use_arena_pic)

        self.btnLneEdt1 = ButtonLineEdit()
        self.btnLneEdt1.buttonClicked.connect(self.find_arena_pic)
        self.btnLneEdt1.setDisabled(True)

        self.pshBtn1 = Qt.QPushButton(self.tr('Draw ROI Time Bar Graph'))
        self.pshBtn1.clicked.connect(self.draw_bar_graph)

        self.pshBtn1 = Qt.QPushButton(self.tr('Draw Grid Time Bar Graph'))
        self.pshBtn1.clicked.connect(self.draw_bar_graph)

        spacer1 = Qt.QLabel()
        spacer2 = Qt.QLabel()
        spacer3 = Qt.QLabel()

        layout1 = Qt.QFormLayout()
        layout1.addRow(lbl1, self.lneEdt1)
        layout1.addRow(lbl2, self.lneEdt2)
        layout1.addRow(lbl3, self.spnBox1)
        layout1.addRow(lbl4, self.spnBox2)

        layout2 = Qt.QVBoxLayout(self)
        layout2.addWidget(self.cmBox1)
        layout2.addWidget(spacer1)
        layout2.addLayout(layout1)
        layout2.addWidget(spacer2)
        layout2.addWidget(self.radBtn1)
        layout2.addWidget(self.btnLneEdt1)
        layout2.addWidget(spacer3)
        layout2.addWidget(self.pshBtn1)

        self.setWindowTitle(self.tr("Grid Time Analysis"))
Ejemplo n.º 4
0
    def __init__(self):
        Qt.QWidget.__init__(self)

        global global_results
        from OneStopTrack import global_results

        self.cmBox1 = Qt.QComboBox()
        for key in global_results.keys():
            self.cmBox1.addItem(str(key))

        lbl1 = Qt.QLabel("Arena width (cm):")
        self.lneEdt1 = Qt.QLineEdit()
        lbl1.setBuddy(self.lneEdt1)

        lbl2 = Qt.QLabel("Arena height (cm):")
        self.lneEdt2 = Qt.QLineEdit()
        lbl2.setBuddy(self.lneEdt2)

        lbl3 = Qt.QLabel("Number of vertical lines dividing arena:")
        self.spnBox1 = Qt.QSpinBox()
        lbl3.setBuddy(self.spnBox1)

        lbl4 = Qt.QLabel("Number of horizontal lines dividing arena:")
        self.spnBox2 = Qt.QSpinBox()
        lbl4.setBuddy(self.spnBox2)

        lbl5 = Qt.QLabel("Interpolation Method:")
        self.cmBox2 = Qt.QComboBox()
        self.cmBox2.addItems([
            "none", "nearest", "bilinear", "bicubic", "spline16", "spline36",
            "hanning", "hamming", "hermite", "kaiser", "quadric", "catrom",
            "gaussian", "bessel", "mitchell", "sinc", "lanczos"
        ])
        lbl5.setBuddy(self.cmBox2)

        self.pshBtn1 = Qt.QPushButton(self.tr('Draw Grid Time Heatmap'))
        self.pshBtn1.clicked.connect(self.draw_heatmap)

        spacer1 = Qt.QLabel()
        spacer2 = Qt.QLabel()
        spacer3 = Qt.QLabel()

        layout1 = Qt.QFormLayout()
        layout1.addRow(lbl1, self.lneEdt1)
        layout1.addRow(lbl2, self.lneEdt2)
        layout1.addRow(lbl3, self.spnBox1)
        layout1.addRow(lbl4, self.spnBox2)

        layout2 = Qt.QFormLayout()
        layout2.addRow(lbl5, self.cmBox2)

        layout3 = Qt.QVBoxLayout(self)
        layout3.addWidget(self.cmBox1)
        layout3.addWidget(spacer1)
        layout3.addLayout(layout1)
        layout3.addWidget(spacer2)
        layout3.addLayout(layout2)
        layout3.addWidget(spacer3)
        layout3.addWidget(self.pshBtn1)

        self.setWindowTitle(self.tr("Animal Movement Heatmap"))
Ejemplo n.º 5
0
    def __init__(self, parent=None):
        super(Scatter, self).__init__(parent)

        global global_results
        from OneStopTrack import global_results

        self.cmBox1 = Qt.QComboBox()

        for key in global_results.keys():
            self.cmBox1.addItem(str(key))

        lbl1 = Qt.QLabel("Arena width (cm):")
        self.lneEdt1 = Qt.QLineEdit()
        lbl1.setBuddy(self.lneEdt1)

        lbl2 = Qt.QLabel("Arena height (cm):")
        self.lneEdt2 = Qt.QLineEdit()
        lbl2.setBuddy(self.lneEdt2)

        lbl3 = Qt.QLabel("Number of vertical lines dividing arena:")
        self.spnBox1 = Qt.QSpinBox()
        lbl3.setBuddy(self.spnBox1)

        lbl4 = Qt.QLabel("Number of horizontal lines dividing arena:")
        self.spnBox2 = Qt.QSpinBox()
        lbl4.setBuddy(self.spnBox2)

        self.radBtn1 = Qt.QRadioButton(
            self.tr(
                "Load arena picture for scatterplot background (OPTIONAL)"))
        self.radBtn1.setChecked(False)
        self.radBtn1.clicked.connect(self.use_arena_pic)

        self.btnLneEdt1 = ButtonLineEdit()
        self.btnLneEdt1.buttonClicked.connect(self.find_arena_pic)
        self.btnLneEdt1.setDisabled(True)

        self.pshBtn1 = Qt.QPushButton('Draw Scatterplot', self)
        self.pshBtn1.clicked.connect(self.draw_scatterplot)

        spacer1 = Qt.QLabel()
        spacer2 = Qt.QLabel()
        spacer3 = Qt.QLabel()

        layout1 = Qt.QFormLayout()
        layout1.addRow(lbl1, self.lneEdt1)
        layout1.addRow(lbl2, self.lneEdt2)
        layout1.addRow(lbl3, self.spnBox1)
        layout1.addRow(lbl4, self.spnBox2)

        layout2 = Qt.QVBoxLayout(self)
        layout2.addWidget(self.cmBox1)
        layout2.addWidget(spacer1)
        layout2.addLayout(layout1)
        layout2.addWidget(spacer2)
        layout2.addWidget(self.radBtn1)
        layout2.addWidget(self.btnLneEdt1)
        layout2.addWidget(spacer3)
        layout2.addWidget(self.pshBtn1)

        self.setWindowTitle(self.tr("Animal Movement Scatterplot"))
Ejemplo n.º 6
0
    def __init__(self):
        Qt.QWidget.__init__(self)

        global global_results
        from OneStopTrack import global_results

        self.cmBox1 = Qt.QComboBox()
        for key in global_results.keys():
            self.cmBox1.addItem(str(key))

        lbl1 = Qt.QLabel("Arena width (cm):")
        self.lneEdt1 = Qt.QLineEdit()
        lbl1.setBuddy(self.lneEdt1)

        lbl2 = Qt.QLabel("Arena height (cm):")
        self.lneEdt2 = Qt.QLineEdit()
        lbl2.setBuddy(self.lneEdt2)

        lbl3 = Qt.QLabel("Region of Interest (ROI) is the")
        self.cmBox2 = Qt.QComboBox()
        self.cmBox2.addItems(
            ["area inside of the rectangle", "area outside of the rectangle"])
        lbl3.setBuddy(self.cmBox2)

        lbl4 = Qt.QLabel("Rectangle Top Left Corner X Coordinate (cm):")
        self.lneEdt3 = Qt.QLineEdit()
        lbl4.setBuddy(self.lneEdt3)

        lbl5 = Qt.QLabel("Rectangle Top Left Corner Y Coordinate (cm):")
        self.lneEdt4 = Qt.QLineEdit()
        lbl5.setBuddy(self.lneEdt4)

        lbl6 = Qt.QLabel("Rectangle Bottom Right Corner X Coordinate (cm):")
        self.lneEdt5 = Qt.QLineEdit()
        lbl6.setBuddy(self.lneEdt5)

        lbl7 = Qt.QLabel("Rectangle Bottom Right Corner Y Coordinate (cm):")
        self.lneEdt6 = Qt.QLineEdit()
        lbl7.setBuddy(self.lneEdt6)

        self.radBtn1 = Qt.QRadioButton(
            self.
            tr("Load arena picture for arena setup subplot background (OPTIONAL)"
               ))
        self.radBtn1.setChecked(False)
        self.radBtn1.clicked.connect(self.use_arena_pic)

        self.btnLneEdt1 = ButtonLineEdit()
        self.btnLneEdt1.buttonClicked.connect(self.find_arena_pic)
        self.btnLneEdt1.setDisabled(True)

        self.pshBtn1 = Qt.QPushButton(self.tr('Draw ROI Time Bar Graph'))
        self.pshBtn1.clicked.connect(self.draw_bar_graph)

        spacer1 = Qt.QLabel()
        spacer2 = Qt.QLabel()
        spacer3 = Qt.QLabel()
        spacer4 = Qt.QLabel()

        layout1 = Qt.QFormLayout()
        layout1.addRow(lbl1, self.lneEdt1)
        layout1.addRow(lbl2, self.lneEdt2)

        layout2 = Qt.QFormLayout()
        layout2.addRow(lbl3, self.cmBox2)

        layout3 = Qt.QFormLayout()
        layout3.addRow(lbl4, self.lneEdt3)
        layout3.addRow(lbl5, self.lneEdt4)
        layout3.addRow(lbl6, self.lneEdt5)
        layout3.addRow(lbl7, self.lneEdt6)

        layout4 = Qt.QVBoxLayout(self)
        layout4.addWidget(self.cmBox1)
        layout4.addWidget(spacer1)
        layout4.addLayout(layout1)
        layout4.addWidget(spacer2)
        layout4.addLayout(layout2)
        layout4.addLayout(layout3)
        layout4.addWidget(spacer3)
        layout4.addWidget(self.radBtn1)
        layout4.addWidget(self.btnLneEdt1)
        layout4.addWidget(spacer4)
        layout4.addWidget(self.pshBtn1)

        self.setWindowTitle(self.tr("ROI Time Analysis"))