Exemple #1
0
    def __init__(self, spectrum, auto_background=True, auto_add_edges=True, ll=None, GOS=None, dictionary=None):
        Model.__init__(self, spectrum)
        self._suspend_auto_fine_structure_width = False
        self.convolved = False
        self.low_loss = ll
        self.GOS = GOS
        self.edges = list()
        if dictionary is not None:
            auto_background = False
            auto_add_edges = False
            self._load_dictionary(dictionary)

        if auto_background is True:
            interactive_ns = get_interactive_ns()
            background = PowerLaw()
            background.name = "background"
            warnings.warn(
                'Adding "background" to the user namespace. ' "This feature will be removed in HyperSpy 0.9.",
                VisibleDeprecationWarning,
            )
            interactive_ns["background"] = background
            self.append(background)

        if self.spectrum.subshells and auto_add_edges is True:
            self._add_edges_from_subshells_names()
Exemple #2
0
 def __init__(self, spectrum, auto_background=True,
              auto_add_edges=True, ll=None, 
              GOS=None, *args, **kwargs):
     Model.__init__(self, spectrum, *args, **kwargs)
     self.convolved = False
     self.low_loss = ll
     self.GOS = GOS
     if auto_background is True:
         background = PowerLaw()
         background.name = 'background'
         interactive_ns['background'] = background
         self.append(background)
         
     if self.spectrum.subshells and auto_add_edges is True:
         self._add_edges_from_subshells_names()
Exemple #3
0
 def __init__(self, spectrum, auto_background=True,
              auto_add_edges=True, ll=None, 
              GOS=None, *args, **kwargs):
     Model.__init__(self, spectrum, *args, **kwargs)
     self.convolved = False
     self.low_loss = ll
     self.GOS = GOS
     if auto_background is True:
         background = PowerLaw()
         background.name = 'background'
         interactive_ns['background'] = background
         self.append(background)
         
     if self.spectrum.subshells and auto_add_edges is True:
         self._add_edges_from_subshells_names()
Exemple #4
0
    def __init__(self, spectrum, auto_background=True, auto_add_edges=True, ll=None, GOS=None, *args, **kwargs):
        Model.__init__(self, spectrum, *args, **kwargs)
        self._suspend_auto_fine_structure_width = False
        self.convolved = False
        self.low_loss = ll
        self.GOS = GOS
        self.edges = list()
        if auto_background is True:
            interactive_ns = get_interactive_ns()
            background = PowerLaw()
            background.name = "background"
            interactive_ns["background"] = background
            self.append(background)

        if self.spectrum.subshells and auto_add_edges is True:
            self._add_edges_from_subshells_names()
Exemple #5
0
    def __init__(self, spectrum, auto_background=True, auto_add_edges=True, ll=None, *args, **kwargs):
        Model.__init__(self, spectrum, *args, **kwargs)
        self.ll = ll

        if auto_background is True:
            background = PowerLaw()
            background.name = "background"
            interactive_ns["background"] = background
            self.append(background)
        if self.ll is not None:
            self.convolved = True
            if self.experiments.convolution_axis is None:
                self.experiments.set_convolution_axis()
        else:
            self.convolved = False
        if self.spectrum.subshells and auto_add_edges is True:
            self._add_edges_from_subshells_names()