forked from stpaine/FERS
-
Notifications
You must be signed in to change notification settings - Fork 1
Pulse File Loading (General)
David Young edited this page Apr 30, 2025
·
1 revision
FERS loads the complex baseband representation of a radar pulse waveform from external files specified in the simulation configuration (XML). This loading mechanism relies on the file extension to determine the format and dispatch to the appropriate specific loading function (either for .csv or .h5 files). This process is typically initiated when parsing the pulse definition within the XML scenario file (e.g., within parsePulse).
- Assumes the filename provided in the XML configuration corresponds to an existing file that FERS has permission to read.
- Assumes the file extension (
.csvor.h5) accurately reflects the internal format of the file content. - Assumes that only files with
.csvor.h5extensions are intended to be loaded as pulse definitions via this mechanism.
-
Limited Format Support: Only Comma-Separated Value (
.csv) and HDF5 (.h5) file formats are currently supported for loading pulse waveforms. Other common formats (e.g., plain binary arrays, MATLAB.matfiles) cannot be loaded directly. -
Basic Error Handling: If the specified file is not found or if the file has an extension other than
.csvor.h5, the loading process fails by throwing astd::runtime_error. The error message might be generic and may not provide detailed user guidance. -
Platform Path Dependency (Potential): While the use of
std::filesystemhelps, interpreting file paths (relative vs. absolute) provided in the XML could potentially exhibit platform-dependent behavior if not carefully managed across different operating systems (Windows, Linux, macOS).
- Code:
-
pulse_factory.h/pulse_factory.cpp(SpecificallyloadPulseFromFile,hasExtension)
-
- Wiki Pages:
- Pulse XML Definition (Specifies the filename)
- Pulse CSV File Loading (Specific loader function)
- Pulse HDF5 File Loading (Specific loader function)
- XML Parsing (Context where loading is typically invoked)
-
Signalclass (Where the loaded data is stored)
- Needs Verification: Robustness of file handling across different valid and invalid scenarios. Clarity of error messages. Cross-platform path interpretation consistency.
-
Key Areas for Validation:
- Verify that files with
.csvextension are correctly dispatched to the CSV loader. - Verify that files with
.h5extension are correctly dispatched to the HDF5 loader. - Verify appropriate
std::runtime_erroris thrown for non-existent file paths. - Verify appropriate
std::runtime_error(or similar) is thrown for files with unsupported extensions (e.g.,.txt,.bin). - Test loading using various path specifications (relative paths, absolute paths) on the primary target OS (and others if feasible).
- Verify that files with
- Priority: Medium (Core functionality for defining custom pulses, likely works but robustness and error handling need confirmation).