Пример #1
0
 def __init__(self):
   _ZList.__init__(self, "circular")
   fuf.OneDFit.__init__(self, ["p", "a", "i", "linLimb", "quadLimb", "T0", "per", "b"])
   self.freeze(["p", "a", "i", "linLimb", "quadLimb", "T0", "per", "b"])
   self.setRootName("PalCirc08")
   
   self._zlist=None
   
   if (not mpmath_imported) and (not boostEll_imported):
     raise(PE.PyARequiredImport("Neither mpmath nor the elliptical integrals from the boost library could be found!", \
                                where="PalLC::__init__", solution="Install mpmath or make Boost library available (more complicated - see documentation)"))
   self.useBoost = False
   if boostEll_imported:
     self.useBoost = True
     self.ell = ell.ell()
Пример #2
0
 def __init__(self):
   _ZList.__init__(self, "circular")
   fuf.OneDFit.__init__(self, ["p", "a", "i", "linLimb", "quadLimb", "T0", "per", "b"])
   self.freeze(["p", "a", "i", "linLimb", "quadLimb", "T0", "per", "b"])
   self.setRootName("PalCirc08")
   
   self._zlist=None
   
   if (not mpmath_imported) and (not boostEll_imported):
     raise(PE.PyARequiredImport("Neither mpmath nor the elliptical integrals from the boost library could be found!", \
                                where="PalLC::__init__", solution="Install mpmath or make Boost library available (more complicated - see documentation)"))
   self.useBoost = False
   if boostEll_imported:
     self.useBoost = True
     self.ell = ell.ell()
Пример #3
0
    def __init__(self, collisionCheck=False):
        _ZList.__init__(self, "keplerian", collisionCheck)
        fuf.OneDFit.__init__(self, [
            "p", "a", "i", "linLimb", "quadLimb", "tau", "per", "b", "w",
            "Omega", "e"
        ])
        self.freeze([
            "p", "a", "i", "linLimb", "quadLimb", "tau", "per", "b", "w",
            "Omega", "e"
        ])
        self.setRootName("Pal08")
        self["per"] = 1.0
        self["w"] = -90

        self._zlist = None

        if (not mpmath_imported) and (not boostEll_imported):
            raise (PE.PyARequiredImport(
                "Neither mpmath nor the elliptical integrals from the boost library could be found!",
                where="PalLC::__init__",
                solution=
                "Install mpmath or make Boost library available (more complicated - see documentation)"
            ))
        self.useBoost = False
        if boostEll_imported:
            self.useBoost = True
            self.ell = ell.ell()

        self.collisionCheck = collisionCheck

        # Wrap get/setitem to inform about change in parameter name
        T0paE = PE.PyADeprecationError(
            "The parameter 'T0pa' in PalLCKep had to be renamed 'tau'.",
            solution="Use 'tau' instead of 'T0pa'.")

        def getitem(specifier, **kwargs):
            if specifier == "T0pa":
                PE.warn(T0paE)
            return PalLC.__getitem__(self, specifier, **kwargs)

        self.__getitem__ = getitem

        def setitem(specifier, value):
            if specifier == "T0pa":
                PE.warn(T0paE)
            PalLC.__setitem__(self, specifier, value)

        self.__setitem__ = setitem
Пример #4
0
    def __init__(self, collisionCheck=False):
        _ZList.__init__(self, "keplerian", collisionCheck)
        fuf.OneDFit.__init__(self, ["p", "a", "i", "linLimb", "quadLimb", "tau", "per", "b",
                                    "w", "Omega", "e"])
        self.freeze(["p", "a", "i", "linLimb", "quadLimb", "tau", "per", "b",
                     "w", "Omega", "e"])
        self.setRootName("Pal08")
        self["per"] = 1.0
        self["w"] = -90

        self._zlist = None

        if (not mpmath_imported) and (not boostEll_imported):
            raise(PE.PyARequiredImport("Neither mpmath nor the elliptical integrals from the boost library could be found!",
                                       where="PalLC::__init__", solution="Install mpmath or make Boost library available (more complicated - see documentation)"))
        self.useBoost = False
        if boostEll_imported:
            self.useBoost = True
            self.ell = ell.ell()

        self.collisionCheck = collisionCheck

        # Wrap get/setitem to inform about change in parameter name
        T0paE = PE.PyADeprecationError("The parameter 'T0pa' in PalLCKep had to be renamed 'tau'.",
                                       solution="Use 'tau' instead of 'T0pa'.")

        def getitem(specifier, **kwargs):
            if specifier == "T0pa":
                PE.warn(T0paE)
            return PalLC.__getitem__(self, specifier, **kwargs)
        self.__getitem__ = getitem

        def setitem(specifier, value):
            if specifier == "T0pa":
                PE.warn(T0paE)
            PalLC.__setitem__(self, specifier, value)
        self.__setitem__ = setitem