<p align="center">
<img alt="openquad" src="https://raw.githubusercontent.com/qucontrol/openquad/main/doc/_static/images/logo.svg" width="300">
<br>
Open database for multi-dimensional numerical integration
</p>
[![Source code on Github](https://img.shields.io/badge/github-qucontrol/openquad-blue.svg)](https://github.com/qucontrol/openquad)
[![Documentation](https://img.shields.io/badge/docs-gh--pages-blue.svg)](https://qucontrol.github.io/openquad)
[![Openquad on the Python Package Index](https://img.shields.io/pypi/v/openquad.svg)](https://pypi.python.org/pypi/openquad)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![arXiv](https://img.shields.io/badge/arXiv-2407.17434-b31b1b.svg)](https://arxiv.org/abs/2407.17434)
---
> [!NOTE]
> The first stable release is under active development.
> Stay tuned for any updates!
---
<!-- start including on doc landing page -->
OpenQuad offers a collection of highly efficient quadrature methods for
evaluating integrals on different domains and geometries, including 1d
intervals, spherical surfaces, Euler angles and more. These methods serve as
building blocks for constructing custom quadratures, making this package
versatile for integrals over arbitrary multi-dimensional domains and tensor
spaces.
<!-- end including on doc landing page -->
**Key features**:
- Access a large collection of state-of-the-art quadrature methods (Gauss
quadratures, spherical designs, uniform coverings, ...).
- Combine methods to create customized product quadratures.
- Integrate Python functions and array data with a single command.
- Export quadrature points and weights for use in other software.
[**Get started!**][docs]
Found a bug? [Open an issue](https://github.com/qucontrol/openquad/issues).
Missing a feature? [Start a discussion](https://github.com/qucontrol/openquad/discussions).
We appreciate and welcome your [contribution][contribute]!
Installation
------------
This package is available on
[PyPi](https://pypi.org/project/openquad). Install it with `pip`
into your active environment:
```bash
python -m pip install openquad
```
Basic usage
-----------
Obtain Gauss-Legendre sample points and weights for degree `71` on the interval
`[-10, 5]`:
```python
from openquad import Rn
quad = Rn([
('GaussLegendre', dict(degree=71, a=-10, b=5)),
])
quad.points
quad.weights
```
Integrate a function `func(theta, phi)` over the surface of the
two-dimensional unit sphere using a [spherical design][designs] of degree `7`:
```python
from openquad import S2
quad = S2([
('S2-Design-Graef', dict(degree=7)),
])
quad.integrate(func)
```
Create a quadrature method for an integral over the three [Euler angles][angles],
using [Lebedev-Laikov quadrature][lebedev] of degree `5` for the first two angles
combined with the composite trapezoid rule with `6` sample points for the third
angle, and export sample points and weights in a text file:
```python
from openquad import SO3
quad = SO3([
('LebedevLaikov', dict(degree=5)),
('Trapezoid', dict(size=6)),
])
quad.savetxt('points_and_weights.dat')
```
For further information, including advanced examples, background information,
and details on the implementation, see the [documentation][docs].
Citation
--------
If this package was useful for your research, please [cite it][cite].
[angles]: https://en.wikipedia.org/wiki/Euler_angles
[designs]: https://en.wikipedia.org/wiki/Spherical_design
[lebedev]: https://en.wikipedia.org/wiki/Lebedev_quadrature
[docs]: https://qucontrol.github.io/openquad
[cite]: https://qucontrol.github.io/openquad/latest/using/cite.html
[contribute]: https://qucontrol/github.io/openquad/latest/contributing/index.html
Raw data
{
"_id": null,
"home_page": null,
"name": "openquad",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "Euler angles, Lebedev, SO3, illumination integral, integration, numerical integration, orientation, orientation average, quadrature, spherical quadrature",
"author": null,
"author_email": "Alexander Blech <alexander.blech@fu-berlin.de>",
"download_url": "https://files.pythonhosted.org/packages/ae/b0/94f741468fa8bc1c8d4aaef952395722464156ef761b63ddee1b92fd9385/openquad-0.3.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n<img alt=\"openquad\" src=\"https://raw.githubusercontent.com/qucontrol/openquad/main/doc/_static/images/logo.svg\" width=\"300\">\n<br>\nOpen database for multi-dimensional numerical integration\n</p>\n\n[![Source code on Github](https://img.shields.io/badge/github-qucontrol/openquad-blue.svg)](https://github.com/qucontrol/openquad)\n[![Documentation](https://img.shields.io/badge/docs-gh--pages-blue.svg)](https://qucontrol.github.io/openquad)\n[![Openquad on the Python Package Index](https://img.shields.io/pypi/v/openquad.svg)](https://pypi.python.org/pypi/openquad)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![arXiv](https://img.shields.io/badge/arXiv-2407.17434-b31b1b.svg)](https://arxiv.org/abs/2407.17434)\n\n---\n> [!NOTE]\n> The first stable release is under active development. \n> Stay tuned for any updates!\n---\n\n<!-- start including on doc landing page -->\nOpenQuad offers a collection of highly efficient quadrature methods for\nevaluating integrals on different domains and geometries, including 1d\nintervals, spherical surfaces, Euler angles and more. These methods serve as\nbuilding blocks for constructing custom quadratures, making this package\nversatile for integrals over arbitrary multi-dimensional domains and tensor\nspaces.\n<!-- end including on doc landing page -->\n\n**Key features**:\n\n- Access a large collection of state-of-the-art quadrature methods (Gauss\n quadratures, spherical designs, uniform coverings, ...).\n- Combine methods to create customized product quadratures.\n- Integrate Python functions and array data with a single command.\n- Export quadrature points and weights for use in other software.\n\n[**Get started!**][docs]\n\nFound a bug? [Open an issue](https://github.com/qucontrol/openquad/issues). \nMissing a feature? [Start a discussion](https://github.com/qucontrol/openquad/discussions).\n\nWe appreciate and welcome your [contribution][contribute]!\n\n\nInstallation\n------------\n\nThis package is available on\n[PyPi](https://pypi.org/project/openquad). Install it with `pip`\ninto your active environment:\n\n```bash\npython -m pip install openquad\n```\n\nBasic usage\n-----------\n\nObtain Gauss-Legendre sample points and weights for degree `71` on the interval\n`[-10, 5]`:\n\n```python\nfrom openquad import Rn\n\nquad = Rn([\n ('GaussLegendre', dict(degree=71, a=-10, b=5)),\n])\nquad.points\nquad.weights\n```\n\nIntegrate a function `func(theta, phi)` over the surface of the\ntwo-dimensional unit sphere using a [spherical design][designs] of degree `7`:\n\n```python\nfrom openquad import S2\n\nquad = S2([\n ('S2-Design-Graef', dict(degree=7)),\n])\nquad.integrate(func)\n```\n\nCreate a quadrature method for an integral over the three [Euler angles][angles],\nusing [Lebedev-Laikov quadrature][lebedev] of degree `5` for the first two angles\ncombined with the composite trapezoid rule with `6` sample points for the third\nangle, and export sample points and weights in a text file:\n\n```python\nfrom openquad import SO3\n\nquad = SO3([\n ('LebedevLaikov', dict(degree=5)),\n ('Trapezoid', dict(size=6)),\n])\nquad.savetxt('points_and_weights.dat')\n```\n\nFor further information, including advanced examples, background information,\nand details on the implementation, see the [documentation][docs].\n\n\nCitation\n--------\n\nIf this package was useful for your research, please [cite it][cite].\n\n\n[angles]: https://en.wikipedia.org/wiki/Euler_angles\n[designs]: https://en.wikipedia.org/wiki/Spherical_design\n[lebedev]: https://en.wikipedia.org/wiki/Lebedev_quadrature\n[docs]: https://qucontrol.github.io/openquad\n[cite]: https://qucontrol.github.io/openquad/latest/using/cite.html\n[contribute]: https://qucontrol/github.io/openquad/latest/contributing/index.html\n",
"bugtrack_url": null,
"license": null,
"summary": "Open database for multi-dimensional numerical integration",
"version": "0.3.0",
"project_urls": null,
"split_keywords": [
"euler angles",
" lebedev",
" so3",
" illumination integral",
" integration",
" numerical integration",
" orientation",
" orientation average",
" quadrature",
" spherical quadrature"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "89f9e969e76dd5bda308972c5731a11bf6f5ea9cd820e704bf7828768da7e7de",
"md5": "05f5b09d24495e776d7bfd6746f3c094",
"sha256": "5a490c87d20f9cdb2d593b69aa7fc11feec03919a55f487ac5ab73dace867793"
},
"downloads": -1,
"filename": "openquad-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "05f5b09d24495e776d7bfd6746f3c094",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 97869830,
"upload_time": "2024-10-08T09:56:27",
"upload_time_iso_8601": "2024-10-08T09:56:27.511683Z",
"url": "https://files.pythonhosted.org/packages/89/f9/e969e76dd5bda308972c5731a11bf6f5ea9cd820e704bf7828768da7e7de/openquad-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "aeb094f741468fa8bc1c8d4aaef952395722464156ef761b63ddee1b92fd9385",
"md5": "83e1566f8ca8db46f16a6b62ad3d4ae9",
"sha256": "2afe0e9106959299cd240c367d95057994fedfe554ec3476930268c2dc1dae37"
},
"downloads": -1,
"filename": "openquad-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "83e1566f8ca8db46f16a6b62ad3d4ae9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 97791407,
"upload_time": "2024-10-08T09:56:35",
"upload_time_iso_8601": "2024-10-08T09:56:35.768944Z",
"url": "https://files.pythonhosted.org/packages/ae/b0/94f741468fa8bc1c8d4aaef952395722464156ef761b63ddee1b92fd9385/openquad-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 09:56:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "openquad"
}