Ejemplo n.º 1
0
    def addComponent(self):
        function = self.getSelectedModel()

        sp_adjust.adjust(function, self.x, self.y)

        self._addComponentToActive(function)
        self.treeView.clearSelection()
Ejemplo n.º 2
0
    def addComponent(self):
        function = self.getSelectedModel()

        sp_adjust.adjust(function, self.x, self.y)

        self._addComponentToActive(function)
        self.treeView.clearSelection()
Ejemplo n.º 3
0
 def finalizeAddingComponent(self, name):
     # this should perhaps be done by instantiating from a
     # class. We instead resort to brute force and copy the
     # instance instead. It works.....
     if name in models_registry.registry:
         component = models_registry.registry[name].copy()
         if component:
             sp_adjust.adjust(component, self.x, self.y)
             self.models_gui.updateModel(component)
Ejemplo n.º 4
0
    def _addComponentToActive(self, component):
        name = models_registry.getComponentName(component)

        # this should be done by instantiating from a class, but that is
        # not possible yet (the astropy dev version can't be compiled due
        # to a Cython syntax error...). So we resort to brute force and
        # copy the instances instead.
        component = models_registry.registry[name].copy()
        if component:
            sp_adjust.adjust(component, self.x, self.y)
            self.models_gui.updateModel(component)
Ejemplo n.º 5
0
    def _addComponentToActive(self, component):
        name = models_registry.getComponentName(component)

        # this should be done by instantiating from a class, but that is
        # not possible yet (the astropy dev version can't be compiled due
        # to a Cython syntax error...). So we resort to brute force and
        # copy the instances instead.
        component = models_registry.registry[name].copy()
        if component:
            sp_adjust.adjust(component, self.x, self.y)
            self.models_gui.updateModel(component)
Ejemplo n.º 6
0
    def addComponent(self, component):
        ''' Adds a new spectral component to the manager.

        Parameters
        ----------
        component: astropy.modeling.Fittable1DModel
          The component to be added to the manager.

        '''
        component = sp_adjust.adjust(component, self.x, self.y)
        self.models_gui.updateModel(component)
Ejemplo n.º 7
0
    def addComponent(self, component):
        ''' Adds a new spectral component to the manager.

        Parameters
        ----------
        component: astropy.modeling.Fittable1DModel
          The component to be added to the manager.

        '''
        component = sp_adjust.adjust(component, self.x, self.y)
        self.models_gui.updateModel(component)