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.
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.
-
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')
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.
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
The project is licensed under the MIT license.