def trace(X_ref, Y_ref):
	"""
	Calculates the slope and intercept for the trace, given the position  of the direct image in physical pixels.
	These coefficients are for the WFC3 G141 grism.
	See also: https://ui.adsabs.harvard.edu/abs/2009wfc..rept...17K/abstract
	"""
	BEAMA_i = 15 
	BEAMA_f = 196

	DYDX_0_0 = 1.96882E+00 
	DYDX_0_1 = 9.09159E-05
	DYDX_0_2 = -1.93260E-03

	DYDX_1_0 = 1.04275E-02 
	DYDX_1_1 = -7.96978E-06 
	DYDX_1_2 = -2.49607E-06  
	DYDX_1_3 = 1.45963E-09  
	DYDX_1_4 = 1.39757E-08  
	DYDX_1_5 = 4.84940E-10


	DYDX_0 = DYDX_0_0 + DYDX_0_1*X_ref + DYDX_0_2*Y_ref
	DYDX_1 = DYDX_1_0 + DYDX_1_1*X_ref + DYDX_1_2*Y_ref + DYDX_1_3*X_ref**2 + DYDX_1_4*X_ref*Y_ref + DYDX_1_5*Y_ref**2
	
	return [DYDX_0, DYDX_1]