# -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 15:12:58 2018

@author: Kanazawa
"""
    
def CreatePeakTableHeader(number, name):
    header = name + number + " (output)\n" 
    header += "[Peak Table]\n"
    header += "Peak#\tR.Time(min)\tStart Time(min)\tStart Intensity\tEnd Time(min)\tEnd Intensity\tCompound Name\n"
    return header

def CreatePeakTableTextFile(f, peakTables, number, name = "augmentation# "):
    f.write(CreatePeakTableHeader(number, name))
    for i in range(len(peakTables)):
        f.write(str(i + 1))
        peakTable = peakTables[i]
        f.write('\t' + str(peakTable[0]) + '\t' + str(peakTable[1]) + '\t' 
                + str(peakTable[2]) + '\t' + str(peakTable[3])  
                + '\t' + str(peakTable[4]) + '\t' + peakTable[5])
        f.write('\n')