-`ns`: GPU-vectorised nested sampling, returning the posterior and ln Z (Bayes factors for model comparison)
-`nuts`: the No-U-Turn Sampler (gradient-based)
-`ess`, `aies`: ensemble slice sampling and the affine-invariant ensemble sampler (gradient-free)
-**Peak search before sampling**: optimisations from many prior draws find the peaks of the posterior; NUTS and
the ensembles start from the best one with its curvature as scales, and several peaks (e.g. period aliases) are
reported with one configuration per peak to run separately
-**Runs until converged**: NUTS and the ensembles can stop as soon as the slowest parameter has the requested number
of independent draws (`target_ess`)
-**Named Priors & Global Tying**: tie parameters across different model components (e.g., sharing a stellar rotation period between multiple instrument and corresponding detrending schemes)
-**Comprehensive Light Curve Modeling**:
- Primary transits, phase curves and secondary eclipses (via `jaxoplanet`)
-**Transit Timing Variations (TTV)**: per-epoch free transit times with O−C posterior
- Phase curves with hotspot offsets (Lambert sphere)
- Ellipsoidal variations with tidal lag
- Doppler beaming
-**Flexible Systematics Treatment**:
- Polynomial detrending
- Error-In-Variables linear detrending
- Fourier series
- Gaussian Processes (tinygp with O(N) and O(N³) kernels)
-**Robust Uncertainty Quantification**:
- White noise and red noise components
- Correlated noise modeling
- Confidence bands from posterior samples
-**Models**: transits, secondary eclipses and phase curves (with hotspot offset, ellipsoidal variation and Doppler
beaming), the Rossiter–McLaughlin effect, Keplerian radial velocities, and free transit times (TTVs)
-**Systematics and noise**: polynomials, Fourier series, errors-in-variables detrending, Gaussian processes
(including multi-dimensional ones shared between light curves and activity indicators), white and correlated noise
-**Joint fits**: several instruments and data types at once, with shared orbital parameters and independent
systematics; parameters can be shared across components through named priors
-**Bayesian inference**: nested sampling, which returns the posterior and the Bayesian evidence for model
comparison, and the NUTS and ensemble samplers for parameter estimation; you choose the sampler, and a peak search
before sampling checks that the posterior has a single peak (or hands you one configuration per peak)
-**Reports and derived physics**: PDF reports with fits, residuals, corner and trace plots, periodograms and goodness
of fit, and the physical quantities derived from the posterior (stellar and planetary properties, energy balance,
albedos)
-**Reproducible and restartable**: checkpointed runs, portable result files, full provenance of every run
## Why Use PyAETNA?
-**Single YAML, complete analysis.** Define data paths, priors,
systematics, MCMC strategy, and post-processing physics in one
human-readable configuration file — no boilerplate Python scripts required.
-**GPU-accelerated end-to-end.** The entire forward model, likelihood, and
A complete **online configurator** is available at http://pyaetna-e92eeb.pages.ict.inaf.it/. The INAF Pages server does not offer HTTPS yet; if your browser or network refuses plain HTTP, open `docs/config-generator.html` from a copy of the repository (cloned, or downloaded over HTTPS from the repository page): it is a single static page and works offline.
-**[How PyAETNA compares with other codes](docs/benchmarks.md)** - Speed, evidence reliability and agreement with juliet, allesfitter, pyaneti and PyORBIT, with the cases where other codes are better
-**[Installation & Environment Guide](docs/dependencies.md)** - Everything about setting up PyAETNA
- Installation instructions (CPU and GPU)
@@ -168,17 +124,19 @@ Comprehensive documentation is available:
- Version compatibility and troubleshooting
- Conda and Docker alternatives
-**Output & Diagnostics.** After a successful run, PyAETNA creates an output directory named `PyAETNAouts/` inside the specified `data.working_dir`. Every file is named `<config>_<kind>`, where `<config>` is the configuration file name without `.yaml`, so several configurations fitted to the same data keep separate outputs. The folder contains:
-**[Configuration Guide](docs/config/index.md)** - Complete reference for all YAML configuration fields
- Samplers (nested sampling, NUTS, ensemble samplers), the peak search and convergence targets
-**Log (`<config>_run.log`)**: the record of the run: provenance and device, data and priors, the sampler's progress, the posterior summary with R-hat and effective sample sizes (or the Bayesian evidence), goodness of fit, derived quantities, warnings and the BibTeX entries to cite. **[Reading the run log](docs/outputs/run_log.md)** goes through it block by block and lists what to check first.
-**Results (`<config>_results.json`)**: the run settings (sampler, device, precision, chains, draws, seed), the provenance (code revision, package versions), R-hat and ESS for every parameter, the fixed parameters, the MAP, the goodness of fit (χ², maximum likelihood, AIC, AICc, BIC), the nested-sampling evidence, the instruments and the configuration.
-**Peaks (`<config>_peaks.json`)**: the peaks of the posterior found by the peak search before sampling, best first: energy, maximum log-likelihood, approximate (Laplace) evidence and weight, whether the peak is significant, position and widths of the parameters, and its Gaussian approximation (`z`, `cov`), from which a later run can start (`sampling.init_from_peaks`). With several significant peaks and `sampling.on_multiple_peaks: stop`, the run stops here and writes one configuration per peak, `<config>_peak<k>.yaml`, next to the original ([details](docs/config/sampling.md#the-peak-search-all-samplers)).
-**Posterior samples (`<config>_samples.npz`)**: one array per parameter, shaped `(chain, draw)`, and the `potential_energy` of every draw when the sampler records it (NUTS, nested sampling).
-**Model components (`<config>_components.npz`)**: the data (`bjd`, `y`, `dy`, `instrument`, `visit`) and, on every data point, the MAP model and its components (`map/total`, `map/planet`, `map/gp_mean`, …), the posterior median (`median/…`) and the 16th–84th percentile band (`q16_84/…`).
-**Report (`<config>_report.pdf`)** and, with a `physics:` section, **physics report (`<config>_physics.pdf`)**: phase-folded fits, residuals, corner plots and derived quantities. **[Reading the PDF reports](docs/outputs/report.md)** shows an example of every page and how to read it.
-**Checkpoint (`<config>_checkpoint.pckl`)**: the sampler state, used to resume a run and by the reports. It holds PyAETNA objects that a later version may not be able to open: keep the `.json` and `.npz` files as the record of a run.
-**[Online configurator](http://pyaetna-e92eeb.pages.ict.inaf.it/)** - Write or edit a configuration file in the browser
- The INAF Pages server does not offer HTTPS yet; if your browser or network refuses plain HTTP, open `docs/config-generator.html` from a copy of the repository (cloned, or downloaded over HTTPS from the repository page): it is a single static page and works offline
The `.json` and `.npz` files hold only numbers, strings and arrays, so they can be read with `json` and `numpy` (or any language) without PyAETNA; `PyAETNA.outputs` has loaders for them. To load, plot and rebuild the model from them, see the [Loading and plotting results](docs/load_binary_model.ipynb) notebook.
-**[Output & Diagnostics](docs/outputs/index.md)** - What a run writes and how to read it
- The run log, the results and sample files, the peaks of the posterior and the PDF reports
- Guides to [reading the run log](docs/outputs/run_log.md) and [the PDF reports](docs/outputs/report.md)
- Loading the results without PyAETNA
Additional resources:
- Test files in `tests/`
@@ -232,7 +190,7 @@ PyAETNA enforces automated code formatting, linting, and static type safety:
If you use PyAETNA in your research, please add the following citation in your publication:
#TODO add citation to PyAETNA
#TODO add bibtex citation to PyAETNA
Please also cite the relevant works
listed in [docs/CITATIONS.md](docs/CITATIONS.md). For your convenience, at the end of every run the