SOFiA-py
SOFiA-py is a Python port of the Sound Field Analysis Toolbox (SOFiA) toolbox, originally by Benjamin Bernschütz[1]. 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
- SciPy
- matplotlib (for 2D plotting)
- vispy (for 3D plotting)
Overview
gen
contains functions to generate data:wgc
: Wave Generatormf
: Modal Radial Filter Generatorlebedev
: Lebedev Quadratureswg
: Sampled Wave Generator
process
contains processing functions:pdc
: Plane Wave Decompositiontdt
: Time Domain Reconstructionstc
: Fast Spatial Fourier Transformitc
: Fast Inverse Spatial Fourier Transform
plot
contains function for visualization:makeMTX
: Generate 3D-matrix datavisualize3D
: Draw matrix data in 3D
sph
contains helper functions for dealing with spherical harmonics:sph_harm
: More robust spherical harmonic coefficientsspbessel
/dspbessel
: Spherical Bessel and derivativespneumann
/dspneumann
: Spherical Neumann (Bessel 2nd kind) and derivativesphankel
/dsphankel
: Spherical Hankel and derivativecart2sph
/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 project at the Quality and Usability Lab of the TU Berlin.
References
SOFiA-py is based on the Matlab/C++ toolbox SOFiA by Benjamin Bernschütz. For more information you may refer to the original publication:
The Lebedev grid generation was adapted from an implementaion by Richard P. Muller.