diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-03 16:10:06 -0800 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-04-02 11:55:17 -0500 |
commit | 3fe5ccf700a0c6f27dca9511386460194dcc593c (patch) | |
tree | 19d394faac0581601d3d6e5d35a7a82e325bf245 /host/python | |
parent | 1e016e49e82c430197a90a018fbc7613cc654088 (diff) | |
download | uhd-3fe5ccf700a0c6f27dca9511386460194dcc593c.tar.gz uhd-3fe5ccf700a0c6f27dca9511386460194dcc593c.tar.bz2 uhd-3fe5ccf700a0c6f27dca9511386460194dcc593c.zip |
uhd: cal: Add iq_cal calibration data container class
This class can be used to store calibration coefficients for the X300
DC offset and IQ imbalance calibration.
Note: This also modifies Doxyfile.in to not document files generated by
flatc.
Diffstat (limited to 'host/python')
-rw-r--r-- | host/python/pyuhd.cpp | 5 | ||||
-rw-r--r-- | host/python/uhd/usrp/__init__.py | 2 | ||||
-rw-r--r-- | host/python/uhd/usrp/cal/__init__.py | 16 | ||||
-rw-r--r-- | host/python/uhd/usrp/cal/libtypes.py | 2 |
4 files changed, 25 insertions, 0 deletions
diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp index 9ce72c476..5e8c6424c 100644 --- a/host/python/pyuhd.cpp +++ b/host/python/pyuhd.cpp @@ -13,6 +13,7 @@ namespace py = pybind11; +#include "cal/cal_python.hpp" #include "rfnoc/rfnoc_python.hpp" #include "stream_python.hpp" #include "types/filters_python.hpp" @@ -73,4 +74,8 @@ PYBIND11_MODULE(libpyuhd, m) // Register RFNoC submodule auto rfnoc_module = m.def_submodule("rfnoc", "RFNoC Objects"); export_rfnoc(rfnoc_module); + + // Register calibration submodule + auto cal_module = m.def_submodule("cal", "Calibration Objects"); + export_cal(cal_module); } diff --git a/host/python/uhd/usrp/__init__.py b/host/python/uhd/usrp/__init__.py index c7a630258..6f76066ef 100644 --- a/host/python/uhd/usrp/__init__.py +++ b/host/python/uhd/usrp/__init__.py @@ -15,3 +15,5 @@ from .multi_usrp import MultiUSRP # pylint: disable=wildcard-import from .libtypes import * # pylint: enable=wildcard-import + +from . import cal diff --git a/host/python/uhd/usrp/cal/__init__.py b/host/python/uhd/usrp/cal/__init__.py new file mode 100644 index 000000000..77cc3ca35 --- /dev/null +++ b/host/python/uhd/usrp/cal/__init__.py @@ -0,0 +1,16 @@ +# +# Copyright 2020 Ettus Research, a National Instruments Brand +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +""" +Python UHD Module: Calibration sub-module +""" + +# Disable PyLint because the entire libtypes modules is a list of renames. It is +# thus less redundant to do a wildcard import, even if generally discouraged. +# We could also paste the contents of libtypes.py into here, but by leaving it +# separate we avoid importing the lib module in this __init__ file. +# pylint: disable=wildcard-import +from .libtypes import * +# pylint: enable=wildcard-import diff --git a/host/python/uhd/usrp/cal/libtypes.py b/host/python/uhd/usrp/cal/libtypes.py index 754028c24..b75165965 100644 --- a/host/python/uhd/usrp/cal/libtypes.py +++ b/host/python/uhd/usrp/cal/libtypes.py @@ -16,4 +16,6 @@ from ... import libpyuhd as lib # database is a class, but we treat it like a namespace, i.e., a submodule database = lib.cal.database Source = lib.cal.source +IQCal = lib.cal.iq_cal +InterpMode = lib.cal.interp_mode # pylint: enable=invalid-name |