def findClosest(targetVal, valList):
	""" Searches valList for closest match to targetVal and returns the
	    corresponding valList index"""
	diffs = [abs(x-targetVal) for x in valList]
	return diffs.index(min(diffs))