Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f0ba16

Browse files
author
Alexandre Marquet
committed
Fixed hard links in example python scripts.
1 parent 9ef8e9b commit 3f0ba16

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

‎examples/ber_vs_ebn0_75_awgn.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from grc_gnuradio import blks2 as grc_blks2
1515
import lazyviterbi_swig as lv
1616

17+
import os
1718
import numpy
1819
import matplotlib.pyplot as plt
1920

@@ -26,11 +27,11 @@ def __init__(self, pkt_len, nb_pkt, EbN0dB):
2627
##################################################
2728
# Variables
2829
##################################################
29-
self.prefix = prefix = "/localdata/marqueal/Documents/sdr/lazy-viterbi/gr-lazyviterbi/examples/";
30+
self.prefix = prefix = os.getcwd();
3031
self.noise_amp_dB = noise_amp_dB = -50;
3132
self.pkt_len = pkt_len;
32-
#self.fsm = fsm = trellis.fsm(prefix + "awgn1o2_128.fsm");
33-
self.fsm = fsm = trellis.fsm(prefix + "57.fsm");
33+
#self.fsm = fsm = trellis.fsm(prefix + "/awgn1o2_128.fsm");
34+
self.fsm = fsm = trellis.fsm(prefix + "/57.fsm");
3435
Rc=0.5;
3536
self.const = const = digital.constellation_bpsk().base();
3637

‎examples/bitrate_vs_ebn0.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from grc_gnuradio import blks2 as grc_blks2
1515
import lazyviterbi_swig as lv
1616

17+
import os
1718
import numpy
1819
import time
1920
import matplotlib.pyplot as plt
@@ -89,9 +90,9 @@ def main():
8990
bitrate_viterbi = numpy.zeros(len(EbN0dB));
9091
bitrate_lazy = numpy.zeros(len(EbN0dB));
9192

92-
prefix = "/localdata/marqueal/Documents/sdr/lazy-viterbi/gr-lazyviterbi/examples/";
93-
#fsm = fsm = trellis.fsm(prefix + "57.fsm");
94-
fsm = fsm = trellis.fsm(prefix + "awgn1o2_128.fsm");
93+
prefix = os.getcwd();
94+
#fsm = fsm = trellis.fsm(prefix + "/57.fsm");
95+
fsm = fsm = trellis.fsm(prefix + "/awgn1o2_128.fsm");
9596
vit_dec = trellis.viterbi_b(trellis.fsm(fsm), pkt_len, 0, -1);
9697
lazy_dec = lv.lazy_viterbi(trellis.fsm(fsm), pkt_len, 0, -1);
9798

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /