https://github.com/chohner/sofia-toolbox-py
python port of the sofia toolbox
https://github.com/chohner/sofia-toolbox-py
Last synced: 5 days ago
JSON representation
python port of the sofia toolbox
- Host: GitHub
- URL: https://github.com/chohner/sofia-toolbox-py
- Owner: chohner
- License: gpl-3.0
- Created: 2016-06-08T13:15:34.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-28T09:40:57.000Z (about 10 years ago)
- Last Synced: 2025-10-19T22:48:00.804Z (9 months ago)
- Language: Python
- Size: 2.83 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SOFiA-py
SOFiA-py is a Python port of the [Sound Field Analysis Toolbox (SOFiA) toolbox](https://github.com/fietew/sofia-toolbox), originally by Benjamin Bernschütz[[1]](#references). The main goal of the SOFiA toolbox is to analyze, visualize and process soundfield data recorded by spherical microphone arrays. Furthermore, various types of testdata may be generated to evaluate the implemented functions.
The package is pure python and PEP8 compliant (except line-length). As the port is ongoing, no serious attempts at speed optimization have been made, please expect things to be slow for now.
## Requirements
The following external libraries are required to use most of the supplied functions:
- [NumPy](http://www.numpy.org)
- [SciPy](http://www.scipy.org)
- [matplotlib](http://matplotlib.org) (for 2D plotting)
- [vispy](http://vispy.org) (for 3D plotting)
## Overview
- `gen` contains functions to generate data:
- `wgc`: Wave Generator
- `mf`: Modal Radial Filter Generator
- `lebedev`: Lebedev Quadrature
- `swg`: Sampled Wave Generator
- `process` contains processing functions:
- `pdc`: Plane Wave Decomposition
- `tdt`: Time Domain Reconstruction
- `stc`: Fast Spatial Fourier Transform
- `itc`: Fast Inverse Spatial Fourier Transform
- `plot` contains function for visualization:
- `makeMTX`: Generate 3D-matrix data
- `visualize3D`: Draw matrix data in 3D
- `sph` contains helper functions for dealing with spherical harmonics:
- `sph_harm`: More robust spherical harmonic coefficients
- `spbessel` / `dspbessel`: Spherical Bessel and derivative
- `spneumann` / `dspneumann`: Spherical Neumann (Bessel 2nd kind) and derivative
- `sphankel` / `dsphankel`: Spherical Hankel and derivative
- `cart2sph` / `sph2cart`: Convert cartesion to spherical coordinates and vice versa
## Working examples
## AE1: Ideal Plane Wave
Ideal unity plane wave simulation and 3D plot.
#### Colorized 3D scatter:

#### Shape-based visualization:

## AE2: Sampled Plane Wave
Sampled unity plane wave simulation for different kr

### AE6: Impulse response of ideal plane wave
Impulse Response reconstruction on a simulated ideal unity plane wave

### AE7: Impulse response of sampled plane wave
Impulse response reconstruction on a simulated sampled unity plane wave

## Contact
SOFiA-py is under development by Christoph Hohnerlein (`firstname.lastname[at]qu.tu-berlin.de`) as part of the [Artificial Reverberation for Sound Field Synthesis](https://www.qu.tu-berlin.de/menue/forschung/laufende_projekte/artificial_reverberation_for_sound_field_synthesis_dfg/) project at the [Quality and Usability Lab](https://www.qu.tu-berlin.de) of the TU Berlin.
## References
SOFiA-py is based on the Matlab/C++ toolbox [SOFiA](https://github.com/fietew/sofia-toolbox) by Benjamin Bernschütz. For more information you may refer to the original publication:
[1] [Bernschütz, B., Pörschmann, C., Spors, S., and Weinzierl, S. (2011). SOFiA Sound Field Analysis Toolbox. Proceedings of the ICSA International Conference on Spatial Audio](http://spatialaudio.net/sofia-sound-field-analysis-toolbox-2/)
The Lebedev grid generation was adapted from an implementaion by [Richard P. Muller](https://github.com/gabrielelanaro/pyquante/blob/master/Data/lebedev_write.py).