Generate interactive envelope spectrum plot.
Creates an interactive HTML plot showing both the envelope spectrum and optionally
the filtered signal. Can highlight bearing/gear frequencies.
Args:
signal_file: Name of the CSV file in data/signals/
sampling_rate: Sampling frequency in Hz (default: 10000)
filter_band: [low_freq, high_freq] for bandpass filter (optional, default: [500, 5000])
freq_range: [min_freq, max_freq] to limit the envelope spectrum plot (optional)
highlight_freqs: List of frequencies (Hz) to mark (e.g., BPFO, BPFI) (optional)
freq_labels: Labels for highlighted frequencies (optional)
title: Custom plot title (optional)
ctx: MCP context for progress/logging
Returns:
Path to generated HTML file
Example:
plot_envelope(
"bearing_signal.csv",
sampling_rate=10000,
filter_band=[500, 5000],
freq_range=[0, 300],
highlight_freqs=[120.5, 241.0],
freq_labels=["BPFO", "2xBPFO"]
)