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.

Metadata

Release files for brick-james 0.2.3

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.2.3
File Size Uploaded Provenance
brick_james-0.2.3.tar.gz 14.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 30.9 kB

Release files / brick_james-0.2.3.tar.gz

Download URL brick_james-0.2.3.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0649c11a48b70ff7fd849f4d6a12fc05d77ece8e170643ebaad658f4d3ba1102
BLAKE2b-256 checksum
How to use checksums
004c3d1682432744d06f66b817bbcdb9c992bb3ba4feb1edfcd5dbd4284efb13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

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

Download URL brick_james-0.2.3-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
645171e80fdc31cf10d7abdf31f3f223a5b5d3ac909cc08f64b0354d82257664
BLAKE2b-256 checksum
How to use checksums
8b0ca1365b49f42788a3979d4f2397e5879a07450d4a1637b83479caf882d5f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for brick-james 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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