Skip to content

Signal Hound Converter - #136

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

Signal Hound Converter#136
Teque5 merged 14 commits into
sigmf: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

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

Comment threadsigmf/convert/signalhound.py Outdated
Comment threadsigmf/convert/signalhound.py Outdated
"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.

Comment threadsigmf/convert/signalhound.py Outdated
DATATYPE = "ci16_le" # complex short int16 little-endian
# DATATYPE_SIZE = 4 # bytes per complex int16 sample (2 bytes I + 2 bytes Q)

logging.basicConfig(

@Teque5Teque5Feb 25, 2026

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.

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

Comment threadsigmf/convert/signalhound.py Outdated

# 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
ContributorAuthor

@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
ContributorAuthor

@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.

@Teque5Teque5 changed the title Feature/signalhound - This is preliminary work for a Spike Signal Hound converter.Signal Hound ConverterMar 17, 2026
@Teque5

Copy link
Copy Markdown
Collaborator

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
ContributorAuthor

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"?>
<SignalHoundIQFileVersion="1.0">

So the InvalidXMLTestFile.xml contains:

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

@777arc

777arc commented Mar 24, 2026

Copy link
Copy Markdown
Member

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
ContributorAuthor

@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

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

KelseyCreekSoftwareand 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
Teque5force-pushed the feature/signalhound branch from 7eaa74c to b49be87CompareApril 9, 2026 23:23
@codacy-production

codacy-productionBot commented Apr 9, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues1 critical · 1 medium

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

Results:
2 new issues

CategoryResults
Security1 critical
1 medium

View in Codacy

🟢 Metrics78 complexity · 7 duplication

MetricResults
Complexity78
Duplication7

View in Codacy

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

@Teque5
Teque5 merged commit 8658978 into sigmf:mainApr 12, 2026
5 checks passed
Sign up for freeto 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

@KelseyCreekSoftware@Teque5@777arc