def __init__(self, model, component, signal_range=None, estimate_parameters=True, fit_independent=False, only_current=True, **kwargs): if model.signal.axes_manager.signal_dimension != 1: raise SignalDimensionError( model.signal.axes_manager.signal_dimension, 1) self.signal = model.signal self.axis = self.signal.axes_manager.signal_axes[0] self.span_selector = None self.model = model self.component = component self.signal_range = signal_range self.estimate_parameters = estimate_parameters self.fit_independent = fit_independent self.fit_kwargs = kwargs self.only_current = only_current if signal_range == "interactive": if (not hasattr(self.model, '_plot') or self.model._plot is None or not self.model._plot.is_active): self.model.plot() self.span_selector_switch(on=True)
def __init__(self, signal): super(SpectrumCalibration, self).__init__(signal) if signal.axes_manager.signal_dimension != 1: raise SignalDimensionError( signal.axes_manager.signal_dimension, 1) self.units = self.axis.units self.last_calibration_stored = True
def __init__(self, signal): if signal.axes_manager.signal_dimension != 1: raise SignalDimensionError(signal.axes_manager.signal_dimension, 1) self.signal = signal self.axis = self.signal.axes_manager.signal_axes[0] self.span_selector = None self.signal.plot() self.span_selector_switch(on=True)
def __init__(self, signal, signal_range=None): if signal.axes_manager.signal_dimension != 1: raise SignalDimensionError(signal.axes.signal_dimension, 1) self.signal = signal self.axis = self.signal.axes_manager.signal_axes[0] self.span_selector = None if (not hasattr(self.signal, '_plot') or self.signal._plot is None or not self.signal._plot.is_active): self.signal.plot() self.span_selector_switch(on=True)
def __init__(self, signal, signal_range=None): if signal.axes_manager.signal_dimension != 1: raise SignalDimensionError(signal.axes.signal_dimension, 1) self.signal = signal self.span_selector = None if not hasattr(self.signal, '_plot'): self.signal.plot() elif self.signal._plot is None: self.signal.plot() elif self.signal._plot.is_active() is False: self.signal.plot() self.span_selector_switch(on=True)
def __init__(self, signal): if signal.axes_manager.signal_dimension != 1: raise SignalDimensionError( signal.axes_manager.signal_dimension, 1) self.signal = signal self.signal.plot() axis_dict = signal.axes_manager.signal_axes[0].get_axis_dictionary() am = AxesManager([axis_dict, ]) am._axes[0].navigate = True # Set the position of the line in the middle of the spectral # range by default am._axes[0].index = int(round(am._axes[0].size / 2)) self.axes_manager = am self.axes_manager.connect(self.update_position) self.on_trait_change(self.switch_on_off, 'on')