def mouseMoved_graph(self, evt):
     pos = evt
     if self.p1.sceneBoundingRect().contains(pos):
         mousePoint = self.p1.vb.mapSceneToView(pos)
         index = analysis.get_index(mousePoint.x(), self.data, self.dataview)
         ydata = analysis.ydata_calc(self.data, self.dataview)
         if index > 0 and index < len(ydata):
             self.graph_label.setText("<span style='font-size: 12pt'>x=%0.1f,  y1=%0.3f" % (mousePoint.x(), ydata[index]))
         self.vLine_2.setPos(mousePoint.x())
 def mouseMoved_graph(self, evt):
     pos = evt
     if self.p1.sceneBoundingRect().contains(pos):
         mousePoint = self.p1.vb.mapSceneToView(pos)
         index = analysis.get_index(mousePoint.x(), self.data,
                                    self.dataview)
         ydata = analysis.ydata_calc(self.data, self.dataview)
         if index > 0 and index < len(ydata):
             self.graph_label.setText(
                 "<span style='font-size: 12pt'>x=%0.1f,  y1=%0.3f" %
                 (mousePoint.x(), ydata[index]))
         self.vLine_2.setPos(mousePoint.x())
 def update_imageslice_from_control(self):
     """
     updates the imageslice from the input from the control panel. 
     the image displayed is the image with the first integer value
     of the input
     """
     try:
         slice_input = float(self.ui.imageslice.text())
     except Exception as e:
         print e
     index = analysis.get_index(slice_input, self.data, self.dataview)
     value = analysis.get_slider_value(index, self.dataview)
     self.ui.slider.setValue(value)
     plot_tools.plot_pyqt(self.imv, self.data, self.dataview)
 def update_imageslice_from_control(self):
     """
     updates the imageslice from the input from the control panel. 
     the image displayed is the image with the first integer value
     of the input
     """
     try:
         slice_input = float(self.ui.imageslice.text())
     except Exception as e:
         print e
     index = analysis.get_index(slice_input,
                                self.data,
                                self.dataview)
     value = analysis.get_slider_value(index, self.dataview)
     self.ui.slider.setValue(value)
     plot_tools.plot_pyqt(self.imv,self.data, self.dataview)