pysofft


Namepysofft JSON
Version 0.1.3 PyPI version JSON
download
home_page
SummaryPython port of the C library SOFT 2.0, that computes fourier transforms on the rotation group SO(3).
upload_time2023-09-04 10:42:37
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords so(3) fft fourier transform soft
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PySOFFT
This package allows to compute Fourier transforms on the rotation group SO(3).\
It is a partial python port of soft-2.0 released by Peter Kostelec and Daniel Rockmore.

For details see their paper:\
FFTs on the Rotation Group\
J Fourier Anal Appl (2008) 14: 145–179\
DOI 10.1007/s00041-008-9013-5

The present numba code is a more or less straight copy/adaptation of the original C implementation.\
PySOFT is made available with conset of the original authors and under the same GPL3 license.


## Installation
```
pip install pysofft
```
Dependencies are: numpy and numba
## Usage
Creating a Transform class for a fixed bandwidth (maximal considered spherical harmonic order +1)
```
from pysofft.soft import Soft

bandwidth = 32
soft_obj = Soft(bandwidth)
```
SO(3) grid points (gives as (2 bandwidth,2 bandwidth,2 bandwidth,3) array of euler angles $\alpha,\beta,\gamma$):
```
soft_obj.grid
```
FFT Coefficient grid points labeled by $n,m,l$ corresponding to the Wigner-D matrix $D^l_{n,m}$
```
soft_obj.coeff_grid
```

Creating random coefficients and computing the FFT on SO(3)
```
import numpy as np
Flnm=np.random.rand(*soft_obj.coeff_grid.shape[:-1]).astype('complex')

f = soft_obj.inverse_cmplx(Flnm) # inverse Transform   (Dlnm Coefficients -> SO(3))
Flnm2 = soft_obj.forward_cmplx(f) # forward Transform  (SO(3) -> Dlnm Coefficients)
```

## Known Issues
There are some bugs when spawning child processes after instanciation of the class Soft.
So, as of now consider Soft to be not fork save.
If you want to use Soft in a multiprocess environment initiallize Soft in each child process individually.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pysofft",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "SO(3) FFT fourier transform SOFT",
    "author": "",
    "author_email": "Unknown <tim.berberich@xfel.eu>",
    "download_url": "https://files.pythonhosted.org/packages/7e/92/c7032687895bdeaffb898502e4ccf344677111ca073d74f5305a83ce1914/pysofft-0.1.3.tar.gz",
    "platform": null,
    "description": "# PySOFFT\nThis package allows to compute Fourier transforms on the rotation group SO(3).\\\nIt is a partial python port of soft-2.0 released by Peter Kostelec and Daniel Rockmore.\n\nFor details see their paper:\\\nFFTs on the Rotation Group\\\nJ Fourier Anal Appl (2008) 14: 145\u2013179\\\nDOI 10.1007/s00041-008-9013-5\n\nThe present numba code is a more or less straight copy/adaptation of the original C implementation.\\\nPySOFT is made available with conset of the original authors and under the same GPL3 license.\n\n\n## Installation\n```\npip install pysofft\n```\nDependencies are: numpy and numba\n## Usage\nCreating a Transform class for a fixed bandwidth (maximal considered spherical harmonic order +1)\n```\nfrom pysofft.soft import Soft\n\nbandwidth = 32\nsoft_obj = Soft(bandwidth)\n```\nSO(3) grid points (gives as (2 bandwidth,2 bandwidth,2 bandwidth,3) array of euler angles $\\alpha,\\beta,\\gamma$):\n```\nsoft_obj.grid\n```\nFFT Coefficient grid points labeled by $n,m,l$ corresponding to the Wigner-D matrix $D^l_{n,m}$\n```\nsoft_obj.coeff_grid\n```\n\nCreating random coefficients and computing the FFT on SO(3)\n```\nimport numpy as np\nFlnm=np.random.rand(*soft_obj.coeff_grid.shape[:-1]).astype('complex')\n\nf = soft_obj.inverse_cmplx(Flnm) # inverse Transform   (Dlnm Coefficients -> SO(3))\nFlnm2 = soft_obj.forward_cmplx(f) # forward Transform  (SO(3) -> Dlnm Coefficients)\n```\n\n## Known Issues\nThere are some bugs when spawning child processes after instanciation of the class Soft.\nSo, as of now consider Soft to be not fork save.\nIf you want to use Soft in a multiprocess environment initiallize Soft in each child process individually.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python port of the C library SOFT 2.0, that computes fourier transforms on the rotation group SO(3).",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/TimBerberich/pysoft"
    },
    "split_keywords": [
        "so(3)",
        "fft",
        "fourier",
        "transform",
        "soft"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9777fb4754aa4c04748649e8fdf9c682ca58f7926826d810aff3a73663cee296",
                "md5": "07408058ae37816e36912820c934563c",
                "sha256": "b3ce0fcb7c0283eacc0e7ce26ef88a3c594174b3ed8875a753eb494d5d778008"
            },
            "downloads": -1,
            "filename": "pysofft-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "07408058ae37816e36912820c934563c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 1781104,
            "upload_time": "2023-09-04T10:42:35",
            "upload_time_iso_8601": "2023-09-04T10:42:35.222626Z",
            "url": "https://files.pythonhosted.org/packages/97/77/fb4754aa4c04748649e8fdf9c682ca58f7926826d810aff3a73663cee296/pysofft-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e92c7032687895bdeaffb898502e4ccf344677111ca073d74f5305a83ce1914",
                "md5": "cee2b561cf9574f164992f8d2021a22c",
                "sha256": "25473d4ee6ae240c55f79af2a3a82af57229edc0a3405f5aa550fe31f79bc76b"
            },
            "downloads": -1,
            "filename": "pysofft-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "cee2b561cf9574f164992f8d2021a22c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1777504,
            "upload_time": "2023-09-04T10:42:37",
            "upload_time_iso_8601": "2023-09-04T10:42:37.338180Z",
            "url": "https://files.pythonhosted.org/packages/7e/92/c7032687895bdeaffb898502e4ccf344677111ca073d74f5305a83ce1914/pysofft-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-04 10:42:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TimBerberich",
    "github_project": "pysoft",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pysofft"
}
        
Elapsed time: 0.11146s