def eff_driven_generator(onset, duration, factor):
	"""
	Generates a function of time which will serve as the star formation
	efficiency timescale in Gyr.

	Parameters
	==========
	onset :: real number
		The time at which the starburst should start in Gyr
	duration :: real number
		The length of the starburst in Gyr
	factor :: real number
		The factor by which the SFE should increase

	Returns
	=======
	The function describing the SFE timescale with time in Gyr
	"""
	def tstar(t):
		baseline = 2
		if onset <= t < onset + duration: baseline /= factor
		return baseline
	return tstar