{"record":{"id":"2dba2919e9347d4b","repo":"ruvnet/RuView","slug":"failed-to-filter-noise-e","errorCode":null,"errorMessage":"Failed to filter noise: {e}","messagePattern":"Failed to filter noise: (.+?)","errorType":"exception","errorClass":"PhaseSanitizationError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/core/phase_sanitizer.py","lineNumber":241,"sourceCode":"        \n        Args:\n            phase_data: Phase data (2D array)\n            \n        Returns:\n            Filtered phase data\n            \n        Raises:\n            PhaseSanitizationError: If noise filtering fails\n        \"\"\"\n        if not self.enable_noise_filtering:\n            return phase_data\n        \n        try:\n            filtered_data = self._apply_low_pass_filter(phase_data, self.noise_threshold)\n            return filtered_data\n            \n        except Exception as e:\n            raise PhaseSanitizationError(f\"Failed to filter noise: {e}\")\n    \n    def _apply_low_pass_filter(self, phase_data: np.ndarray, threshold: float) -> np.ndarray:\n        \"\"\"Apply low-pass filter to remove high-frequency noise.\"\"\"\n        filtered_data = phase_data.copy()\n        \n        # Check if data is large enough for filtering\n        min_filter_length = 18  # Minimum length required for filtfilt with order 4\n        if phase_data.shape[1] < min_filter_length:\n            # Skip filtering for small arrays\n            return filtered_data\n        \n        # Apply Butterworth low-pass filter\n        nyquist = 0.5\n        cutoff = threshold * nyquist\n        \n        # Design filter\n        b, a = signal.butter(4, cutoff, btype='low')\n        ","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/core/phase_sanitizer.py#L223-L259","documentation":"Error \"Failed to filter noise: {e}\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/core/phase_sanitizer.py:241 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"}