Peakbagging made easy
PBjam is a Bayesian toolkit for analysing the oscillation spectra of solar-like oscillators. It first identifies modes in a power-density spectrum, then fits the individual peaks to measure their frequencies and other properties.
For main-sequence stars, mode identification fits the asymptotic
l=0,1,2 p-mode pattern jointly. For subgiants and red giants, PBjam first
fits the background and l=2,0 pairs, then selects an evolutionary-stage
model for the l=1 modes. Priors are informed by previous Kepler, K2 and
TESS observations distributed with the package.
Detailed peakbagging uses nested sampling or MCMC to fit Lorentzian profiles with fewer constraints than the mode-identification models.
PBjam requires Python 3.10 or newer:
python -m pip install pbjam
The high-level :class:`pbjam.session` interface accepts a power-density
spectrum as a two-row array. Frequencies must be in microhertz, and each
observable is supplied as a (value, uncertainty) pair:
import numpy as np
import pbjam
obs = {
"numax": (2204.0, 100.0),
"dnu": (103.2, 0.54),
"teff": (6140.0, 77.0),
# Optional, but improves prior selection when available:
"bp_rp": (0.700, 0.050),
}
run = pbjam.session(
"my-star",
obs,
spectrum=np.vstack((frequency, power_density)),
)
run()
star = run.stars[0]
mode_id_result = star.modeID.result
peakbag_result = star.peakbag.result
PBjam can also download light curves through Lightkurve or compute a spectrum from a supplied time series. See the documentation and example notebooks for those workflows.
If you want to raise an issue or contribute code to PBjam, see the contribution guidelines.
There are different ways to contribute to PBjam, the Scientific Influencers help guide the scientific aspects of PBjam, the Chaos Engineers try to break the code or simply report bugs, while the Main Contributors submit Pull Requests with somewhat bigger additions to the code or documentation.
| Main Contributors | Chaos Engineers | Scientific Influencers |
|---|---|---|
| Lindsey Carboneau | Warrick Ball | Othman Benomar |
| Guy Davies | Rafa Garcia | Bill Chaplin |
| Oliver Hall | Tanda Li | Enrico Corsaro |
| Alex Lyttle | Angharad Weeks | Patrick Gaulme |
| Martin Nielsen | Jens Rersted Larsen | Mikkel Lund |
| Joel Ong | Benoit Mosser | |
| George Hookway | Andy Moya | |
| Ian Roxburgh |
If you use PBjam in your work, please cite one of the PBjam papers (Paper I: Nielsen et al. 2021, Paper II: Nielsen et al. 2023) and, if possible, link to the GitHub repository.
We encourage users to also cite the packages and publications that PBjam makes use of.