ENH: Completed PatchAnalysis function.