load_signal_from_file
Load a motor-current signal from CSV, WAV, or NPY files. Returns signal, sampling frequency, and metadata for further analysis like preprocess_signal or compute_spectrum.
Instructions
Load a motor-current signal from a file (CSV, WAV, or NumPy NPY).
Supports the most common formats used by industrial DAQ systems:
CSV/TSV/TXT: Columnar data with optional time column. The sampling frequency is inferred from the time column or must be provided explicitly.
WAV: Audio files from portable recorders or DAQ. Sampling frequency is read from the WAV header.
NPY: NumPy binary arrays. Sampling frequency must be provided.
Returns the signal, sampling frequency, number of samples, duration, and file metadata. The returned signal can then be passed to preprocess_signal, compute_spectrum, or run_full_diagnosis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the signal file (CSV, WAV, or NPY) | |
| sampling_freq_hz | No | Sampling frequency in Hz. Required for NPY; optional for CSV if a time column exists; auto-detected for WAV | |
| signal_column | No | CSV column containing the current signal (0-based index or header name) | |
| time_column | No | CSV column for time (index or name). Set to null if no time column | |
| delimiter | No | CSV delimiter. Auto-detected if null (comma for .csv, tab for .tsv/.txt) | |
| channel | No | WAV channel index (0-based) for multi-channel files | |
| skip_header | No | Number of CSV header rows to skip | |
| max_rows | No | Max data rows to read from CSV (null = all) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |