extract_features_from_signal
Extract 17 statistical features (mean, RMS, kurtosis, entropy, etc.) from vibration signal segments using sliding windows. Requires a signal loaded via load_signal().
Instructions
Extract time-domain features from a stored signal using sliding windows.
Segments the signal into overlapping windows and extracts 17 statistical features
from each segment. Features include: mean, std, RMS, kurtosis, crest factor, entropy, etc.
Requires the signal loaded via load_signal() first; the sampling rate
comes from the stored signal metadata. Returns an in-memory summary
only — no CSV is written to data/signals/.
Args:
signal_id: ID of the stored signal (from load_signal).
segment_duration: Duration of each segment in seconds (default: 0.1)
overlap_ratio: Overlap between segments, 0-1 (default: 0.5 = 50%)
ctx: MCP context for progress/logging
Returns:
FeatureExtractionResult with features matrix and metadata
Raises:
ValueError: If the signal_id is not loaded, or the stored signal
has no sampling rate.
Example:
extract_features_from_signal(
"healthy_motor",
segment_duration=0.2,
overlap_ratio=0.5
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signal_id | Yes | ||
| overlap_ratio | No | ||
| segment_duration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_segments | Yes | Number of segments extracted | |
| feature_names | Yes | Names of extracted features | |
| overlap_ratio | Yes | Overlap ratio between segments | |
| features_shape | Yes | Shape of feature matrix [num_segments, num_features] | |
| features_preview | Yes | First 5 segments features (preview) | |
| segment_duration_s | Yes | Duration of each segment in seconds | |
| segment_length_samples | Yes | Samples per segment |