コード例 #1
0
    def __init__(self, name, model):
        """Initialize the generator.

        name    --  A name for the SASCF
        model   --  SASModel object this adapts.
        
        """
        Calculator.__init__(self, name)

        self._model = model

        from diffpy.srfit.sas.sasparameter import SASParameter
        # Wrap normal parameters
        for parname in model.params:
            par = SASParameter(parname, model)
            self.addParameter(par)

        # Wrap dispersion parameters
        for parname in model.dispersion:
            name = parname + "_width"
            parname += ".width"
            par = SASParameter(name, model, parname)
            self.addParameter(par)

        return
コード例 #2
0
    def __init__(self, name, model):
        """Initialize the generator.

        name    --  A name for the SASCF
        model   --  SASModel object this adapts.

        """
        Calculator.__init__(self, name)

        self._model = model

        from diffpy.srfit.sas.sasparameter import SASParameter
        # Wrap normal parameters
        for parname in model.params:
            par = SASParameter(parname, model)
            self.addParameter(par)

        # Wrap dispersion parameters
        for parname in model.dispersion:
            name = parname + "_width"
            parname += ".width"
            par = SASParameter(name, model, parname)
            self.addParameter(par)

        return
コード例 #3
0
 def __init__(self, name):
     Calculator.__init__(self, name)
     self.newParameter("A", 1.0)
     self.newParameter("center", 0.0)
     self.newParameter("width", 0.1)
     return
コード例 #4
0
 def __init__(self, name):
     Calculator.__init__(self, name)
     self.newParameter("A", 1.0)
     self.newParameter("center", 0.0)
     self.newParameter("width", 0.1)
     return