def p_static(**kwargs):
	"""
	Calculates static pressure based upon either of three input
	variable sets.  Optionally returns the ratio between freestream
	and stagnation pressure if no pressure term is supplied.

	First method:
		p_static(rho = fluid density,
			V = fluid velocity,
			p_0 = stagnation pressure)

	Second method:
		p_static(Ma = fluid Mach number,
			gamma_var = ratio of specific heats,
			p_0 = stagnation pressure)

	Return ratio:
		p_static(Ma = fluid Mach number,
			gamma_var = ratio of specific heats)
	"""

	if ('rho' in kwargs) and ('V' in kwargs) and ('p_0' in kwargs):
		p = kwargs['p_0'] - (0.5 * kwargs['rho'] * (kwargs['V']**2))
	elif ('p_0' in kwargs) and ('gamma_var' in kwargs) and ('Ma' in kwargs):
		p = kwargs['p_0'] / ((1 + (((kwargs['gamma_var'] - 1) / 2) * \
			(kwargs['Ma']**2)))**(kwargs['gamma_var'] / (kwargs['gamma_var'] - 1)))
	elif ('gamma_var' in kwargs) and ('Ma' in kwargs):
		p = 1 / (((1 + (((kwargs['gamma_var'] - 1) / 2) * \
			(kwargs['Ma']**2)))**(kwargs['gamma_var'] / (kwargs['gamma_var'] - 1))))
	else:
		raise KeyError('Incorrect variable assignment')

	return p