Model templates

Model templates#

In practice, nuance can be used to search for any signals that linearly scale in amplitude.

When using the core functions, a custom model can be provided as a callable with the signature

model(time: jax.numpy.Array, t0: float, D: float, P: float = None) -> jax.numpy.Array

where t0 is the epoch of the model, D its duration and P its period, if any. The default model is the empircial transit model from Protopapas (2005), where c controls the ingress and egress sharpness.

import numpy as np
from functools import partial
from nuance.core import transit
import matplotlib.pyplot as plt

t = np.linspace(-0.1, 0.1, 1000)

for c in [5, 10, 50, 1000]:
    model = partial(transit, c=c)
    plt.plot(t, model(t, 0.0, 0.05), label=f"c={c}")

_ = plt.legend()
../_images/f9008d4d948a5ba1bb589cdc90e4164be9d1e4662e454685d2bfba3bb7d108d1.png

Note

In order for the scale to be intepretable it’s a good practice to have the models normalized to -1 (sign due to the fact that nuance has been implemented for signals with depths).

Here is an overview of some other templates readily available in nuance

from nuance.core import transit_box, transit, transit_exocomet

models = [transit_box, transit, transit_exocomet]

for i, model in enumerate(models):
    plt.plot(t, model(t, 0.0, 0.05) - 2 * i, label=model.__name__)

_ = plt.legend()
../_images/55f4e4708425b69f712b1e1b949fce94ece714b18a857655b648d465ceb4fdb8.png

Note

Models provided to nuance core function must be written with JAX.