def lcps_output(logtable, logfile, winSize, stepSize, Nneighb, minDur,
    maxDur, detectionThresh):
    """ Write table with dips to file."""
    logtable.write(logfile, format='csv')
    prepends = (
        """#winSize={}
#stepSize={}
#Nneighb={}
#minDur={}
#maxDur={}
#detectionThresh={}
#"""
        .format(winSize, stepSize, Nneighb, minDur, maxDur, detectionThresh))
    with open(logfile, 'r+') as f:
        content = f.read()
        f.seek(0, 0)
        f.write(prepends + '\n' + content)
