Implementation of the bin hierarchy method for restoring a smooth function from a sampled histogram
We present BHM, a tool for restoring a smooth function from a sampled histogram using the bin hierarchy method. It is particularly useful for the analysis of data from large-scale numerical simulations of physical systems, such as diagrammatic Monte Carlo simulations of quantum many-body problems. The theoretical background of the method is presented in Goulko et al., (2018). 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 (provided that the data are uncorrelated or correlations have been accounted for), requiring almost no external parameter specification. This paper explains the details of the implementation and the use of the program, including a physical example of the restoration of the Fröhlich polaron Green’s function from data sampled with diagrammatic Monte Carlo.