Package: acoular
AcoularAcoular is a Python module for acoustic beamforming that is distributed under the new BSD license.It is aimed at applications in acoustic testing. Multichannel data recorded by a microphone array can be processed and analyzed in order to generate mappings of sound source distributions. The maps (acoustic photographs) can then be used to locate sources of interest and to characterize them using their spectra.Featuresfrequency domain beamforming algorithms: delay & sum, Capon (adaptive), MUSIC, functional beamforming, eigenvalue beamformingfrequency domain deconvolution algorithms: DAMAS, DAMAS+, Clean, CleanSC, orthogonal deconvolutionfrequency domain inverse methods: CMF (covariance matrix fitting), general inverse beamforming, SODIXtime domain methods: delay & sum beamforming, CleanT deconvolutiontime domain methods applicable for moving source with arbitrary trajectory (linear, circular, arbitrarily 3D curved),frequency domain methods for rotating sources via virtual array rotation for arbitrary arrays and with different interpolation techniques1D, 2D and 3D mapping grids for all methodsgridless option for orthogonal deconvolutionfour different built-in steering vector formulationsarbitrary stationary background flow can be considered for all methodsefficient cross spectral matrix computationflexible modular time domain processing: n-th octave band filters, fast, slow, and impulse weighting, A-, C-, and Z-weighting, filter bank, zero delay filterstime domain simulation of array microphone signals from fixed and arbitrarily moving sources in arbitrary flowfully object-oriented interfacelazy evaluation: while processing blocks are set up at any time, (expensive) computations are only performed when neededintelligent and transparent caching: computed results are automatically saved and loaded on the next run to avoid unnecessary re-computationparallel (multithreaded) implementation with Numba for most algorithmseasily extendable with new algorithmsLicenseAcoular is licensed under the BSD 3-clause. SeeLICENSECitingIf you use Acoular for academic work, please consider citing ourpublication:Ennes Sarradj, Gert Herold,
A Python framework for microphone array data processing,
Applied Acoustics, Volume 116, 2017, Pages 50-58DependenciesAcoular runs under Linux, Windows and MacOS and needs Numpy, Scipy, Traits, scikit-learn, pytables, Numba packages available.
Matplotlib is needed for some of the examples.If you want to use input from a soundcard hardware, you will also need to install thesounddevicepackage. Some solvers for the CMF method needPylops.InstallationAcoular can be installed viaconda, which is also part of theAnaconda Python distribution. It is recommended to install into a dedicatedconda environment. After activating this environment, runconda install -c acoular acoularThis will install Acoular in your Anaconda Python enviroment and make the Acoular library available from Python. In addition, this will install all dependencies (those other packages mentioned above) if they are not already present on your system.A second option is to install Acoular viapip. It is recommended to use a dedicatedvirtual environmentand then runpip install acoularFor more detailed install instructions see thedocumentation.Documentation and helpDocumentation is availableherewith agetting startedsection andexamples.The Acoularblogcontains some tutorials.Problems, suggestions and success using Acoular may be reported via theacoular-usersdiscussion forum.ExampleThis reads data from 64 microphone channels and computes a beamforming map for the 8kHz third octave band:fromosimportpathimportacoularfrommatplotlib.pylabimportfigure,plot,axis,imshow,colorbar,show# this file contains the microphone coordinatesmicgeofile=path.join(path.split(acoular.__file__)[0],'xml','array_64.xml')# set up object managing the microphone coordinatesmg=acoular.MicGeom(from_file=micgeofile)# set up object managing the microphone array data (usually from measurement)ts=acoular.TimeSamples(name='three_sources.h5')# set up object managing the cross spectral matrix computationps=acoular.PowerSpectra(time_data=ts,block_size=128,window='Hanning')# set up object managing the mapping gridrg=acoular.RectGrid(x_min=-0.2,x_max=0.2,y_min=-0.2,y_max=0.2,z=0.3,\increment=0.01)# set up steering vector, implicitely contains also the standard quiescent# environment with standard speed of soundst=acoular.SteeringVector(grid=rg,mics=mg)# set up the object managing the delay & sum beamformerbb=acoular.BeamformerBase(freq_data=ps,steer=st)# request the result in the 8kHz third octave band from approriate FFT-Lines# this starts the actual computation (data intake, FFT, Welch CSM, beamforming)pm=bb.synthetic(8000,3)# compute the sound pressure levelLm=acoular.L_p(pm)# plot the mapimshow(Lm.T,origin='lower',vmin=Lm.max()-10,extent=rg.extend(),\interpolation='bicubic')colorbar()