def gari( redchan, nirchan, bluechan, greenchan ):
	"""
	GARI: green atmospherically resistant vegetation index
	gari( redchan, nirchan, bluechan, greenchan )
	"""
	redchan = 1.0*redchan
	nirchan = 1.0*nirchan
	bluechan = 1.0*bluechan
	greenchan = 1.0*greenchan
	result = ( nirchan - (greenchan-(bluechan - redchan))) / ( nirchan- (greenchan-(bluechan - redchan)))
	return result