Registry / ai-ml / spright

spright

JSON →
library25.6.3pypypiunverified

Bayesian radius-density-mass relation for small planets, using a hierarchical Bayesian model to infer interior composition from observed mass and radius. Current version 25.6.3, released monthly.

pip install spright
INSTALL
IMPORT
SIG · SPRIGHT
S
spright
ai-mlpythonv25.6.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SPRight
from spright import SPRight

Quickstart: initialize SPRight, then call predict with mass and radius in Earth units to obtain posterior samples.

from spright import SPRight # Initialize the model model = SPRight() # Evaluate the posterior for a given radius and mass (Earth units) radius = 1.5 # R_earth mass = 3.0 # M_earth # Get posterior samples of core mass fraction and water mass fraction samples = model.predict(mass, radius) print(samples)
Debug
Known issues
breakingSPRight no longer supports direct instantiation with a config dictionary; use the default constructor.
fix
Remove config argument; set parameters via environment variables or the new SPRightConfig object if needed.
affects: >=25.0.0
deprecatedThe function 'spright.mcmc' has been deprecated in favor of the class-based API.
fix
Replace calls to spright.mcmc with SPRight().predict().
affects: >=24.5.0
gotchaMass and radius must be in Earth units (M_earth, R_earth); using SI units will produce incorrect results.
fix
Convert masses and radii to Earth units before calling predict.
affects: all
Upgrade
Version history
25.6.3latest on PyPI · released Jun 3, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
spright — pip install spright · libregistry