PyLebedev
Purpose
PyLebedev is a python package that stores Lebedev quadrature coefficients for integration over the unit sphere.
Installation
Anaconda
Open Anaconda prompt and type
conda install -c ifilot pylebedev
PyPi
Open a terminal and type
pip install pylebedev
Usage
from pylebedev import PyLebedev
import numpy as np
def main():
"""
Test Lebedev quadrature for probe function
"""
# build library
leblib = PyLebedev()
# exact answer to function "testfunc"
exact = 216.0 * np.pi / 35.0
r,w = leblib.get_points_and_weights(9)
integral = 4.0 * np.pi * np.sum(w * tfunc(r[:,0], r[:,1], r[:,2]))
print('Integral: %f vs Exact: %f' % (integral, exact))
def tfunc(x,y,z):
"""
Trial function to test
Adapted from: https://cbeentjes.github.io/files/Ramblings/QuadratureSphere.pdf
This function has the exact result upon integration over a unit sphere
of 216/35 * pi
"""
return 1 + x + y**2 + x**2*y + x**4 + y**5 + x**2*y**2*z**2
if __name__ == '__main__':
main()
Metadata
Release files for pylebedev 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylebedev-1.1.0.tar.gz | 332.8 kB | Without provenance | Details for pylebedev-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylebedev-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for pylebedev-1.1.0-py3-none-any.whl |
Total release size: 673.1 kB
Release files / pylebedev-1.1.0.tar.gz
| Download URL | pylebedev-1.1.0.tar.gz |
|---|---|
| Size | 332.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40d3f2b438682800f657c1954c57382a23af92a49731e7500463569a569dd46c
|
|
BLAKE2b-256 checksum How to use checksums |
33b6bf557f596d3abb8b50210ab5093757843dd2003e014cd179817011ca595d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / pylebedev-1.1.0-py3-none-any.whl
| Download URL | pylebedev-1.1.0-py3-none-any.whl |
|---|---|
| Size | 340.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f7afc5e53d9392931e1c4967c4b85a25b9950efceb1df22bc08f4de03808c68
|
|
BLAKE2b-256 checksum How to use checksums |
83b4572040cb7e4df5c38ddb01f2e2a8903507bd27c15271dd2552391d42a43a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for pylebedev 1.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.