compute_fft
Perform Fast Fourier Transform analysis on PicoScope oscilloscope signals to convert time-domain waveforms into frequency-domain spectra for identifying signal components.
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 main handler function for the 'compute_fft' tool. Includes inline schema via type hints for parameters 'channel' and 'window', and the execution logic (currently a stub). Decorated with @mcp.tool() for registration.@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:18-18 (registration)The registration point where register_analysis_tools is called on the MCP instance, which in turn registers the compute_fft tool.register_analysis_tools(mcp)
- src/picoscope_mcp/tools/analysis.py:9-9 (registration)The registration function that defines and registers multiple analysis tools, including compute_fft, using @mcp.tool() decorators.def register_analysis_tools(mcp: Any) -> None: