commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4761 - in gnuradio/branches/developers/n4hy/ofdm: gnu


From: n4hy
Subject: [Commit-gnuradio] r4761 - in gnuradio/branches/developers/n4hy/ofdm: gnuradio-core/src/lib/filter gnuradio-core/src/python/gnuradio/gr gr-radio-astronomy/src/python
Date: Thu, 15 Mar 2007 13:37:42 -0600 (MDT)

Author: n4hy
Date: 2007-03-15 13:37:41 -0600 (Thu, 15 Mar 2007)
New Revision: 4761

Added:
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.cc
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.h
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.cc
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.h
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py
Removed:
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator.cc
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator.h
Modified:
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/Makefile.am
   gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/filter.i
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/Makefile.am
   
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_fftsink.py
   
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_stripchartsink.py
   
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/usrp_ra_receiver.py
Log:
merge -r 4747:4760 from trunk

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/Makefile.am 
    2007-03-15 17:37:15 UTC (rev 4760)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/Makefile.am 
    2007-03-15 19:37:41 UTC (rev 4761)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2002,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2001,2002,2004,2005,2006,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -170,7 +170,8 @@
        gr_fft_filter_fff.cc            \
        gr_goertzel_fc.cc               \
        gr_filter_delay_fc.cc           \
-       gr_fractional_interpolator.cc   \
+       gr_fractional_interpolator_ff.cc \
+       gr_fractional_interpolator_cc.cc \
        gr_hilbert_fc.cc                \
        gr_iir_filter_ffd.cc            \
        gr_sincos.c                     \
@@ -229,7 +230,8 @@
        gr_fft_filter_fff.h             \
        gr_filter_delay_fc.h            \
        gr_fir_sysconfig_x86.h          \
-       gr_fractional_interpolator.h    \
+       gr_fractional_interpolator_ff.h \
+       gr_fractional_interpolator_cc.h \
        gr_goertzel_fc.h                \
        gr_hilbert_fc.h                 \
        gr_iir_filter_ffd.h             \
@@ -291,6 +293,8 @@
        gr_fft_filter_ccc.i             \
        gr_fft_filter_fff.i             \
        gr_filter_delay_fc.i            \
+       gr_fractional_interpolator_ff.i \
+       gr_fractional_interpolator_cc.i \
        gr_goertzel_fc.i                \
        gr_hilbert_fc.i                 \
        gr_iir_filter_ffd.i             \

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/filter.i
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/filter.i    
    2007-03-15 17:37:15 UTC (rev 4760)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/filter.i    
    2007-03-15 19:37:41 UTC (rev 4761)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004,2005,2006 Free Software Foundation, Inc.
+ * Copyright 2004,2005,2006,2007 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -28,6 +28,8 @@
 #include <gr_filter_delay_fc.h>
 #include <gr_fft_filter_ccc.h>
 #include <gr_fft_filter_fff.h>
+#include <gr_fractional_interpolator_ff.h>
+#include <gr_fractional_interpolator_cc.h>
 #include <gr_goertzel_fc.h>
 #include <gr_cma_equalizer_cc.h>
 %}
@@ -39,6 +41,8 @@
 %include "gr_filter_delay_fc.i"
 %include "gr_fft_filter_ccc.i"
 %include "gr_fft_filter_fff.i"
+%include "gr_fractional_interpolator_ff.i"
+%include "gr_fractional_interpolator_cc.i"
 %include "gr_goertzel_fc.i"
 %include "gr_cma_equalizer_cc.i"
 

Deleted: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator.cc

Deleted: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator.h

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.cc
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.cc)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.cc
                                (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.cc
        2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,93 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_io_signature.h>
+#include <gr_fractional_interpolator_cc.h>
+#include <gri_mmse_fir_interpolator_cc.h>
+#include <stdexcept>
+
+// Public constructor
+gr_fractional_interpolator_cc_sptr gr_make_fractional_interpolator_cc(float 
phase_shift, float interp_ratio)
+{
+  return gr_fractional_interpolator_cc_sptr(new 
gr_fractional_interpolator_cc(phase_shift, interp_ratio));
+}
+
+gr_fractional_interpolator_cc::gr_fractional_interpolator_cc(float 
phase_shift, float interp_ratio)
+  : gr_block ("fractional_interpolator_cc",
+             gr_make_io_signature (1, 1, sizeof (float)),
+             gr_make_io_signature (1, 1, sizeof (float))),
+    d_mu (phase_shift), d_mu_inc (interp_ratio), d_interp(new 
gri_mmse_fir_interpolator_cc())
+{
+  if (interp_ratio <=  0)
+    throw std::out_of_range ("interpolation ratio must be > 0");
+  if (phase_shift <  0  || phase_shift > 1)
+    throw std::out_of_range ("phase shift ratio must be > 0 and < 1");
+
+  set_relative_rate (1.0 / interp_ratio);
+}
+
+gr_fractional_interpolator_cc::~gr_fractional_interpolator_cc()
+{
+  delete d_interp;
+}
+
+void
+gr_fractional_interpolator_cc::forecast(int noutput_items, gr_vector_int 
&ninput_items_required)
+{
+  unsigned ninputs = ninput_items_required.size();
+  for (unsigned i=0; i < ninputs; i++)
+
+    ninput_items_required[i] =
+      (int) ceil((noutput_items * d_mu_inc) + d_interp->ntaps());
+}
+
+int
+gr_fractional_interpolator_cc::general_work(int noutput_items,
+                                           gr_vector_int &ninput_items,
+                                           gr_vector_const_void_star 
&input_items,
+                                           gr_vector_void_star &output_items)
+{
+  const gr_complex *in = (const gr_complex *) input_items[0];
+  gr_complex *out = (gr_complex *) output_items[0];
+
+  int  ii = 0;                         // input index
+  int          oo = 0;                         // output index
+
+  while (oo < noutput_items) {
+
+    out[oo++] = d_interp->interpolate(&in[ii], d_mu);
+
+    double s = d_mu + d_mu_inc;
+    double f = floor (s);
+    int incr = (int) f;
+    d_mu = s - f;
+    ii += incr;
+  }
+
+  consume_each (ii);
+
+  return noutput_items;
+}

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.h
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.h)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.h
                         (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.h
 2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_FRACTIONAL_INTERPOLATOR_CC_H
+#define        INCLUDED_GR_FRACTIONAL_INTERPOLATOR_CC_H
+
+#include <gr_block.h>
+
+class gri_mmse_fir_interpolator_cc;
+
+class gr_fractional_interpolator_cc;
+typedef boost::shared_ptr<gr_fractional_interpolator_cc> 
gr_fractional_interpolator_cc_sptr;
+
+// public constructor
+gr_fractional_interpolator_cc_sptr gr_make_fractional_interpolator_cc (float 
phase_shift, float interp_ratio);
+
+/*!
+ * \brief Interpolating mmse filter with gr_complex input, gr_complex output
+ * \ingroup filter
+ */
+class gr_fractional_interpolator_cc : public gr_block
+{
+public:
+  ~gr_fractional_interpolator_cc ();
+  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
+  int general_work (int noutput_items,
+                   gr_vector_int &ninput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+
+  float mu() const { return d_mu;}
+  float interp_ratio() const { return d_mu_inc;}
+  void set_mu (float mu) { d_mu = mu; }
+  void set_interp_ratio (float interp_ratio) { d_mu_inc = interp_ratio; }
+
+protected:
+  gr_fractional_interpolator_cc (float phase_shift, float interp_ratio);
+
+private:
+  float                        d_mu;
+  float                        d_mu_inc;
+  gri_mmse_fir_interpolator_cc         *d_interp;
+
+  friend gr_fractional_interpolator_cc_sptr
+  gr_make_fractional_interpolator_cc (float phase_shift, float interp_ratio);
+};
+
+#endif

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i
                         (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i
 2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,37 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+GR_SWIG_BLOCK_MAGIC(gr,fractional_interpolator_cc);
+
+gr_fractional_interpolator_cc_sptr gr_make_fractional_interpolator_cc (float 
phase_shift, float interp_ratio);
+
+class gr_fractional_interpolator_cc : public gr_block
+{
+private:
+  gr_fractional_interpolator_cc (float phase_shift, float interp_ratio);
+
+public:
+  float mu() const;
+  float interp_ratio() const;
+  void set_mu (float mu);
+  void set_interp_ratio (float interp_ratio);
+};

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.cc
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.cc)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.cc
                                (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.cc
        2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,93 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_io_signature.h>
+#include <gr_fractional_interpolator_ff.h>
+#include <gri_mmse_fir_interpolator.h>
+#include <stdexcept>
+
+// Public constructor
+gr_fractional_interpolator_ff_sptr gr_make_fractional_interpolator_ff(float 
phase_shift, float interp_ratio)
+{
+  return gr_fractional_interpolator_ff_sptr(new 
gr_fractional_interpolator_ff(phase_shift, interp_ratio));
+}
+
+gr_fractional_interpolator_ff::gr_fractional_interpolator_ff(float 
phase_shift, float interp_ratio)
+  : gr_block ("fractional_interpolator_ff",
+             gr_make_io_signature (1, 1, sizeof (float)),
+             gr_make_io_signature (1, 1, sizeof (float))),
+    d_mu (phase_shift), d_mu_inc (interp_ratio), d_interp(new 
gri_mmse_fir_interpolator())
+{
+  if (interp_ratio <=  0)
+    throw std::out_of_range ("interpolation ratio must be > 0");
+  if (phase_shift <  0  || phase_shift > 1)
+    throw std::out_of_range ("phase shift ratio must be > 0 and < 1");
+
+  set_relative_rate (1.0 / interp_ratio);
+}
+
+gr_fractional_interpolator_ff::~gr_fractional_interpolator_ff()
+{
+  delete d_interp;
+}
+
+void
+gr_fractional_interpolator_ff::forecast(int noutput_items, gr_vector_int 
&ninput_items_required)
+{
+  unsigned ninputs = ninput_items_required.size();
+  for (unsigned i=0; i < ninputs; i++)
+
+    ninput_items_required[i] =
+      (int) ceil((noutput_items * d_mu_inc) + d_interp->ntaps());
+}
+
+int
+gr_fractional_interpolator_ff::general_work(int noutput_items,
+                                           gr_vector_int &ninput_items,
+                                           gr_vector_const_void_star 
&input_items,
+                                           gr_vector_void_star &output_items)
+{
+  const float *in = (const float *) input_items[0];
+  float *out = (float *) output_items[0];
+
+  int  ii = 0;                         // input index
+  int          oo = 0;                         // output index
+
+  while (oo < noutput_items) {
+
+    out[oo++] = d_interp->interpolate(&in[ii], d_mu);
+
+    double s = d_mu + d_mu_inc;
+    double f = floor (s);
+    int incr = (int) f;
+    d_mu = s - f;
+    ii += incr;
+  }
+
+  consume_each (ii);
+
+  return noutput_items;
+}

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.h
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.h)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.h
                         (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.h
 2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_FRACTIONAL_INTERPOLATOR_FF_H
+#define        INCLUDED_GR_FRACTIONAL_INTERPOLATOR_FF_H
+
+#include <gr_block.h>
+
+class gri_mmse_fir_interpolator;
+
+class gr_fractional_interpolator_ff;
+typedef boost::shared_ptr<gr_fractional_interpolator_ff> 
gr_fractional_interpolator_ff_sptr;
+
+// public constructor
+gr_fractional_interpolator_ff_sptr gr_make_fractional_interpolator_ff (float 
phase_shift, float interp_ratio);
+
+/*!
+ * \brief Interpolating mmse filter with float input, float output
+ * \ingroup filter
+ */
+class gr_fractional_interpolator_ff : public gr_block
+{
+public:
+  ~gr_fractional_interpolator_ff ();
+  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
+  int general_work (int noutput_items,
+                   gr_vector_int &ninput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+
+  float mu() const { return d_mu;}
+  float interp_ratio() const { return d_mu_inc;}
+  void set_mu (float mu) { d_mu = mu; }
+  void set_interp_ratio (float interp_ratio) { d_mu_inc = interp_ratio; }
+
+protected:
+  gr_fractional_interpolator_ff (float phase_shift, float interp_ratio);
+
+private:
+  float                        d_mu;
+  float                        d_mu_inc;
+  gri_mmse_fir_interpolator    *d_interp;
+
+  friend gr_fractional_interpolator_ff_sptr
+  gr_make_fractional_interpolator_ff (float phase_shift, float interp_ratio);
+};
+
+#endif

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i
                         (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i
 2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,37 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+GR_SWIG_BLOCK_MAGIC(gr,fractional_interpolator_ff);
+
+gr_fractional_interpolator_ff_sptr gr_make_fractional_interpolator_ff (float 
phase_shift, float interp_ratio);
+
+class gr_fractional_interpolator_ff : public gr_block
+{
+private:
+  gr_fractional_interpolator_ff (float phase_shift, float interp_ratio);
+
+public:
+  float mu() const;
+  float interp_ratio() const;
+  void set_mu (float mu);
+  void set_interp_ratio (float interp_ratio);
+};

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/Makefile.am
     2007-03-15 17:37:15 UTC (rev 4760)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/Makefile.am
     2007-03-15 19:37:41 UTC (rev 4761)
@@ -60,6 +60,7 @@
        qa_fft_filter.py                \
        qa_filter_delay_fc.py           \
        qa_flow_graph.py                \
+       qa_fractional_interpolator.py   \
        qa_frequency_modulator.py       \
        qa_fsk_stuff.py                 \
        qa_goertzel.py                  \

Copied: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py
 (from rev 4760, 
gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py)
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py
                           (rev 0)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py
   2007-03-15 19:37:41 UTC (rev 4761)
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+
+class test_fractional_resampler (gr_unittest.TestCase):
+
+    def setUp(self):
+        self.fg = gr.flow_graph()
+
+    def tearDown(self):
+        self.fg = None
+
+    def test_000_make(self):
+        op = gr.fractional_interpolator_ff(0.0, 1.0)
+        op2 = gr.fractional_interpolator_cc(0.0, 1.0)
+        
+if __name__ == '__main__':
+    gr_unittest.main()
+        

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_fftsink.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_fftsink.py
  2007-03-15 17:37:15 UTC (rev 4760)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_fftsink.py
  2007-03-15 19:37:41 UTC (rev 4761)
@@ -292,7 +292,7 @@
 
         self.Draw (graphics, xAxis=None, yAxis=self.y_range)
         d = calc_max - calc_min
-        d *= 0.1
+        d = d * 0.1
         if self.ra_fftsink.autoscale == True:
             self.y_range = self._axisInterval ('min', calc_min-d, calc_max+d)
         else:

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_stripchartsink.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_stripchartsink.py
   2007-03-15 17:37:15 UTC (rev 4760)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/ra_stripchartsink.py
   2007-03-15 19:37:41 UTC (rev 4761)
@@ -178,7 +178,7 @@
         calc_min = min(indata)
         calc_max = max(indata)
         d = calc_max - calc_min
-        d *= 0.1
+        d = d * 0.1
         if self.stripchartsink.autoscale == True and 
self.stripchartsink.parallel == True:
             self.y_range = self._axisInterval ('min', calc_min-d, calc_max+d)
 

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/usrp_ra_receiver.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/usrp_ra_receiver.py
    2007-03-15 17:37:15 UTC (rev 4760)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gr-radio-astronomy/src/python/usrp_ra_receiver.py
    2007-03-15 19:37:41 UTC (rev 4761)
@@ -189,14 +189,14 @@
         #
         self.fft_rate = options.fft_rate
 
-        self.fft_size = options.fft_size
+        self.fft_size = int(options.fft_size)
 
         # This buffer is used to remember the most-recent FFT display
         #   values.  Used later by self.write_spectral_data() to write
         #   spectral data to datalogging files, and by the SETI analysis
         #   function.
         #
-        self.fft_outbuf = Numeric.zeros(options.fft_size, Numeric.Float64)
+        self.fft_outbuf = Numeric.zeros(self.fft_size, Numeric.Float64)
 
         #
         # If SETI mode, only look at seti_fft_bandwidth (currently 12.5Khz)
@@ -485,7 +485,7 @@
 
         vbox2.Add((4,0), 0, 0)
         myform['average'] = form.slider_field(parent=self.panel, sizer=vbox2, 
-                    label="Spectral Averaging (FFT frames)", weight=1, min=1, 
max=2000, callback=self.set_averaging)
+                    label="Spectral Averaging (FFT frames)", weight=1, min=1, 
max=3000, callback=self.set_averaging)
 
         vbox2.Add((4,0), 0, 0)
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]