-
Notifications
You must be signed in to change notification settings - Fork 31
Initial commit of prototype converter for Rohde and Schwarz IQ.TAR #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
cff5af6
3ad18dc
09fd807
84a6d18
d85c82e
2300d7d
750c38e
6d2977f
bd190c0
18c2209
8bb2a50
c52499c
4557098
8082165
9e90017
6501d8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,15 +16,16 @@ | |
| from . import detect_converter | ||
| from .blue import blue_to_sigmf | ||
| from .signalhound import signalhound_to_sigmf | ||
| from .signalhound import signalhound_to_sigmf | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. repeated line |
||
| from .wav import wav_to_sigmf | ||
|
|
||
| from .rohdeschwarz import rohdeschwarz_to_sigmf | ||
|
Comment on lines
16
to
+20
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
|
|
||
| def main() -> None: | ||
| """ | ||
| Unified entry-point for SigMF conversion of non-SigMF recordings. | ||
|
|
||
| This command-line interface converts various non-SigMF file formats into SigMF-compliant datasets. | ||
| It currently supports WAV and BLUE/Platinum file formats. | ||
| It currently supports WAV and BLUE/Platinum, Signal Hound Spike and Rohde and Schwarz IQ.TAR file formats. | ||
| The converter detects the file type based on magic bytes and invokes the appropriate conversion function. | ||
|
|
||
| By default it will output a SigMF pair (.sigmf-meta and .sigmf-data). | ||
|
|
@@ -94,10 +95,14 @@ def main() -> None: | |
| elif converter_type == "blue": | ||
| _ = blue_to_sigmf(blue_path=input_path, out_path=output_path, create_archive=args.archive, create_ncd=args.ncd) | ||
| elif converter_type == "signalhound": | ||
| _ = signalhound_to_sigmf( | ||
| signalhound_path=input_path, out_path=output_path, create_archive=args.archive, create_ncd=args.ncd | ||
| ) | ||
| _ = signalhound_to_sigmf(signalhound_path=input_path, out_path=output_path, create_archive=args.archive, create_ncd=args.ncd) | ||
| elif converter_type == "rohdeschwarz": | ||
| _ = rohdeschwarz_to_sigmf(rohdeschwarz_path=input_path, out_path=output_path, create_archive=args.archive, create_ncd=args.ncd) | ||
|
|
||
| else: | ||
| raise SigMFConversionError( | ||
| f"Supported formats for conversion are WAV, BLUE/Platinum, Signal Hound Spike and Rohde and Schwarz IQ.TAR." | ||
| ) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. (Removed) |
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be more work to do here, but not sure the recommended solution is worth the additional code.
Once everything is basically working, it would be good to do a code pass for efficiency. Having very large files, of all types, to test would also be good to make sure the magic bytes are locatable.