def mapInputFields(row):
    fields = ["height", "width", "lowerSize", "lowerColor", "dividerColor", "upperColor", "saturation", "brightness"]
    numericFieldNos = [0, 1, 2, 6, 7]
    percentFieldNos = [2, 6, 7]
    hexFieldNos = [3, 4, 5]
    i = 0
    answer = {}
    for field in fields:
        value = row[i]
        if i in numericFieldNos:
            value = string.atof(value)
            if i in percentFieldNos:
                value = value / 100.0
        else:
            if i in hexFieldNos:
                value = parseHexColor(value)
        answer[field] = value
        i = i + 1
    return answer
dataset/ETHPy150Open longnow/longview/sliceMaker.py/mapInputFields/original