Ejemplo n.º 1
0
 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
     """
     slice_input = float(self.window.imageslice.text())
     if self.current_tab.dataview.display_ev:
         imageval = analysis.ev_to_index(slice_input, self.current_tab.data)
         self.current_tab.slider.setValue(imageval)
     else:
         imageval = analysis.wavelength_to_index(slice_input,
                                                 self.current_tab.data)
         self.current_tab.slider.setValue(self.current_tab.number_of_slices\
                                          - 1-imageval)
Ejemplo n.º 2
0
 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
     """
     slice_input = float(self.window.imageslice.text())
     if self.current_tab.dataview.display_ev:
         imageval = analysis.ev_to_index(slice_input, 
                                         self.current_tab.data) 
         self.current_tab.slider.setValue(imageval) 
     else:      
         imageval = analysis.wavelength_to_index(slice_input, 
                                                 self.current_tab.data)
         self.current_tab.slider.setValue(self.current_tab.number_of_slices\
                                          - 1-imageval) 
Ejemplo n.º 3
0
 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.imageslice.text())
     except:
         return
     if self.dataview.display_ev:
         imageval = analysis.ev_to_index(slice_input, self.data)
         self.slider.setValue(imageval)
     else:
         imageval = analysis.wavelength_to_index(slice_input, self.data)
         self.slider.setValue(self.dataview.number_of_slices - 1 - imageval)
     self.update_graph()