SHARPpy
SHARPpy copied to clipboard
Fixed error in LHP
Fix for issues #220 and #248. Modified the lhp calculation to set lhp to 0 if both term A and B are negative, and also set lhp to be 0 if it is still negative after adding 5, which is consistent with the following from Johnson and Sugden (2014):
Additionally, if Term A and B are both negative the LHP is set to zero to avoid creating a positive value by multiplying two negative terms. Finally, if values are still not above zero after the previous addition term, all negative values of the LHP are set to zero.