The sound_field_analysis toolbox (short: sfa) is a Python port of the Sound Field Analysis Toolbox (SOFiA) toolbox, originally by Benjamin Bernschütz[1]. The main goal of the sfa toolbox is to analyze, visualize and process sound field data recorded by spherical microphone arrays. Furthermore, various types of test-data may be generated to evaluate the implemented functions.
The package is pure Python and PEP8 compliant (except line-length). Please expect things to be slow for now and for the API to break, as the development is still very much ongoing.
We use Python 3.7 for development. Chances are that earlier version will work too but this is currently untested.
The following external libraries are required:
For performance and convenience reasons we highly recommend to use Conda (miniconda for simplicity) to manage your Python installation. Once installed, you can use the following steps to create a new environment with the sfa toolbox.
Create a new environment:
conda create --name sfa python numpy scipy plotly
Activate the environment:
source activate sfa
Install sfa from either source:
By cloning (or downloading) the repository [recommended]:
git clone https://github.com/AppliedAcousticsChalmers/sound_field_analysis-py.git
cd sound_field_analysis-py/
pip install -e .
From conda-forge channel [not recommended - code currently outdated]:
conda install -c conda-forge sound_field_analysis
From PyPI [Not recommended - code currently outdated]:
pip install sound_field_analysis
Please find the full documentation over at https://appliedacousticschalmers.github.io/sound_field_analysis-py/!
The following examples are available as Jupyter notebooks, either statically on GitHub or interactively on nbviewer. You can of course also simply download the examples and run them locally!
Ideal unity plane wave simulation and 3D plot.
View interactively on nbviewer
A measured plane wave from AZ=180°, EL=90° in the anechoic chamber using a cardioid mic.
View interactively on nbviewer
The provided example loading a SOFA file is outdated. We recommend using the pysofaconventions package. See repository for examples and install instructions.
Render a spherical microphone array measurement for binaural reproduction.
View interactively on nbviewer
- 2019-07-11 V0.8
- Implement Spherical Harmonics coefficients tapering
- Adaption of associated Spherical Head Filter
- 2019-06-17 V0.7
- Implement Bandwidth Extension for Microphone Arrays (BEMA)
- Edit read_miro_struct, named tuple ArraySignal and miro_to_struct.m to load center measurements
- 2019-06-11 V0.6
- Port of Radial Filter Improvement from SOFiA
- 2019-05-23 V0.5
- Implement Spherical Head Filter
- Implement Spherical Fourier Transform using pseudo-inverse
- Extract real time capable Spatial Fourier Transform
- Outsource reversed m index function (Exp. 4)
The sound_field_analysis toolbox is based on the Matlab/C++ Sound Field Analysis Toolbox (SOFiA) toolbox by Benjamin Bernschütz. For more information you may refer to the original publication:
The Lebedev grid generation was adapted from an implementation by Richard P. Muller.