compute_fft
Perform frequency domain analysis on oscilloscope signals using Fast Fourier Transform to identify frequency components and spectral characteristics.
Instructions
Compute FFT (Fast Fourier Transform) for frequency domain analysis.
Args: channel: Channel to analyze. window: Window function to apply.
Returns: Dictionary containing frequency bins and magnitude spectrum.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| window | No | hann |
Implementation Reference
- The compute_fft tool handler: decorated with @mcp.tool(), includes input schema via type hints (channel and window parameters), docstring describing args/returns, and stub implementation logic.@mcp.tool() def compute_fft( channel: Literal["A", "B", "C", "D"], window: Literal["hann", "hamming", "blackman", "rectangular"] = "hann", ) -> dict[str, Any]: """Compute FFT (Fast Fourier Transform) for frequency domain analysis. Args: channel: Channel to analyze. window: Window function to apply. Returns: Dictionary containing frequency bins and magnitude spectrum. """ # TODO: Implement FFT computation return {"status": "not_implemented", "channel": channel, "window": window}
- src/picoscope_mcp/server.py:14-19 (registration)Top-level registration of tool groups in the MCP server, including the analysis tools (register_analysis_tools) that registers compute_fft.# Register all tool categories register_discovery_tools(mcp) register_configuration_tools(mcp) register_acquisition_tools(mcp) register_analysis_tools(mcp) register_advanced_tools(mcp)
- src/picoscope_mcp/tools/analysis.py:9-11 (registration)Function that defines and registers all analysis tools, including compute_fft via decorators inside it.def register_analysis_tools(mcp: Any) -> None: """Register signal analysis tools with the MCP server."""