1. A non-transitory computer-readable device having computer-executable instructions stored thereon and executed by a computer system to perform a method for determining a peak value of a histogram, the method comprising: fitting a curve to the histogram, the curve being modeled based on an orthonormal expansion; obtaining a differential curve, the differential curve describing changes in slope of the curve fitted to the histogram; finding at least one root for the differential curve; for each of the at least one root for the differential curve, calculating a corresponding value on the curve fitted to the histogram; and determining the peak value of the histogram based on a maximum value among the corresponding value calculated for each of the at least one root.