Fixed threshold curve extension in computeThreshold (to reflect change in sign convention)