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.
Metadata
Release files for avant 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| avant-0.0.1.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| avant-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / avant-0.0.1.tar.gz
| Download URL | avant-0.0.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
998e7496024b4bb60bce2a50e34611de075f72e30d84dc77fa2c5c4cd1f69a5b
|
|
BLAKE2b-256 checksum How to use checksums |
bdf1c52af1c059491be253d4aff40626b296b7e014ba66c56cd50f05dc0a0a8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / avant-0.0.1-py3-none-any.whl
| Download URL | avant-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a91e0c74e53e2b87ca72089736d0d67d44703efe5a6d79c9ecbd2ca2dcbd968
|
|
BLAKE2b-256 checksum How to use checksums |
480b0cde2bdc0cfbd0f543f0be7601b4bd4ca6163f9af0f2968db652a249e552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|