@@ -12,6 +12,7 @@ Conversion is available for:
1212
1313* **BLUE files ** - MIDAS Blue and Platinum BLUE RF recordings (usually ``.cdif ``)
1414* **WAV files ** - Audio recordings (``.wav ``)
15+ * **Signal Hound Spike files ** - Signal Hound zero-span recordings (``.xml `` + ``.iq ``)
1516
1617All converters return a :class: `~sigmf.SigMFFile ` object with converted metadata.
1718
@@ -29,6 +30,7 @@ formats and reads without writing any output files:
2930 # auto-detect and create NCD for any supported format
3031 meta = sigmf.fromfile(" recording.cdif" ) # BLUE file
3132 meta = sigmf.fromfile(" recording.wav" ) # WAV file
33+ meta = sigmf.fromfile(" recording.xml" ) # Signal Hound Spike file
3234 meta = sigmf.fromfile(" recording.sigmf" ) # SigMF archive
3335
3436 all_samples = meta.read_samples()
@@ -44,13 +46,17 @@ For programmatic access, use the individual converter functions directly:
4446
4547 from sigmf.convert.wav import wav_to_sigmf
4648 from sigmf.convert.blue import blue_to_sigmf
49+ from sigmf.convert.signalhound import signalhound_to_sigmf
4750
4851 # convert WAV to SigMF archive
4952 _ = wav_to_sigmf(wav_path = " recording.wav" , out_path = " recording" , create_archive = True )
5053
5154 # convert BLUE to SigMF pair and return metadata for new files
5255 meta = blue_to_sigmf(blue_path = " recording.cdif" , out_path = " recording" )
5356
57+ # convert Signal Hound Spike to SigMF pair
58+ meta = signalhound_to_sigmf(signalhound_path = " recording.xml" , out_path = " recording" )
59+
5460
5561 Command Line Usage
5662~~~~~~~~~~~~~~~~~~
@@ -65,8 +71,9 @@ Converters are accessed through a unified command-line interface that automatica
6571 # examples
6672 sigmf_convert recording.cdif recording.sigmf
6773 sigmf_convert recording.wav recording.sigmf
74+ sigmf_convert recording.xml recording.sigmf
6875
69- The converter uses magic byte detection to automatically identify BLUE and WAV file formats.
76+ The converter uses magic byte detection to automatically identify BLUE, WAV, and Signal Hound Spike file formats.
7077No need to remember format-specific commands!
7178
7279
@@ -168,4 +175,38 @@ Examples
168175
169176 # access standard SigMF data & metadata
170177 all_samples = meta.read_samples()
171- sample_rate_hz = meta.sample_rate
178+ sample_rate_hz = meta.sample_rate
179+
180+
181+ Signal Hound Spike Converter
182+ -----------------------------
183+
184+ The Signal Hound Spike converter handles recordings from Signal Hound devices.
185+ These recordings consist of two files: an XML metadata file (``.xml ``) and a binary IQ data file (``.iq ``).
186+ The converter extracts metadata from the XML file and references the IQ data file, storing Signal Hound-specific
187+ fields in the ``spike: `` namespace extension.
188+
189+ .. autofunction :: sigmf.convert.signalhound.signalhound_to_sigmf
190+
191+ Examples
192+ ~~~~~~~~
193+
194+ .. code-block :: python
195+
196+ from sigmf.convert.signalhound import signalhound_to_sigmf
197+
198+ # standard conversion (provide path to XML file)
199+ meta = signalhound_to_sigmf(signalhound_path = " recording.xml" , out_path = " recording" )
200+
201+ # create NCD automatically (metadata-only, references original .iq file)
202+ meta = signalhound_to_sigmf(signalhound_path = " recording.xml" )
203+
204+ # access standard SigMF data & metadata
205+ all_samples = meta.read_samples()
206+ sample_rate = meta.sample_rate
207+ center_freq = meta.get_captures()[0 ][" core:frequency" ]
208+
209+ # access Signal Hound-specific metadata in spike: namespace
210+ reference_level = meta.get_global_field(" spike:reference_level" )
211+ if_bandwidth = meta.get_global_field(" spike:if_bandwidth" )
212+ decimation = meta.get_global_field(" spike:decimation" )
0 commit comments