{"record":{"id":"7b9f19a7e4aeb056","repo":"ruvnet/RuView","slug":"failed-to-smooth-phase-e","errorCode":null,"errorMessage":"Failed to smooth phase: {e}","messagePattern":"Failed to smooth phase: (.+?)","errorType":"exception","errorClass":"PhaseSanitizationError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/core/phase_sanitizer.py","lineNumber":201,"sourceCode":"        \n        Args:\n            phase_data: Phase data (2D array)\n            \n        Returns:\n            Smoothed phase data\n            \n        Raises:\n            PhaseSanitizationError: If smoothing fails\n        \"\"\"\n        if not self.enable_smoothing:\n            return phase_data\n        \n        try:\n            smoothed_data = self._apply_moving_average(phase_data, self.smoothing_window)\n            return smoothed_data\n            \n        except Exception as e:\n            raise PhaseSanitizationError(f\"Failed to smooth phase: {e}\")\n    \n    def _apply_moving_average(self, phase_data: np.ndarray, window_size: int) -> np.ndarray:\n        \"\"\"Apply moving average smoothing.\"\"\"\n        smoothed_data = phase_data.copy()\n        \n        # Ensure window size is odd\n        if window_size % 2 == 0:\n            window_size += 1\n        \n        half_window = window_size // 2\n        \n        for i in range(phase_data.shape[0]):\n            for j in range(half_window, phase_data.shape[1] - half_window):\n                start_idx = j - half_window\n                end_idx = j + half_window + 1\n                smoothed_data[i, j] = np.mean(phase_data[i, start_idx:end_idx])\n        \n        return smoothed_data","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/core/phase_sanitizer.py#L183-L219","documentation":"Error \"Failed to smooth phase: {e}\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/core/phase_sanitizer.py:201 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"}