def getPhase(time, flux, period, epoch, centerPhase = 0):
	"""Get the phase of a lightcurve.
	How it works using an example where epoch = 2, period = 3:
	1.	Subtract the epoch from all times [1, 2, 3, 4, 5, 6, 7] to get 
		[-1, 0, 1, 2, 3, 4, 5] then divide by the period [3] to get all time 
		values in phase values which gets you [-0.3, 0, 0.3, 0.6, 1, 1.3, 1.6]
	2.	Subtract the PHASE NUMBER (floor function) from each PHASE (date1)
		which gets you [0.7, 0, 0.3, 0.6, 0, 0.3, 0.6]
	3.	Sort all the adjusted phases to get [0, 0, 0.3, 0.3, 0.6, 0.6, 0.7]
		THERE WILL BE negative values in the beginning here, just not in this example
		since no ex. time value divided by the period left a decimal less than 0.25
	4.	Sort the flux values in the same way the phases were sorted
	Inputs:
	time			Time values of data. (IN DAYS)
	flux			Flux values of data.
	period 			Period of transit.
	epoch 			Epoch of transit.
	centerPhase 	Which phase should be at the center.
	Returns:
	q1				Phase values. (IN HOURS)
	f1				Flux values for each phase.
	"""
	epoch += centerPhase * period
	date1 = (time - epoch) / period  + 0.5
	phi1 = ((date1) - np.floor(date1)) - 0.5
	q1 = np.sort(phi1) * period * 24.
	f1 = flux[np.argsort(phi1)]
	return q1, f1