We introduce BAYES-LOSVD, a novel implementation of the non-parametric extraction of line-of-sight velocity distributions (LOSVDs) in galaxies. We employed Bayesian inference to obtain robust LOSVDs and associated uncertainties. Our method relies on a principal component analysis to reduce the dimensionality on the set of templates required for the extraction and thus increase the performance of the code. In addition, we implemented several options to regularise the output solutions. Our tests, conducted on mock spectra, confirm the ability of our approach to model a wide range of LOSVD shapes, overcoming limitations of the most widely used parametric methods (e.g., Gauss-Hermite expansion). We present examples of LOSVD extractions for real galaxies with known peculiar LOSVD shapes, including NGC 4371, IC 0719, and NGC 4550, using MUSE and SAURON integral-field unit (IFU) data. Our implementation can also handle data from other popular IFU surveys (e.g., ATLAS3D, CALIFA, MaNGA, SAMI).
Details of the code and relevant documentation are freely available in the dedicated repository: http://https://github.com/jfalconbarroso/BAYES-LOSVD