We present BHM, a tool for restoring a smooth function from a sampled histogram using the bin hierarchy method. The theoretical background of the method is presented in [1]. The code automatically generates a smooth polynomial spline with the minimal acceptable number of knots from the input data. It works universally for any sufficiently regular shaped distribution and any level of data quality, requiring almost no external parameter specification. It is particularly useful for large-scale numerical data analysis. This paper explains the details of the implementation and the use of the program.
This is an author-produced, peer-reviewed version of this article. © 2019, Elsevier. Licensed under the Creative Commons Attribution-NonCommercial-No Derivatives 4.0 license. The final, definitive version of this document can be found online at Computer Physics Communications, doi: 10.1016/j.cpc.2018.09.019