aboutsummaryrefslogtreecommitdiffstats
path: root/host/python
diff options
context:
space:
mode:
Diffstat (limited to 'host/python')
-rw-r--r--host/python/pyuhd.cpp5
-rw-r--r--host/python/uhd/usrp/__init__.py2
-rw-r--r--host/python/uhd/usrp/cal/__init__.py16
-rw-r--r--host/python/uhd/usrp/cal/libtypes.py2
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