[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11603 - in gnuradio/branches/developers/n4hy/pfb_iir2
From: |
n4hy |
Subject: |
[Commit-gnuradio] r11603 - in gnuradio/branches/developers/n4hy/pfb_iir2: gnuradio-core/src/lib/general gnuradio-examples/python/apps/filter_design_tool |
Date: |
Sun, 16 Aug 2009 09:31:19 -0600 (MDT) |
Author: n4hy
Date: 2009-08-16 09:31:19 -0600 (Sun, 16 Aug 2009)
New Revision: 11603
Modified:
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.i
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
Log:
going to take a breather from this segmentation fault
Modified:
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
===================================================================
---
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
2009-08-16 15:04:25 UTC (rev 11602)
+++
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
2009-08-16 15:31:19 UTC (rev 11603)
@@ -298,7 +298,14 @@
return rtn;
}
-vector<gr_complexd>
+int
+gr_iirdes::tf2order(vector<double> tf)
+{
+ int size = tf.size()/2;
+ return size;
+}
+
+vector<double>
gr_iirdes::tf2zpg(vector<double> tf)
{
@@ -306,8 +313,9 @@
gsl_poly_complex_workspace *w;
double a[size],b[size];
double *z;
- vector<gr_complexd> rtn;
-
+ vector<double> rtn;
+ rtn[0]=0;
+ /*
if (size < 2) throw std::invalid_argument
("transfer function to pole, zero, gain calculation requires
order 2 or greater");
@@ -338,7 +346,7 @@
delete z;
-
+ */
return rtn;
}
Modified:
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
===================================================================
---
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
2009-08-16 15:04:25 UTC (rev 11602)
+++
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
2009-08-16 15:31:19 UTC (rev 11603)
@@ -68,13 +68,14 @@
*/
+ static int
+ tf2order(std::vector<double> tf);
-
static std::vector<double>
tf2sos(std::vector<double> tf);
- static std::vector<gr_complexd>
+ static std::vector<double>
tf2zpg(std::vector<double> tf);
Modified:
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.i
===================================================================
---
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.i
2009-08-16 15:04:25 UTC (rev 11602)
+++
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.i
2009-08-16 15:31:19 UTC (rev 11603)
@@ -64,11 +64,14 @@
+ static int
+ tf2order(std::vector<double> tf);
+
static std::vector<double>
tf2sos(std::vector<double> tf);
- static std::vector<gr_complexd>
+ static std::vector<double>
tf2zpg(std::vector<double> tf);
Modified:
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
===================================================================
---
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
2009-08-16 15:04:25 UTC (rev 11602)
+++
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
2009-08-16 15:31:19 UTC (rev 11603)
@@ -22,16 +22,16 @@
from gnuradio import gr
-#numbers = gr.iirdes.butterord(gr.iirdes.BANDPASS,
-# [.2, .3],
-# [.1, .4],
-# .1,
-# 30)
-#print numbers
+numbers = gr.iirdes.butterord(gr.iirdes.BANDPASS,
+ [.2, .3],
+ [.1, .4],
+ .1,
+ 30)
+print numbers
tf=[0.0976, 0.1953, 0.0976, 1.0, -0.9428, 0.3333]
+order = gr.iirdes.tf2order(tf)
+print order
zpg = gr.iirdes.tf2zpg(tf)
-#print zpg
-print tf
-
+print zpg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11603 - in gnuradio/branches/developers/n4hy/pfb_iir2: gnuradio-core/src/lib/general gnuradio-examples/python/apps/filter_design_tool,
n4hy <=