import csv


def get_pixel_data(fname):
    """
    Return a dictionary of pixel tuples (lon, lat) and measurents
    for all lines in the given file. Assume that each file is
    for a unique date, and that columns 0, 1, and 2 are lat, lon,
    and measurement respectively.
    """
    d = {}
    with open(fname, 'r') as fh:
        reader = csv.reader(fh, delimiter=" ")
        for row in reader:
            if row[0] != "HDR":  # exclude header rows
                lon = float(row[0])
                lat = float(row[1])
                meas = float(row[2])
                d[(lon,lat)] = meas
    return d