Transmission spectroscopy#
The ExoIris class is the core class of ExoIris used for transmission spectroscopy. It serves as the primary tool for
first fitting the white light curve model and subsequently fitting and sampling the spectroscopic light curve model.
Constructor#
The ExoIris class is initialized by providing a name for the analysis, selecting a limb darkening model, and passing the
spectroscopic light curves as either a TSData or TSDataGroup object.
Additional parameters can also be supplied to the initializer to refine the analysis, although these can be set
later if preferred.
The transmission spectroscopy transit model used in ExoIris, pytransit.TSModel, is based on PyTransit’s
RoadRunner transit model (pytransit.RRModel). The RoadRunner model is an advanced transit model that can
efficiently use any radially symmetric function to model stellar limb darkening, as described in
Parviainen (2020).
Since TSModel is based on RRModel, it offers the same flexibility for modeling stellar limb
darkening. The ldmodel argument can be one of the following:
a string representing one of the built-in limb darkening models supported by
RRModel, such aspower-2orquadratic,an object that is a subclass of the
pytransit.models.ldmodel.LDModellimb darkening model class,a tuple of two functions, with the first returning the limb darkening profile as a function of \(\mu\) and the second returning its integral over the stellar disk, or
a single function that returns the stellar limb darkening profile as a function of \(\mu\) , in which case its integral is computed numerically.
|
The core ExoIris class providing tools for exoplanet transit spectroscopy. |
Model saving and loading#
An ExoIris instance can be saved to a FITS file using the ExoIris.save method. This stores the model setup,
optimiser state, and MCMC sampler state, allowing the model to be fully recreated later using the load_model
function.
|
Save the ExoIris analysis to a FITS file. |
|
Load an ExoIris analysis from a FITS file. |
Light curve model setup#
All parts of an ExoIris analysis can be modified after initialisation. This enables iterative analysis approaches
where a saved low-resolution analysis can be loaded as a new analysis using the load_model function. Parameters
like the radius ratio and limb darkening knots can be adjusted to increase the resolution of the estimated
transmission spectrum, and even the observational data can be changed to improve the data resolution.
|
Set the model data. |
|
Set the radius ratio (k) knots. |
|
Add radius ratio (k) knots. |
Set the limb darkening knots. |
|
Add the wavelength locations of chosen radius ratio knots to the model as free parameters. |
|
Create a block of radius ratio knots using the full data resolution. |
|
|
Plot the model setup with limb darkening knots, radius ratio knots, and data binning. |
Interpolation configuration#
ExoIris uses interpolation to model the wavelength-dependent radius ratio and limb darkening
parameters. The interpolation method can be customized to balance smoothness against fidelity to the
data. Available interpolators include: nearest, linear, pchip, makima, bspline,
bspline-quadratic, and bspline-cubic.
Set the interpolator for the radius ratio (k) model. |
|
Set the interpolator for the limb darkening model. |
Parameterization and priors#
|
Set a prior on a model parameter. |
|
Set an identical prior on all baseline knots. |
|
Set priors on the limb darkening parameters using LDTk. |
|
Set an identical prior on all radius ratio (k) knots. |
Print the model parameterization. |
Noise model setup#
The noise in the spectroscopic light curves can be modeled as either white noise or time-correlated noise
(using a Gaussian process, GP). The noise model is chosen with the ExoIris.set_noise_model method, and can be
set to "white", "fixed_gp", or "free_gp". Selecting "fixed_gp" models the noise as a time-correlated
Gaussian process using the celerite2 package with fixed hyperparameters, while "free_gp" allows the GP
hyperparameters to be sampled as free parameters. The corresponding celerite2.GaussianProcess object can be
accessed directly via the ExoIris.gp attribute.
|
Set the noise model for the analysis. |
|
Set the Gaussian Process (GP) kernel. |
|
Set Gaussian Process (GP) hyperparameters assuming a Matern-3/2 kernel. |
Gaussian Process (GP) models. |
|
|
Plot the predictions of a Gaussian Process model for white light curves and residuals. |
Star spot modeling#
ExoIris supports modeling of star spot crossings during transit and the Transit Light Source Effect (TLSE). Star spots can cause both localized bumps in the light curve (when the planet occults a spot) and wavelength-dependent baseline variations (TLSE) due to the inhomogeneous stellar surface.
To use spot modeling, first initialize the spot model with ExoIris.initialize_spots, then add spots
for specific epoch groups using ExoIris.add_spot.
|
Initialize star spot model using given stellar and wavelength reference values. |
|
Add a new star spot and associate it with an epoch group. |
Number of star spots. |
First steps#
The first steps of a transmission spectroscopy analysis include fitting a white light curve and normalising the
spectroscopic light curves. ExoIris offers utility methods for both of these tasks, as well as for visualising the
results.
|
Fit a white light curve model and sets the out-of-transit mask. |
|
Normalize the baseline flux for each spectroscopic light curve. |
|
Plot the white light curve data with the best-fit model. |
|
Plot the model residuals. |
|
Plot the out-of-transit spectroscopic light curves before and after the normalization. |
Fitting and sampling#
The main tasks of ExoIris are to fit a spectroscopic light curve model to the observations and then sample its parameter
posterior to obtain a posterior transmission spectrum estimate. The fitting is carried out using a Differential Evolution
global optimiser and the sampling with the emcee affine invariant ensemble sampler.
The DE optimiser works by clumping a population of npop parameter vectors near the global posterior mode over niter
iterations. The optimisation can be stopped when the ptp width of the population’s log posterior distribution has
decreased below a desired threshold (by default 2), after which the MCMC sampling phase can be started.
Both of these methods can be called iteratively, in which case they start from the state they finished in the previous
call. At the first ExoIris.sample call, the sampler will start from the current DE optimiser population. Note that
loading a previous analysis with load_model also loads the sampler state, so calling ExoIris.sample after loading
a model continues the sampler from the saved sampler state. ExoIris.reset_sampler should be called after loading a
saved model if you want to change the setup, optimise the new setup, and then sample the posterior.
|
Fit the spectroscopic light curves jointly using Differential Evolution. |
|
Sample the posterior distribution using the emcee MCMC sampler. |
Reset the MCMC sampler |
Accessing the results#
The main results from an ExoIris analysis are the model parameter posterior samples and the transmission spectrum.
The transmission spectrum, represented as the planet-to-star area ratio as a function of wavelength, can be
retrieved as a Pandas DataFrame using the ExoIris.transmission_spectrum attribute. Similarly, the
model posterior samples can be accessed using the ExoIris.posterior_samples attribute, also in the form of a
Pandas DataFrame.
|
Compute the transmission spectrum. |
Get the posterior transmission spectrum as an Astropy Table. |
|
Posterior samples from the MCMC sampler. |
|
|
Plot either the best-fit model or the posterior model. |
|
Plot the transmission spectrum. |
|
Plot the model residuals. |
Plot the limb darkening parameters. |
Atmospheric retrieval#
ExoIris provides tools for atmospheric retrieval by creating a log-likelihood function that can be
used with external retrieval codes. The ExoIris.create_loglikelihood_function method returns a
callable that evaluates the log-likelihood for a given transmission spectrum model, accounting for
the full covariance structure of the data.
|
Create a reduced-rank Gaussian log-likelihood function for retrieval. |
Calculate posterior transmission spectrum samples. |
Utility methods#
|
Reset the internal states of the optimizer and sampler. |
|
Create an initial parameter vector population for the DE optimisation. |
|
Calculate the log posterior probability for a single parameter vector or an array of parameter vectors. |
Properties#
The following properties expose key internal states and parameters of the analysis:
Analysis name. |
|
Analysis data set. |
|
Radius ratio (k) knots. |
|
Number of free model parameters. |
|
Number of radius ratio (k) knots. |
|
Number of limb darkening knots. |
|
Number of passbands for each data set. |
|
Number of star spots. |
|
The limb darkening model. |
|
The emcee sampler. |
|
The global optimization algorithm. |
|
DE optimizer parameter vector population. |
|
Emcee sampler MCMC chains. |
|
White light curve time arrays. |
|
White light curve flux arrays. |
|
Fitted white light curve flux model arrays. |
|
White light curve flux error arrays. |
|
Model parameterization. |