Skip to content

Commit c7775fd

Browse files
committed
- Added plot_white_gp_predictions method to visualize Gaussian Process predictions for white light curves.
- Documented the `white_models` property for clarity. - Updated Sphinx docs to include new methods (`plot_white_gp_predictions`, etc.). - Linked `pytransit` in docs for better cross-referencing. - Improved `rst` syntax with consistent formatting for arguments and classes.
1 parent 95274b3 commit c7775fd

File tree

3 files changed

+66
-10
lines changed

3 files changed

+66
-10
lines changed

doc/source/api/exoiris.rst

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ RoadRunner transit model (`pytransit.RRModel`). The RoadRunner model is an advan
2020
efficiently use any radially symmetric function to model stellar limb darkening, as described in
2121
`Parviainen (2020) <https://ui.adsabs.harvard.edu/link_gateway/2020MNRAS.499.1633P/PUB_HTML>`_.
2222

23-
Since `TSModel` is based on `RRModel`, it offers the same flexibility for modeling stellar limb darkening.
24-
The `ldmodel` argument can be one of the following:
23+
Since `~pytransit.TSModel` is based on `~pytransit.RRModel`, it offers the same flexibility for modeling stellar limb
24+
darkening. The ``ldmodel`` argument can be one of the following:
2525

26-
- a string representing one of the built-in limb darkening models supported by `RRModel`, such as
27-
`power-2` or `quadratic`,
26+
- a string representing one of the built-in limb darkening models supported by ``RRModel``, such as
27+
``power-2`` or ``quadratic``,
2828
- an object that is a subclass of the `pytransit.models.ldmodel.LDModel` limb darkening model class,
2929
- a tuple of two functions, with the first returning the limb darkening profile as a function of
3030
:math:`\mu` and the second returning its integral over the stellar disk, or
@@ -44,7 +44,6 @@ An `ExoIris` instance can be saved to a FITS file using the `ExoIris.save` metho
4444
optimiser state, and MCMC sampler state, allowing the model to be fully recreated later using the `load_model`
4545
function.
4646

47-
4847
.. autosummary::
4948
:toctree: api/
5049

@@ -59,19 +58,27 @@ where a saved low-resolution analysis can be loaded as a new analysis using the
5958
like the radius ratio and limb darkening knots can be adjusted to increase the resolution of the estimated
6059
transmission spectrum, and even the observational data can be changed to improve the data resolution.
6160

62-
6361
.. autosummary::
6462
:toctree: api/
6563

6664
ExoIris.set_data
6765
ExoIris.set_radius_ratio_knots
6866
ExoIris.add_radius_ratio_knots
67+
ExoIris.create_dense_radius_ratio_block
68+
ExoIris.plot_setup
69+
70+
Parameterization and priors
71+
---------------------------
72+
73+
.. autosummary::
74+
:toctree: api/
75+
76+
ExoIris.set_prior
77+
ExoIris.set_baseline_prior
6978
ExoIris.set_ldtk_prior
7079
ExoIris.set_radius_ratio_prior
71-
ExoIris.plot_setup
7280
ExoIris.print_parameters
7381

74-
7582
Noise model setup
7683
-----------------
7784

@@ -89,6 +96,7 @@ via the `ExoIris.gp` attribute.
8996
ExoIris.set_gp_hyperparameters
9097
ExoIris.optimize_gp_hyperparameters
9198
ExoIris.gp
99+
ExoIris.plot_white_gp_predictions
92100

93101

94102
First steps
@@ -159,4 +167,32 @@ Utility methods
159167
.. autosummary::
160168
:toctree: api/
161169

170+
ExoIris.reset
162171
ExoIris.create_initial_population
172+
ExoIris.lnposterior
173+
174+
Properties
175+
----------
176+
177+
The following properties expose key internal states and parameters of the analysis:
178+
179+
.. autosummary::
180+
:toctree: api/
181+
182+
ExoIris.name
183+
ExoIris.data
184+
ExoIris.k_knots
185+
ExoIris.ndim
186+
ExoIris.nk
187+
ExoIris.nldp
188+
ExoIris.npb
189+
ExoIris.ldmodel
190+
ExoIris.sampler
191+
ExoIris.optimizer
192+
ExoIris.optimizer_population
193+
ExoIris.mcmc_chains
194+
ExoIris.white_times
195+
ExoIris.white_fluxes
196+
ExoIris.white_models
197+
ExoIris.white_errors
198+
ExoIris.ps

doc/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@
4949
'matplotlib': ('https://matplotlib.org', None),
5050
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
5151
'astropy': ('https://docs.astropy.org/en/stable/', None),
52-
'uncertainties': ('https://uncertainties.readthedocs.io/en/latest/', None)}
52+
'uncertainties': ('https://uncertainties.readthedocs.io/en/latest/', None),
53+
'pytransit': ('https://pytransit.readthedocs.io/en/latest/', None)}

exoiris/exoiris.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ def white_fluxes(self) -> list[ndarray]:
387387

388388
@property
389389
def white_models(self) -> list[ndarray]:
390+
"""Fitted white light curve flux model arrays."""
390391
fm = self._wa.flux_model(self._wa._local_minimization.x)
391392
return [fm[sl] for sl in self._wa.lcslices]
392393

@@ -556,7 +557,25 @@ def plot_white(self, axs=None, figsize: tuple[float, float] | None = None, ncols
556557
"""
557558
return self._wa.plot(axs=axs, figsize=figsize, ncols=ncols or min(self.data.size, 2))
558559

559-
def plot_white_gp_predictions(self, axs = None, ncol: int = 1, figsize: tuple[float, float] | None = None):
560+
def plot_white_gp_predictions(self, axs = None, ncol: int = 1, figsize: tuple[float, float] | None = None) -> None:
561+
"""Plot the predictions of a Gaussian Process model for white light curves and residuals.
562+
563+
Parameters
564+
----------
565+
axs
566+
Axes array in which the plots are drawn. If None, new subplots are generated.
567+
ncol
568+
The number of columns for the created grid of subplots. Used only if axs is None.
569+
figsize
570+
Size of the figure in inches (width, height). Used only if axs is None. If None,
571+
a default size is used.
572+
573+
Notes
574+
-----
575+
The number of rows for the subplots is determined dynamically based on the shape of
576+
the data and the number of columns specified (ncol). If the provided axes array (axs)
577+
does not accommodate all the subplots, the behavior is undefined.
578+
"""
560579
ndata = self.data.size
561580

562581
if axs is None:

0 commit comments

Comments
 (0)