Bayesian R-Matrix Inference Code Kit
BRICK is a Python package that serves as an interface to AZURE2 and readily permits the sampling of R-matrix parameters.
It accompanies AZURE2. The primary goal is to allow the user to deploy Markov Chain Monte Carlo (MCMC) to sample parameters that are typically optimized in a χ2-minimization analysis.
AZURE2 must be installed and available at the command
line via AZURE2. Currently, command-line execution is not available on Windows
or macOS.
NumPy and Matplotlib must be
available in order to run the test script in test directory.
emcee is the MCMC sampler that is used in the test scripts. BRICK is intentionally designed such that other samplers can be used with little effort.
The classes defined in this module are:
- AZR
- Parameter
- Level
- Output
- Segment
- Data
Handles communication with AZURE2 and its output.
Defines a sampled or "free" parameter.
Defines an R-matrix level (a line in the <levels> section of the .azr file).
Data structure for accessing output data. (I got tired of consulting the extremely well-documented manual for the output file format.)
Data structure to organize the information contained in line of the
<segmentsData> section of the .azr file.
Data structure that holds a list of Segments and provides some convenient functions for applying actions to all of them.
In the test directory there is a Python script (test.py) that predicts the
12C(p,gamma) cross section and compares it to the Vogl data.
Note that the script uses NumPy and Matplotlib.
The simplest way to install brick is to use pip via:
pip install brick-james
Alternatively, one may clone the repository on GitHub.
BRICK includes a suite of basic funcationality tests in the tests/12Cpg
directory. The tests perform calculations of the 12C(p,gamma) reaction with two
data sets. To run them, within the tests/12Cpg directory, use
python -m unittest -v tests.py
Once installed, brick allows the user to access the relevant classes and
functions by:
import brick
azr_object = brick.azr.AZR('input.azr')
More instructive test are forthcoming.