def computeTransitDuration(period, rho, k):
	b = 0.1							# Impact parameter (default value in ktransit)
	G = 6.67384e-11					# Gravitational constant
	P = period * 86400				# Period in seconds
	stellarDensity = rho * 1000
	rStarOverA = ((4 * np.pi**2) / (G * stellarDensity * P**2))**(1./3.)
	cosI = b * rStarOverA
	sinI = np.sqrt(1 - cosI**2)
	coeff = rStarOverA * np.sqrt((1+k)**2 - b**2) / sinI
	if coeff > 1:
		return 0
	else:
		duration = (P / np.pi) * np.arcsin(coeff)
		return duration / 3600		# Duration in hours