def gas_driven_generator(onset, duration, amount):
	"""
	Generates a function of time which will serve as the infall history
	in Msun yr^-1 onto the galaxy.

	Parameters
	==========
	onset :: real number
		The time at which the starburst should start in Gyr
	duration :: real number
		The length of the starburst in Gyr
	amount :: real number
		The amount of "extra" gas to be added to the ISM over this time
		interval

	Returns
	=======
	The function describing the infall rate with time in Msun yr^-1
	"""
	def infall(t):
		ifr = 9.1
		if onset <= t < onset + duration: ifr += (1.e-9 * amount) / duration
		return ifr
	return infall