{"id":28277,"library":"spright","title":"spright","description":"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.","status":"active","version":"25.6.3","language":"python","source_language":"en","source_url":"https://github.com/ExoWorlds/spright","tags":["astronomy","exoplanets","bayesian","interior-composition","radius-density"],"install":[{"cmd":"pip install spright","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"SPRight","correct":"from spright import SPRight"}],"quickstart":{"code":"from spright import SPRight\n\n# Initialize the model\nmodel = SPRight()\n\n# Evaluate the posterior for a given radius and mass (Earth units)\nradius = 1.5  # R_earth\nmass = 3.0    # M_earth\n\n# Get posterior samples of core mass fraction and water mass fraction\nsamples = model.predict(mass, radius)\nprint(samples)\n","lang":"python","description":"Quickstart: initialize SPRight, then call predict with mass and radius in Earth units to obtain posterior samples."},"warnings":[{"fix":"Remove config argument; set parameters via environment variables or the new SPRightConfig object if needed.","message":"SPRight no longer supports direct instantiation with a config dictionary; use the default constructor.","severity":"breaking","affected_versions":">=25.0.0"},{"fix":"Replace calls to spright.mcmc with SPRight().predict().","message":"The function 'spright.mcmc' has been deprecated in favor of the class-based API.","severity":"deprecated","affected_versions":">=24.5.0"},{"fix":"Convert masses and radii to Earth units before calling predict.","message":"Mass and radius must be in Earth units (M_earth, R_earth); using SI units will produce incorrect results.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use the class-based API: from spright import SPRight; model = SPRight(); samples = model.predict(mass, radius).","cause":"The module-level function mcmc was removed in version 25.0.0.","error":"AttributeError: module 'spright' has no attribute 'mcmc'"},{"fix":"Flatten your inputs: mass = np.array(mass).ravel(); radius = np.array(radius).ravel().","cause":"predict() expects scalar or 1D array inputs; passing 2D arrays or lists of lists raises this error.","error":"ValueError: Input mass and radius must be 1D arrays or scalars."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}