A Python interface to AZURE2 that makes it easy to sample R-matrix parameters.
Project description
BRICK
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.
Requirements
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.
Overview
The classes defined in this module are:
- AZR
- Parameter
- Level
- Output
- Segment
- Data
AZR
Handles communication with AZURE2 and its output.
Parameter
Defines a sampled or "free" parameter.
Level
Defines an R-matrix level (a line in the <levels>
section of the .azr file).
Output
Data structure for accessing output data. (I got tired of consulting the extremely well-documented manual for the output file format.)
Segment
Data structure to organize the information contained in line of the
<segmentsData>
section of the .azr file.
Data
Data structure that holds a list of Segments and provides some convenient functions for applying actions to all of them.
Example
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.
Installation
Once the repository has been cloned in location
, the user can simply modify
the path and import
the relevant modules.
import sys
sys.path.append(location)
import azr
import parameter
import utility
import level
import output
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for brick_james-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f97ea5cff3998ac6bba16c9440e4494b45d49f402ecaef8b6daff8fbfb71e7 |
|
MD5 | 6dd109c14a20cda92429dbb224acb625 |
|
BLAKE2b-256 | 884f7afacf40b9e13ffd03e0ff0caccb00be898db0dfef3247b4b173efa23c93 |