Skip to content

Commit

Permalink
Added IQ examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinticx committed Mar 27, 2022
1 parent c27b332 commit cb66f17
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/iq_to_audio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import nimbus
import nimbus.sources
import nimbus.sinks
import nimbus.transformers
import numpy as np
from pathlib import Path

iq_source = nimbus.sources.IQ(Path("examples/test_iq.iq"))
audio_sink = nimbus.sinks.Audio()
console_sink = nimbus.sinks.Console()

pipeline = nimbus.Pipeline(
iq_source,
[
nimbus.transformers.FM_Demod(),
nimbus.transformers.Resample(44700),
nimbus.transformers.Gain(2),
],
audio_sink,
)
pipeline.run()
17 changes: 17 additions & 0 deletions examples/sdr_to_iq.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import nimbus
import nimbus.sources
import nimbus.sinks
import nimbus.transformers
import numpy as np
from pathlib import Path

sdr_source = nimbus.sources.SDR(sample_rate=2.56e5, frequency=9.91e7)
iq_sink = nimbus.sinks.IQ(Path("examples/test_iq.iq"))
console_sink = nimbus.sinks.Console()

pipeline = nimbus.Pipeline(
sdr_source,
[],
iq_sink,
)
pipeline.run()
1 change: 1 addition & 0 deletions examples/test_iq.iq

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/test_iq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sample_rate": 256000}

0 comments on commit cb66f17

Please sign in to comment.