def path_estimation(f,s_pos, e_pos):
    """Extract the train Timetable path as described in:
    http://data.atoc.org/sites/all/themes/atoc/files/RSPS5046.pdf

    Input parameters:
    -----------------
    f: String multiple lines of text with details of all timepoint locations (TIPLOC) where train passes through
    s_pos: Integer position of the line from which we want to extract the string text data
    e_pos: Integer position of the line to which we want to extract the string text data 

    Result:
    -------
    Dictionary containing details of: 
        - path - List of string of all TIPLOC code IDs where train is recorded at
        - times - List of all times at the TIPLOCs where the train
        - stop - List to identfiy if the train stops (S) or not (N) at the TIPLOC
    """
    path = []
    time = []
    stop = []
    for lines in f[s_pos:e_pos]:
        if lines[0:2] in ['LO','LI','LT']:
            stext = lines[2:10]
            tiploc = stext.split()
            if tiploc[0][-1] in ['2','3'] and tiploc[0][0:-1] in path:
                path.append(tiploc[0][0:-1])
            else:
                path.append(tiploc[0])

            time.append((lines[10:14],lines[15:19]))
            if lines[10:15].strip() or lines[16:20].strip():
                stop.append('S')
            else:
                stop.append('N')

    return {'path':path,'times':time,'stops':stop}