diff options
Diffstat (limited to 'gr-controls')
-rw-r--r-- | gr-controls/python/controls_csim.py | 1 | ||||
-rw-r--r-- | gr-controls/python/controls_dsim.py | 1 | ||||
-rw-r--r-- | gr-controls/python/csim.py | 7 | ||||
-rw-r--r-- | gr-controls/python/dsim.py | 3 | ||||
-rwxr-xr-x | gr-controls/python/qa_dsim.py | 4 |
5 files changed, 5 insertions, 11 deletions
diff --git a/gr-controls/python/controls_csim.py b/gr-controls/python/controls_csim.py index 45344b60d..38fd598fe 100644 --- a/gr-controls/python/controls_csim.py +++ b/gr-controls/python/controls_csim.py @@ -1 +1,2 @@ +# Additional file to import all csim python files from csim import * diff --git a/gr-controls/python/controls_dsim.py b/gr-controls/python/controls_dsim.py index aca638a40..d9960e32b 100644 --- a/gr-controls/python/controls_dsim.py +++ b/gr-controls/python/controls_dsim.py @@ -1 +1,2 @@ +# Additional file to import all dsim python files from dsim import * diff --git a/gr-controls/python/csim.py b/gr-controls/python/csim.py index 3d91eaf15..a8468c82a 100644 --- a/gr-controls/python/csim.py +++ b/gr-controls/python/csim.py @@ -31,13 +31,12 @@ class csim(gras.Block): out = output_items[0] from csim_sci import csim - #Processing - # Assuming n = 1 input_config(0)=1 - + + #Processing out[:self.n] = csim(self.param1, self.param2, self.param3, self.param4, self.param5, self.param6, self.param7, in0[:self.n].tolist()) # IMP: in0[:self.n].tolist() passes a python array, without which window cannot be raised above certain value | numpy.array bug - print "OUT", out[:self.n] + print "OUT ", out[:self.n] self.consume(0,self.n) # Consume from port 0 input_items self.produce(0,self.n) # Produce from port 0 output_items diff --git a/gr-controls/python/dsim.py b/gr-controls/python/dsim.py index 3e5e4c8ec..3f11c75fd 100644 --- a/gr-controls/python/dsim.py +++ b/gr-controls/python/dsim.py @@ -26,14 +26,11 @@ class dsim(gras.Block): def work(self, input_items, output_items): - #n = min(len(input_items[0]), len(output_items[0])) in0 = input_items[0] out = output_items[0] from dsim_sci import discrete_sim #Processing - # Assuming n = 1 input_config(0)=1 - out[:self.n] = discrete_sim(self.param1, self.param2, self.param3, self.param4, self.param5, self.param6, self.param7, self.param8, in0[:self.n].tolist()) # IMP: in0[:self.n].tolist() passes a python array, without which window cannot be raised above certain value | numpy.array bug diff --git a/gr-controls/python/qa_dsim.py b/gr-controls/python/qa_dsim.py index 8c0a6be4e..543dcac8a 100755 --- a/gr-controls/python/qa_dsim.py +++ b/gr-controls/python/qa_dsim.py @@ -48,15 +48,11 @@ class qa_dsim (gr_unittest.TestCase): dst = gr.vector_sink_f() self.tb.connect(src0, (sqr,0)) # src0(vector_source) -> sqr_input_0 - #self.tb.connect((sqr,0), (sqr,1)) # sqr_output_0 -> sqr_input_1 self.tb.connect(sqr,dst) # sqr_output_0 -> dst (vector_source) self.tb.run() result_data = dst.data() - #print str(result_data), "Result data" - #print str(expected_result), "expected " - import matplotlib.pyplot as plt plt.plot(result_data) |