A Python package to create informed prior probability distributions for reflectometry analysis
Project description
avant
Create informed priors for reflectometry analysis
avant
is a python package to extract values from refl_database
to create informed or uniform priors to be used in reflectometry analysis.
The aim of avant
is to improve reflectometry analysis by applying Bayesian Statistics and creating 'informed priors' which take into account literature values in the prior probability distributions of the parameters. The priors are created in a way where they can be directly implemented in Refnx
to perform reflectometry analysis. Plus, the package has plotting functionalities so you can see what the prior probability distributions look like.
Features
Currently, avant
only contains priors for the following five parameters for DMPC: head volume, tail volume, head thickness, tail thickness and roughness. It can create an informed prior, Gauss, with the following methods:
- pdf : probability distribution function
- logpdf : natural log of the probability distribution function
- cdf : cumulative distribution function
- ppf : percentile point function (quantile function / inverse cdf)
- rvs : random variate sampling
It can also create a uniform prior which is an upper and lower bound for the prior range. The following plotting functionalities are available:
- plotGauss(name='DMPC'): Plot a 'Gauss' prior probability distribution.
- plotUniform(name='DMPC'): Plot a uniform prior probability distribution.
Examples
-
Plotting the informed prior for head volume for DMPC:
import avant.parameter.vh as vh vh.plotGauss('DMPC')
-
Plotting the uniform prior for the head volume for DMPC:
import avant.parameter.vh as vh vh.plotUniform('DMPC')
-
Set a parameter equal to the Gauss object (can be used in Refnx)
import avant.parameter.vh as vh x = vh.Gauss('DMPC')
Problems
If you discover any issues with avant
feel free to either submit the issue to our issue tracker on Github, or fix the issue yourself and make a pull request to the main branch.
Installation
avant
is available on PyPI so can be installed using pip, otherwise this repository can be cloned and the latest build can be installed using the following:
pip install -r requirements.txt
python setup.py build
python setup.py install
pytest
Contributors
License
The project is licensed under the MIT license.
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
File details
Details for the file avant-0.0.1.tar.gz
.
File metadata
- Download URL: avant-0.0.1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 998e7496024b4bb60bce2a50e34611de075f72e30d84dc77fa2c5c4cd1f69a5b |
|
MD5 | 8076bf939ed09d60d31745eee6ac5a9a |
|
BLAKE2b-256 | bdf1c52af1c059491be253d4aff40626b296b7e014ba66c56cd50f05dc0a0a8f |
File details
Details for the file avant-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: avant-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a91e0c74e53e2b87ca72089736d0d67d44703efe5a6d79c9ecbd2ca2dcbd968 |
|
MD5 | 7cbed9575274fea3e2c03e268ba10dd9 |
|
BLAKE2b-256 | 480b0cde2bdc0cfbd0f543f0be7601b4bd4ca6163f9af0f2968db652a249e552 |