Skip to content

Signal Hound Converter#136

Merged
Teque5 merged 14 commits intosigmf:mainfrom
KelseyCreekSoftware:feature/signalhound
Apr 12, 2026
Merged

Signal Hound Converter#136
Teque5 merged 14 commits intosigmf:mainfrom
KelseyCreekSoftware:feature/signalhound

Conversation

@KelseyCreekSoftware
Copy link
Copy Markdown
Contributor

This is preliminary work for a Spike Signal Hound converter.
I attempted to use the SigMF File API as much as possible and follow the general form of the blue and wav converters.
Very limited testing, but archive, NCD and XML conversion seems to work.
One thing that needs to be validated is the handling of the IQ file data itself.
The Spike XML files contain a small CSV sample of the larger IQ file. Not sure what the best way to handle this "preview" data.
There are other TODO items called out in the code.

@Teque5
Copy link
Copy Markdown
Collaborator

Teque5 commented Feb 25, 2026

I'll assume this isn't quite ready yet, but I'm keeping an eye on it.

"annotations": annotations,
}

return sigmf
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should return SigMFFile object and not dict.

DATATYPE = "ci16_le" # complex short int16 little-endian
# DATATYPE_SIZE = 4 # bytes per complex int16 sample (2 bytes I + 2 bytes Q)

logging.basicConfig(
Copy link
Copy Markdown
Collaborator

@Teque5 Teque5 Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A logger gets created by __main__.main() so I don't think we need this.


# Define constants for Spike
ENDIANNESS = "<"
DATATYPE = "ci16_le" # complex short int16 little-endian
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you appear to define this again later, so I think you can delete these globals

@KelseyCreekSoftware
Copy link
Copy Markdown
Contributor Author

@Teque5 - Slowly working to understand the https://sigmf.readthedocs.io/en/latest/_autosummary/sigmf.sigmffile.SigMFFile.html#
behaviors and convert my dictionary centric code to use the appropriate SigMFFile object. With the docs and the blue sample, not sure why this is taking me so long. :)

@KelseyCreekSoftware
Copy link
Copy Markdown
Contributor Author

@Teque5 - I added my attempts at using the SigMF file object. It sort of works, but --ncd and --archive are badly broken. https://github.com/KelseyCreekSoftware/sigmf-python/blob/feature/signalhound/sigmf/convert/signalhound_fileobject_broken.py

This file at least generates valid meta data. https://github.com/KelseyCreekSoftware/sigmf-python/blob/feature/signalhound/sigmf/convert/signalhound.py

In both many TODOs, and overly verbose code.

@Teque5 Teque5 changed the title Feature/signalhound - This is preliminary work for a Spike Signal Hound converter. Signal Hound Converter Mar 17, 2026
@Teque5
Copy link
Copy Markdown
Collaborator

Teque5 commented Mar 17, 2026

I am done refactoring.

  • Add tests
  • Documentation
  • NCD support
  • fromfile() support

I kinda wish we had more than one example file, but as far as I can tell this is ready to merge and tag as v1.8.0.

  • This branch does need to be rebased to the latest sigmf:main

@KelseyCreekSoftware
Copy link
Copy Markdown
Contributor Author

Good deal @Teque5!

Maybe @777arc can spin up two more samples. Perhaps a very small one and a medium to big one.

I did create an invalid.xml file to test the magic bytes. It should fail on xml that doesn't contain:

<?xml version="1.0" encoding="UTF-8"?>
<SignalHoundIQFile Version="1.0">

So the InvalidXMLTestFile.xml contains:

<?xml version="1.0" encoding="UTF-8"?>
<BadDog Version="2.0">
	    <BarkCount>100000</BarkCount>
</BadDog>

@777arc
Copy link
Copy Markdown
Member

777arc commented Mar 24, 2026

I upgraded to the latest Spike so now the zero-span mode saves directly as SigMF 😄

The converter is still valuable for the countless recordings people already have, but we probably don't have to go too crazy validating it under every corner case

@KelseyCreekSoftware
Copy link
Copy Markdown
Contributor Author

@Teque5 and @777arc - I think this PR is ready to merge but would defer to others, as I'm new to the SigMF and production level python coding.

@777arc
Copy link
Copy Markdown
Member

777arc commented Apr 8, 2026

Yeah I agree it's a good point to merge it in, assuming last minute tests and functionality still seem good to go

KelseyCreekSoftware and others added 11 commits April 9, 2026 16:19
Implement converter for Signal Hound files to SigMF format with metadata extraction and IQ data handling.
Integrate Signal Hound file conversion into the main script, updating magic byte checks and handling for new file type.
Co-authored-by: Teque5 <teque5@gmail.com>
…SigMF object instead of dictionary

Updated the last modified date and refactored comments for clarity.
… SigMF File Object, but is not working.

Implement converter for Signal Hound files to SigMF format, including metadata extraction and IQ data conversion.
@Teque5 Teque5 force-pushed the feature/signalhound branch from 7eaa74c to b49be87 Compare April 9, 2026 23:23
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 9, 2026

Not up to standards ⛔

🔴 Issues 1 critical · 1 medium

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Security 1 critical
1 medium

View in Codacy

🟢 Metrics 78 complexity · 7 duplication

Metric Results
Complexity 78
Duplication 7

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@Teque5 Teque5 merged commit 8658978 into sigmf:main Apr 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants