def fitModel(time, flux, guessDict, freeParPlanet, ferr = 0):
	if not np.all(ferr): ferr = np.ones_like(flux)*1.E-5
	freeParStar = ['rho']
	# Make the fitting object according to guess dictionary
	fitT = FitTransit()
	fitT.add_guess_star(ld1 = 0, ld2 = 0)
	fitT.add_guess_planet(period = guessDict['period'],
							  T0 = guessDict['T0'])
	fitT.add_data(time = time, flux = flux, ferr = ferr)
	fitT.free_parameters(freeParStar, freeParPlanet)
	fitT.do_fit()
	return fitT