boltzmann weighting code fixed for 1 dimensional data