Bayesian Spectral Polarization Models
bayes_pol implements models to infer the physics of the interstellar medium from radio continuum polarization observations.
Install with pip in a conda virtual environment:
conda create --name bayes_pol -c conda-forge pymc>=5.20 pip
conda activate bayes_pol
pip install bayes_pol
Alternatively, download and unpack the latest release, or fork the repository and contribute to the development of bayes_pol!
Install in a conda virtual environment:
conda env create -f environment.yml
conda activate bayes_pol-dev
pip install -e .
The models provided by bayes_pol are implemented in the bayes_spec framework. bayes_spec assumes that the source of the polarization signal can be decomposed into a series of "clouds" with Gaussian-like Faraday depth distributions, each of which is defined by a set of model parameters. Here we describe the models available in bayes_pol.
The FaradayModel predicts observations of Stokes Q, U, and Faraday depth (the Fourier transform of the complex polarization) by assuming the polarized intensity is modified by a series of "clouds" in Faraday depth space. The following diagram demonstrates the relationship between the free parameters (empty ellipses), deterministic quantities (rectangles), model predictions (filled ellipses), and observations (filled, round rectangles). Many of the parameters are internally normalized (and thus have names like _norm). The subsequent tables describe the model parameters in more detail.
Cloud Parametervariable
|
Parameter | Units | Prior, where ( prior_{variable}
|
Defaultprior_{variable}
|
|---|---|---|---|---|
polarized_intensity |
Polarized intensity | data brightness | 100.0 |
|
faraday_depth_mean |
Mean Faraday depth | rad/m2 |
[0.0, 1000.0] |
|
faraday_depth_fwhm |
Faraday depth FWHM | rad/m2 |
10.0 |
|
pol_angle0 |
Polarization angle at |
rad |
See the various tutorial notebooks under docs/source/notebooks. Tutorials and the full API are available here: https://bayes-pol.readthedocs.io.
Anyone is welcome to submit issues or contribute to the development of this software via Github.
Copyright(C) 2025 by Trey V. Wenger
This code is licensed under MIT license (see LICENSE for details)
