Skip to main content

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:

  1. AZR
  2. Parameter
  3. Level
  4. Output
  5. Segment
  6. 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

The simplest way to install brick is to use pip via:

pip install brick-james

Alternatively, one may clone the repository on GitHub.

Tests

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 unittests -v tests.py

Use

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.

Release files for brick-james 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brick-james 0.1.0
File Size Uploaded
brick-james-0.1.0.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for brick-james 0.1.0
File Interpreter ABI Platform
brick_james-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.7 kB

Release files / brick-james-0.1.0.tar.gz

Download URL brick-james-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dda16612466b4edd8533a62c4db0d056d681d24c6394d0e1eb372e9c449e67a3
BLAKE2b-256 checksum
How to use checksums
13eac835406a8c17470a542dff14404a2573c2b4149bc4db190a6f1f2e375ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / brick_james-0.1.0-py3-none-any.whl

Download URL brick_james-0.1.0-py3-none-any.whl
Size 34.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d8ec927ad513d14e704f372a4d7c79e2ecd0c61e267e9c34d36c012e2dc6902
BLAKE2b-256 checksum
How to use checksums
9725efc50df14f116d73bb8d18e3e77e84e34e29067f82535a54c02e2911bb4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

0.2.3

2 release files

0.2.2

1 release file

0.2.1

2 release files

0.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page