コード例 #1
0
    def set_background_estimator(self):

        if self.background_type == 'Power Law':
            self.background_estimator = components.PowerLaw()
            self.bg_line_range = 'from_left_range'
        elif self.background_type == 'Gaussian':
            self.background_estimator = components.Gaussian()
            self.bg_line_range = 'full'
        elif self.background_type == 'Offset':
            self.background_estimator = components.Offset()
            self.bg_line_range = 'full'
        elif self.background_type == 'Polynomial':
            self.background_estimator = \
                components.Polynomial(self.polynomial_order)
            self.bg_line_range = 'full'
コード例 #2
0
ファイル: edsmodel.py プロジェクト: temcode/hyperspy
    def add_polynomial_background(self, order=6):
        """
        Add a polynomial background.

        the background is added to self.background_components

        Parameters
        ----------
        order: int
            The order of the polynomial
        """
        background = create_component.Polynomial(order=order)
        background.name = 'background_order_' + str(order)
        background.isbackground = True
        self.append(background)
        self.background_components.append(background)
コード例 #3
0
 def _polynomial_order_changed(self, old, new):
     self.background_estimator = components.Polynomial(new)
     self.span_selector_changed()