Skip to content

Commit

Permalink
changing import style
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Nov 30, 2018
1 parent 1d5de94 commit d788f50
Show file tree
Hide file tree
Showing 8 changed files with 280 additions and 276 deletions.
14 changes: 7 additions & 7 deletions docs/_static/notebooks/citation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -29,15 +29,15 @@
"outputs": [],
"source": [
"import pymc3 as pm\n",
"import exoplanet\n",
"import exoplanet as xo\n",
"\n",
"with pm.Model() as model:\n",
" u = exoplanet.distributions.QuadLimbDark(\"u\")\n",
" orbit = exoplanet.orbits.KeplerianOrbit(period=10.0)\n",
" light_curve = exoplanet.StarryLightCurve(u)\n",
" u = xo.distributions.QuadLimbDark(\"u\")\n",
" orbit = xo.orbits.KeplerianOrbit(period=10.0)\n",
" light_curve = xo.StarryLightCurve(u)\n",
" transit = light_curve.get_light_curve(0.1, orbit, [0.0, 0.1])\n",
" \n",
" txt, bib = exoplanet.citations.get_citations_for_model()"
" txt, bib = xo.citations.get_citations_for_model()"
]
},
{
Expand Down Expand Up @@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down
147 changes: 76 additions & 71 deletions docs/_static/notebooks/pymc3-extras.ipynb

Large diffs are not rendered by default.

360 changes: 178 additions & 182 deletions docs/_static/notebooks/rv.ipynb

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions docs/user/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Orbits
Light curve models
------------------

.. autoclass:: exoplanet.light_curve.StarryLightCurve
.. autoclass:: exoplanet.StarryLightCurve
:inherited-members:


Expand All @@ -44,9 +44,10 @@ Scalable Gaussian processes
Estimators
----------

.. autofunction:: exoplanet.estimators.estimate_minimum_mass
.. autofunction:: exoplanet.estimators.lomb_scargle_estimator
.. autofunction:: exoplanet.estimators.autocorr_estimator
.. autofunction:: exoplanet.estimate_semi_amplitude
.. autofunction:: exoplanet.estimate_minimum_mass
.. autofunction:: exoplanet.lomb_scargle_estimator
.. autofunction:: exoplanet.autocorr_estimator


Distributions
Expand All @@ -62,9 +63,9 @@ Distributions
Utilities
---------

.. autofunction:: exoplanet.utils.eval_in_model

.. autoclass:: exoplanet.sampling.TuningSchedule
.. autofunction:: exoplanet.eval_in_model
.. autofunction:: exoplanet.get_samples_from_trace
.. autoclass:: exoplanet.PyMC3Sampler
:inherited-members:


Expand Down
12 changes: 7 additions & 5 deletions exoplanet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
__EXOPLANET_SETUP__ = False

if not __EXOPLANET_SETUP__:
__all__ = ["distributions", "gp", "orbits", "sampling", "utils",
"estimators",
"StarryLightCurve"]
__all__ = ["distributions", "gp", "orbits"]

from . import distributions, gp, orbits, sampling, utils, estimators
from .light_curve import StarryLightCurve
from .utils import * # NOQA
from .sampling import * # NOQA
from .estimators import * # NOQA
from .light_curves import * # NOQA

from . import distributions, gp, orbits
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import starry

from .orbits import KeplerianOrbit
from .light_curve import StarryLightCurve
from .light_curves import StarryLightCurve


def test_light_curve():
Expand Down
6 changes: 3 additions & 3 deletions exoplanet/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import division, print_function

__all__ = ["TuningSchedule"]
__all__ = ["PyMC3Sampler"]

import logging

Expand All @@ -12,8 +12,8 @@
from pymc3.step_methods.hmc import quadpotential as quad


class TuningSchedule(object):
"""A custom tuning scheduler for PyMC3 with support for dense mass matrices
class PyMC3Sampler(object):
"""A sampling wrapper for PyMC3 with support for dense mass matrices
This schedule is based on the method used by as described in Section 34.2
of the `Stan Manual <http://mc-stan.org/users/documentation/>`_.
Expand Down

0 comments on commit d788f50

Please sign in to comment.