def VmaxWeight( distance, R_25, R_25_limit=30.0, maxSurveyDist=30.0 ):
	"""Returns W = V_tot / V_max, where V_tot is the total survey volume
	(out to a distance of maxSurveyDist in Mpc) and V_max is volume out to 
	distance = distMax in Mpc, with distMax = maximum distance object could 
	have been observed at, assuming an R_25 limiting radius of R_25_limit 
	and an observed radius of R_25 (both in arcsec).
	
	If V_tot > V_max (i.e., the galaxy would have been observed regardless of
	distance), then W = 1
	
	For S4G, R25_limit = 30 arcsec
	"""
	V_tot = maxSurveyDist**3
	distMax = distance * (R_25 / R_25_limit)
	V_max = distMax**3
	if V_max > V_tot:
		return 1.0
	else:
		return (V_tot / V_max)