litmus.GP_working
gp_working.py
Contains all interfacing with the tinyGP gaussian process modelling package
Multi-band kernel adapated from: "Gaussian Process regression for astronomical time-series" Aigrain & Foreman-Mackey, 2022: https://arxiv.org/abs/2209.08940
HM 2024
Multiband
Bases: Wrapper
Multi-band GP kernel that knows how to scale GP to output amplitudes
amplitudes: jnp.ndarray
instance-attribute
coord_to_sortable(Y) -> float
Extracts the time value from the (time,band) coordinate so the GP can interpret the ordering of points in multiple bands
Source code in litmus/gp_working.py
51 52 53 54 55 56 57 |
|
observation_model(Y) -> float
Scales the prediction for each band by their respective band amplitude in the predicted model
Source code in litmus/gp_working.py
59 60 61 62 63 64 |
|
mean_func(means, Y) -> _types.ArrayN
DEPRECATED - means are subtracted in the model now Utitlity function to take array of constants and return as gp-friendly functions
Source code in litmus/gp_working.py
35 36 37 38 39 40 41 |
|
build_gp(T: _types.ArrayN, Y: _types.ArrayN, diag: _types.ArrayNxN, bands: _types.ArrayN, tau: float, amps: tuple[float, float], means: tuple[float, float], basekernel: tinygp.kernels.quasisep.Quasisep = tinygp.kernels.quasisep.Exp) -> GaussianProcess
Builds a tinygp two-band kernel for predictions
Parameters:
Name | Type | Description | Default |
---|---|---|---|
T
|
ArrayN
|
Time values for the GP |
required |
Y
|
ArrayN
|
Y values for the GP (No effect) |
required |
diag
|
ArrayNxN
|
Variance matrix (square uncertainties) of the GP |
required |
bands
|
ArrayN
|
The bands that the different entries in the time series correspond to |
required |
tau
|
float
|
Timescale of the GP |
required |
amps
|
tuple[float, float]
|
Amplitudes of the GP |
required |
means
|
tuple[float, float]
|
|
required |
basekernel
|
Quasisep
|
|
Exp
|
Returns:
Type | Description |
---|---|
GaussianProcess
|
The tinyGP gaussian process object |
Source code in litmus/gp_working.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|