Skip to content

Commit

Permalink
docs: better API
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrcia committed Jul 30, 2024
1 parent a6a94f4 commit ab2818b
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 37 deletions.
33 changes: 14 additions & 19 deletions docs/markdown/API.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
# API

```{eval-rst}
The following pages describe the main objects and function of `nuance`

.. currentmodule:: nuance
## Main modules

.. autosummary::
:toctree: generated
:nosignatures:
:template: class.rst
```{toctree}
:maxdepth: 1
Star
core
ls
ps
```

## Other

```{eval-rst}
.. currentmodule:: nuance
.. automodule:: nuance.linear_search
:members:
:show-inheritance:
.. automodule:: nuance.periodic_search
:members:
:show-inheritance:
.. autosummary::
:toctree: generated
:nosignatures:
:template: class.rst
.. automodule:: nuance.core
:members:
:show-inheritance:
Star
```
12 changes: 12 additions & 0 deletions docs/markdown/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# core

```{eval-rst}
.. automodule:: nuance.core
:members:
:show-inheritance:
```
5 changes: 0 additions & 5 deletions docs/markdown/how.md

This file was deleted.

10 changes: 10 additions & 0 deletions docs/markdown/ls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# linear search

```{eval-rst}
.. automodule:: nuance.linear_search
:members:
:show-inheritance:
```
10 changes: 10 additions & 0 deletions docs/markdown/ps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# periodic search

```{eval-rst}
.. automodule:: nuance.periodic_search
:members:
:show-inheritance:
```
10 changes: 0 additions & 10 deletions docs/markdown/tutorials.md

This file was deleted.

11 changes: 8 additions & 3 deletions nuance/linear_search.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
"""
The linear search module provides functions to compute single events statistics.
"""

from typing import Callable

import jax
import jax.numpy as jnp
import numpy as np
from tqdm.auto import tqdm
from typing import Callable
import tinygp
from tqdm.auto import tqdm

from nuance import DEVICES_COUNT, core

Expand Down Expand Up @@ -111,7 +116,7 @@ def function(epochs: np.ndarray, durations: np.ndarray):
def combine_linear_searches(*linear_searches):
"""Combine the results of multiple linear searches
*linear_searches : list
linear_searches : list
lists of (log likelihoods, model depths, depths variances)
Returns
Expand Down
6 changes: 6 additions & 0 deletions nuance/periodic_search.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""
The periodic search module provides functions to compute the probability of
a periodic signal to be present in the data, using quantities computed from single
events statistics.
"""

import multiprocess as mp
import numpy as np
from tqdm.auto import tqdm
Expand Down

0 comments on commit ab2818b

Please sign in to comment.