anesthetic

Visualize Bayesian posterior samples from nested sampling and MCMC chains.

17|4|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/fundamental-physics/marketplace --skill anesthetic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anesthetic
Source: https://github.com/fundamental-physics/marketplace/tree/main/plugins/core/skills/anesthetic
Command: npx skills add https://github.com/fundamental-physics/marketplace --skill anesthetic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, anesthetic, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Visualizes posterior samples from Bayesian inference to produce publication-quality corner plots, 1D/2D marginal distributions, and Bayesian statistics from nested sampling or MCMC chains.

Core Features & Use Cases

  • Load chains from PolyChord, MultiNest, UltraNest, Cobaya, GetDist, and other supported formats.
  • Create 1D marginals and 2D corner plots with KDE, histograms, or scatter representations.
  • Compare prior vs posterior and compute Bayesian statistics (logZ, D_KL, logL_P, d_G) for model evaluation.
  • Transform and label parameters, derive new quantities, and manage multiple chains for comparative analyses.

Quick Start

Load posterior chains with read_chains and generate a publication-quality corner plot for your model parameters.

Frequently Asked Questions about anesthetic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate publication-quality corner plots from nested sampling chains?

To generate publication-quality corner plots from nested sampling chains, you can load posterior samples from PolyChord, MultiNest, or UltraNest and plot 1D/2D marginals using KDE or histograms via the anesthetic library.

Can I visualize posterior distributions from Cobaya or GetDist files?

Yes, you can visualize posterior distributions from Cobaya or GetDist files. The Skill loads these chain formats directly to create marginal distributions and posterior-prior comparisons for model evaluation.

What is the best way to compute Bayesian statistics like logZ and D_KL from MCMC outputs?

The best way to compute Bayesian statistics like logZ and D_KL from MCMC outputs involves loading posterior samples with the anesthetic library, which calculates logZ, D_KL, logL_P, and d_G for quantitative model evaluation.

Does this plotting method support comparing prior vs posterior distributions?

Yes, this plotting method supports comparing prior vs posterior distributions. You can overlay prior and posterior samples on the same axes to visualize parameter constraints and update factors.

How do I transform and label parameters when plotting Bayesian posteriors?

To transform and label parameters when plotting Bayesian posteriors, you manipulate loaded chain samples to derive new quantities, apply custom labels to axes, and manage multiple chains for comparative distribution analyses.

Are there limitations when creating 1D marginals and 2D corner plots for large parameter spaces?

When creating 1D marginals and 2D corner plots for large parameter spaces, rendering scatter representations and KDEs can become computationally intensive, requiring careful axis management and parameter selection via the anesthetic APIs.