def load_waveforms_from_file(path_to_waveforms):
    """
     Waveforms must be:
    - in a .csv or .dat file
    - each row is a waveform, values comma separated
    - each waveform is preprocessed
        -- aligned to core bounce
        -- all have same sampling frequencies
        -- all have same number of time samples
    - the name of the waveform is the first column
    - subsequent columns are the waveform time samples
    """
    wave_list = list(csv.reader(open(path_to_waveforms,"rb")))
    # delete empty elements (if any)
    wave_list = [x for x in wave_list if x != []]
    Y_dict = {}
    for i in np.arange(0,len(wave_list)):
        Y_dict[wave_list[i][0]] = map(np.float, wave_list[i][1:])
    return Y_dict