def removeTransits(time, flux, period, epoch, duration):
	halfDur = 0.5 * duration / 24.
	bad = np.where(time < epoch - period + halfDur)[0]
	for p in np.arange(epoch, time[-1] + period, period):
		bad = np.append(bad, np.where((p - halfDur < time) & (time < p + halfDur))[0])
	good = np.setxor1d(range(len(time)), bad)
	return time[good], flux[good]