def getParInfo(sourceOp, pattern='*', names=None,
			   				includeCustom=True, includeNonCustom=True):
	"""
	Returns parInfo dict for sourceOp. Filtered in the following order:
	pattern is a pattern match string
	names can be a list of names to include, default None includes all
	includeCustom to include custom parameters
	includeNonCustom to include non-custom parameters

	parInfo is {<parName>:(par.val, par.expr, par.mode string, par.bindExpr,
							par.default)...}
	"""
	parInfo = {}
	for p in sourceOp.pars(pattern):
		if (names is None or p.name in names) and \
				((p.isCustom and includeCustom) or \
										(not p.isCustom and includeNonCustom)):
			parInfo[p.name] = [p.val, p.expr if p.expr else '', p.mode.name,
							   p.bindExpr, p.default]
	return parInfo