def GetMaxHarmonic( efit ):
	"""Determine highest-order of harmonic amplitudes in an ellipse-fit object"""
	
	# We assume that columns named "ai3_err", "ai4_err", "ai5_err", etc.
	# exist, up to "aiM_err", where M is the maximum harmonic number
	momentNums = [int(cname.rstrip("_err")[2:]) for cname in efit.colNames 
					if cname[:2] == "ai" and cname[-4:] == "_err"]
	return max(momentNums)