def makeHeaderLine(M):
    """
    Input:
        M: scalar, number of dimensions in a hFunction

    header line has format "seed,est0,est1,..,estM,hasMet,tau,nStep,nXstep,timeTaken"
    """
    estsPart = ["est%d" %x for x in range(M)]
    estsStr = ','.join(estsPart)
    line = "seed," +  estsStr + ",hasMet,tau,nStep,nXstep,timeTaken"
    return line