From 6e0b2512e45b7a6ca03187814742cb0fe08964cb Mon Sep 17 00:00:00 2001 From: andreas128 Date: Sun, 29 Jan 2017 15:18:40 +0000 Subject: Add Amp characterization in sync-measurement.ipynb --- gr-dpd/grc/dpd_clut.xml | 18 +++++++++++++++ gr-dpd/include/dpd/clut.h | 56 +++++++++++++++++++++++++++++++++++++++++++++++ gr-dpd/python/qa_clut.py | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 gr-dpd/grc/dpd_clut.xml create mode 100644 gr-dpd/include/dpd/clut.h create mode 100755 gr-dpd/python/qa_clut.py (limited to 'gr-dpd') diff --git a/gr-dpd/grc/dpd_clut.xml b/gr-dpd/grc/dpd_clut.xml new file mode 100644 index 0000000..21a37a6 --- /dev/null +++ b/gr-dpd/grc/dpd_clut.xml @@ -0,0 +1,18 @@ + + + clut + dpd_clut + dpd + import dpd + dpd.clut() + + + in + complex + + + out + complex + + + diff --git a/gr-dpd/include/dpd/clut.h b/gr-dpd/include/dpd/clut.h new file mode 100644 index 0000000..f77c100 --- /dev/null +++ b/gr-dpd/include/dpd/clut.h @@ -0,0 +1,56 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 <+YOU OR YOUR COMPANY+>. + * + * This 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 3, or (at your option) + * any later version. + * + * This software 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 this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_DPD_CLUT_H +#define INCLUDED_DPD_CLUT_H + +#include +#include + +namespace gr { + namespace dpd { + + /*! + * \brief <+description of block+> + * \ingroup dpd + * + */ + class DPD_API clut : virtual public gr::block + { + public: + typedef boost::shared_ptr sptr; + + /*! + * \brief Return a shared_ptr to a new instance of dpd::clut. + * + * To avoid accidental use of raw pointers, dpd::clut's + * constructor is in a private implementation + * class. dpd::clut::make is the public interface for + * creating new instances. + */ + static sptr make(); + }; + + } // namespace dpd +} // namespace gr + +#endif /* INCLUDED_DPD_CLUT_H */ + diff --git a/gr-dpd/python/qa_clut.py b/gr-dpd/python/qa_clut.py new file mode 100755 index 0000000..e1d63f6 --- /dev/null +++ b/gr-dpd/python/qa_clut.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2017 <+YOU OR YOUR COMPANY+>. +# +# This 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 3, or (at your option) +# any later version. +# +# This software 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 this software; 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 +from gnuradio import blocks +import dpd_swig as dpd + +import matplotlib.pyplot as plt + +class qa_clut (gr_unittest.TestCase): + + def setUp (self): + self.tb = gr.top_block () + + def tearDown (self): + self.tb = None + + def test_001_t (self): + # set up fg + self.tb.run () + # check data + +if __name__ == '__main__': + gr_unittest.run(qa_clut, "qa_clut.xml") -- cgit v1.2.3