Reliability of the weighting function for the pulse height weighting technique