Ejemplo n.º 1
0
    def calibrate(self, return_obj = False):
        '''Calibrate the spectral dimension using a gui

        It displays a window where the new calibration can be set by:
        * Setting the offset, units and scale directly
        * Selection a range by dragging the mouse on the spectrum figure and
        setting the new values for the given range limits

        Notes
        -----
        For this method to work the output_dimension must be 1. Set the view
        accordingly
        '''

        calibration = SpectrumCalibration(self)
        calibration.edit_traits()
        if return_obj is True:
            return calibration
Ejemplo n.º 2
0
    def calibrate(self):
        '''Calibrate the spectral dimension using a gui

        It displays a window where the new calibration can be set by:
        * Setting the offset, units and scale directly
        * Selection a range by dragging the mouse on the spectrum figure and
        setting the new values for the given range limits

        Notes
        -----
        For this method to work the output_dimension must be 1. Set the view
        accordingly
        '''

        calibration = SpectrumCalibration(self)
        # The next two lines are to walk-around the fact that, in nonmodal mode
        # the inherited traits are overwritten by the editor if they were not 
        # initialized by the parent trait
        calibration.ss_left_value = calibration.axis.axis[0]
        calibration.ss_right_value = calibration.axis.axis[-1]
        calibration.edit_traits()