def Gamma_phi_fn(site,p):
	"""
	Calculates the value of Gamma and phi given the input site and the input parameters.
	
	Parameters
	----------
	p : 	Namespace class containing the parameters of the system

	Notes
	-----
	site.pos[0] is the x value of the position. !!! Could also implement as heavyside step function, but this works as it is.
	"""

	if site.pos[0] <= p.left[-1]:	# 
		Gamma = p.GammaL; phi = p.phiL
	elif p.middle[0] <= site.pos[0] <= p.middle[-1]:
		Gamma = 0; phi = 0
	elif p.right[0] <= site.pos[0] <= p.right[-1]:
		Gamma = p.GammaR; phi = p.phiR
	else:
		raise ValueError("In Gamma_phi_fn: site.pos[0] was in neither parts of the system. Cannot assign Gamma- and phi-values.")
	return [Gamma,phi]