{"record":{"id":"49e6c8f3a74e3195","repo":"ruvnet/RuView","slug":"failed-to-remove-outliers-e","errorCode":null,"errorMessage":"Failed to remove outliers: {e}","messagePattern":"Failed to remove outliers: (.+?)","errorType":"exception","errorClass":"PhaseSanitizationError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/core/phase_sanitizer.py","lineNumber":149,"sourceCode":"            Phase data with outliers removed\n            \n        Raises:\n            PhaseSanitizationError: If outlier removal fails\n        \"\"\"\n        if not self.enable_outlier_removal:\n            return phase_data\n        \n        try:\n            # Detect outliers\n            outlier_mask = self._detect_outliers(phase_data)\n            \n            # Interpolate outliers\n            clean_data = self._interpolate_outliers(phase_data, outlier_mask)\n            \n            return clean_data\n            \n        except Exception as e:\n            raise PhaseSanitizationError(f\"Failed to remove outliers: {e}\")\n    \n    def _detect_outliers(self, phase_data: np.ndarray) -> np.ndarray:\n        \"\"\"Detect outliers using statistical methods.\"\"\"\n        # Use Z-score method to detect outliers\n        z_scores = np.abs((phase_data - np.mean(phase_data, axis=1, keepdims=True)) / \n                         (np.std(phase_data, axis=1, keepdims=True) + 1e-8))\n        outlier_mask = z_scores > self.outlier_threshold\n        \n        # Update statistics\n        self._outliers_removed += np.sum(outlier_mask)\n        \n        return outlier_mask\n    \n    def _interpolate_outliers(self, phase_data: np.ndarray, outlier_mask: np.ndarray) -> np.ndarray:\n        \"\"\"Interpolate outlier values.\"\"\"\n        clean_data = phase_data.copy()\n        \n        for i in range(phase_data.shape[0]):","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/core/phase_sanitizer.py#L131-L167","documentation":"Error \"Failed to remove outliers: {e}\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/core/phase_sanitizer.py:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}