rdireen / spherepy

Numerical routines written in python for working with spherical hamonics
GNU General Public License v3.0
12 stars 3 forks source link

SpherePy

SpherePy is a package for working with scalar and vector spherical harmonics. It provides:

Metrics

AppVeyor:

Build status

TravisCI:

Build Status Coverage Status

PyPI:

Latest Version Supported Python versions Supported Python implementations Development Status Download format

Documentation

I'm working on a more complete set of documentation here.

Install

Ubuntu: Before installing SpherePy you must install build-essential, python-dev, and NumPy

$ sudo apt-get install build-essential python-dev

For NumPy you need to decide if you want to build it yourself with

$ sudo pip install numpy

or download the package with

$ sudo apt-get install python-numpy

I have been building NumPy using the pip method, but it takes a long time.

Then you can

$ sudo pip install spherepy

Windows: Make sure you have Numpy on your machine, then

$ pip install spherepy

Plotting

If you would like to use the plotting routines within SpherePy, install matplotlib:

$ sudo pip install matplotlib

Quick Example

import spherepy as sp 
c = sp.random_coefs(4, 4) # generate some random coefficients
sp.pretty_coefs(c)
p = sp.ispht(c, 50, 50) # inverse spherical transform to pattern
sp.plot_sphere_mag(p) # plot the magnitude of the pattern

Credits

A list of the contributors to spherepy can be found here.

The algorithms within this package have been implemented, in part, using the documentation within the NIST Interagency/Internal Report (NISTIR) - 3955 citation. The majority or the code, however, has been developed using Ronald C. Wittmann's unpublished notes.

Contributing

Reporting bugs, suggesting features, helping with documentation, and adding to the code is very welcome. See Contributing.

License

Copyright (C) 2015 Randy Direen spherepy@direentech.com. SpherePy is licensed under GNU General Public License, version 3, a copy of this license has been provided within the COPYING file in this directory, and can also be found at http://www.gnu.org/licenses/.