def __init__(self): _ZList.__init__(self, "circular") if not _importOccultnl: raise(PE.PyARequiredImport("Could not import required shared object library 'occultquad.so'",\ solution=["Invoke PyA's install script (setup.py) with the --with-ext option.", "Go to 'forTrans' directory of PyAstronomy and invoke\n f2py -c occultnl.pyf occultnl.f"] )) fuf.OneDFit.__init__(self, ["p", "a", "i", "a1", "a2", "a3", "a4", "T0", "per", "b"]) self.freeze(["p", "a", "i", "a1", "a2", "a3", "a4", "T0", "per", "b"]) self.setRootName("MandelAgolNL") self.__zlist=None
def __init__(self): _ZList.__init__(self, "circular") if not _importOccultnl: raise(PE.PyARequiredImport("Could not import required shared object library 'occultquad.so'",\ solution=["Invoke PyA's install script (setup.py) with the --with-ext option.", "Go to 'forTrans' directory of PyAstronomy and invoke\n f2py -c occultnl.pyf occultnl.f"] )) fuf.OneDFit.__init__( self, ["p", "a", "i", "a1", "a2", "a3", "a4", "T0", "per", "b"]) self.freeze(["p", "a", "i", "a1", "a2", "a3", "a4", "T0", "per", "b"]) self.setRootName("MandelAgolNL") self.__zlist = None
def __init__(self, orbit="circular", ld="quad", collCheck=True): if not orbit in ["circular", "keplerian"]: raise (PE.PyAValError( "Invalid option for orbit: " + str(orbit), soltuion="Use either 'circular' or 'keplerian'.")) if not ld in ["quad", "nl"]: raise (PE.PyAValError("Invalid option for orbit: " + str(ld), soltuion="Use either 'quad' or 'nl'.")) _ZList.__init__(self, orbit, collCheck) if (not _importOccultquad) and (ld == "quad"): raise (PE.PyARequiredImport( "Could not import required shared object library 'occultquad.so'", solution=[ "Use 'pip install PyAstronomy_ext' to get it.", "Invoke PyA's install script (setup.py) with the --with-ext option.", "Go to 'forTrans' directory of PyAstronomy and invoke\n f2py -c occultquad.pyf occultquad.f" ])) if (not _importOccultnl) and (ld == "nl"): raise (PE.PyARequiredImport( "Could not import required shared object library 'occultquad.so'", solution=[ "Use 'pip install PyAstronomy_ext' to get it.", "Invoke PyA's install script (setup.py) with the --with-ext option.", "Go to 'forTrans' directory of PyAstronomy and invoke\n f2py -c occultnl.pyf occultnl.f" ])) if orbit == "circular": plist = ["p", "a", "i", "T0", "per", "b"] else: # It is an elliptical orbit plist = ["p", "a", "i", "per", "b", "e", "Omega", "tau", "w"] if ld == "quad": plist.extend(["linLimb", "quadLimb"]) else: # Non-linear LD plist.extend(["a1", "a2", "a3", "a4"]) fuf.OneDFit.__init__(self, plist) self.freeze(plist) self.setRootName("Occultquad") if orbit == "keplerian": self["w"] = -90.0 self._orbit = orbit self._ld = ld
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()
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
def __init__(self, orbit="circular", ld="quad", collCheck=True): if not orbit in ["circular", "keplerian"]: raise(PE.PyAValError("Invalid option for orbit: " + str(orbit), soltuion="Use either 'circular' or 'keplerian'.")) if not ld in ["quad", "nl"]: raise(PE.PyAValError("Invalid option for orbit: " + str(ld), soltuion="Use either 'quad' or 'nl'.")) _ZList.__init__(self, orbit, collCheck) if (not _importOccultquad) and (ld == "quad"): raise(PE.PyARequiredImport("Could not import required shared object library 'occultquad.so'", solution=["Use 'pip install PyAstronomy_ext' to get it.", "Invoke PyA's install script (setup.py) with the --with-ext option.", "Go to 'forTrans' directory of PyAstronomy and invoke\n f2py -c occultquad.pyf occultquad.f"] )) if (not _importOccultnl) and (ld == "nl"): raise(PE.PyARequiredImport("Could not import required shared object library 'occultquad.so'", solution=["Use 'pip install PyAstronomy_ext' to get it.", "Invoke PyA's install script (setup.py) with the --with-ext option.", "Go to 'forTrans' directory of PyAstronomy and invoke\n f2py -c occultnl.pyf occultnl.f"] )) if orbit == "circular": plist = ["p", "a", "i", "T0", "per", "b"] else: # It is an elliptical orbit plist = ["p", "a", "i", "per", "b", "e", "Omega", "tau", "w"] if ld == "quad": plist.extend(["linLimb", "quadLimb"]) else: # Non-linear LD plist.extend(["a1", "a2", "a3", "a4"]) fuf.OneDFit.__init__(self, plist) self.freeze(plist) self.setRootName("Occultquad") if orbit == "keplerian": self["w"] = -90.0 self._orbit = orbit self._ld = ld
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
def __init__(self): _ZList.__init__(self, "circular") OneDFit.__init__(self, ["p", "a", "i", "T0", "per"]) self.freeze(["p", "a", "i", "T0", "per"]) self._zlist=None
def __init__(self): _ZList.__init__(self, "circular") OneDFit.__init__(self, ["p", "a", "i", "T0", "per"]) self.freeze(["p", "a", "i", "T0", "per"]) self._zlist = None