Skip to content

Commit

Permalink
Merge branch 'feat/more_functional'
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrcia committed Jul 30, 2024
2 parents ca3375d + b726bed commit a6a94f4
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 30 deletions.
11 changes: 9 additions & 2 deletions docs/markdown/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@
.. currentmodule:: nuance
.. autofunction:: linear_search
.. autofunction:: periodic_search
.. automodule:: nuance.linear_search
:members:
:show-inheritance:
.. automodule:: nuance.periodic_search
:members:
:show-inheritance:
.. automodule:: nuance.core
:members:
Expand Down
46 changes: 24 additions & 22 deletions docs/notebooks/motivation.ipynb

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions nuance/linear_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
import jax.numpy as jnp
import numpy as np
from tqdm.auto import tqdm
from typing import Callable
import tinygp

from nuance import DEVICES_COUNT, core


def linear_search(
time,
flux,
gp=None,
X=None,
model=None,
time: np.ndarray,
flux: np.ndarray,
gp: tinygp.GaussianProcess | None = None,
X: np.ndarray | None = None,
model: Callable | None = None,
positive: bool = True,
progress: bool = True,
backend: str | None = None,
Expand Down Expand Up @@ -58,7 +60,7 @@ def linear_search(
jax.vmap(jax.vmap(solver, in_axes=(None, 0)), in_axes=(0, None))
)

def function(epochs, durations):
def function(epochs: np.ndarray, durations: np.ndarray):
"""Compute the log likelihood of a transit model at different epochs and durations
Parameters
Expand Down

0 comments on commit a6a94f4

Please sign in to comment.