def METHOD_NAME(points1, points2, validPoints=None):
	"""
	calculates the root mean square deviation between to point sets
	Parameters:
	-------
	points1, points2: numpy matrix (K, N)
	where K is the dimension of the points and N is the number of points
	validPoints: bool sequence of valid points in the point set.
	If it is left out, all points are considered valid
	"""
	assert(points1.shape == points2.shape)
	N = points1.shape[1]
	if validPoints == None:
		validPoints = [True]*N
	assert(len(validPoints) == N)
	points1 = points1[:,validPoints]
	points2 = points2[:,validPoints]
	N = points1.shape[1]
	dist = points1 - points2
	rmsd = 0
	for col in range(N):
		rmsd += np.matmul(dist[:,col].transpose(), dist[:,col]).flatten()[0]
	return np.sqrt(rmsd/N)