added dip finding algorithm to signal.R. currently only reports start of down and end of up