def cut_off_ringing(k, P, ir_cutoff=5e-5, uv_cutoff=1e2):
	"""
	Cut off ringing tail at high and low k

	Parameters
	----------
	k:	1d numpy array
		Note does not need to be ln-space
	P:	1d numpy array
		Function evaluated at corresponding k
	"""
	if ir_cutoff < k.min(): ir_cutoff = k.min()
	if uv_cutoff > k.max(): uv_cutoff = k.max()
	ind = (k < uv_cutoff) * (k > ir_cutoff)
	return k[ind], P[ind]