Take into account whether it's a positive or negative pulse when obtaining the pulse height