Loading...
Searching...
No Matches
iq_cal.hpp
Go to the documentation of this file.
//
// Copyright 2020 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/cal/container.hpp>
#include <uhd/config.hpp>
#include <uhd/utils/interpolation.hpp>
#include <complex>
#include <cstdint>
#include <memory>
#include <string>
namespace uhd { namespace usrp { namespace cal {
class UHD_API iq_cal : public container
{
public:
using sptr = std::shared_ptr<iq_cal>;
//
// This class supports two kinds of interpolation: Nearest-neighbour, and
// linear.
//
// \param interp The new interpolation mode
// \throws uhd::value_error if the given interpolation mode is not
// supported.
virtual void set_interp_mode(const uhd::math::interp_mode interp) = 0;
//
// This function will interpolate to return a valid coefficient for any
// given frequency.
virtual std::complex<double> get_cal_coeff(const double freq) const = 0;
//
// This usually only needs to called by calibration utilities.
//
// \param freq The frequency at which this coefficient is measured
// \param coeff The value that is stored
// \param suppression_abs The amount of impairment suppression this
// coefficient provides, in dB.
// \param suppression_delta The difference of impairment power between
// applying this coefficient and applying none, in
// dB.
virtual void set_cal_coeff(const double freq,
const std::complex<double> coeff,
const double suppression_abs = 0,
const double suppression_delta = 0) = 0;
//
// This can be useful in order to drop existing cal data, and load an
// entirely new set with deserialize().
virtual void clear() = 0;
static sptr make(
const std::string& name, const std::string& serial, const uint64_t timestamp);
static sptr make();
};
}}} // namespace uhd::usrp::cal
uhd::usrp::cal::container
Definition container.hpp:23
uhd::usrp::cal::iq_cal
Definition iq_cal.hpp:26
uhd::usrp::cal::iq_cal::set_interp_mode
virtual void set_interp_mode(const uhd::math::interp_mode interp)=0
Choose interpolation mode.
uhd::usrp::cal::iq_cal::make
static sptr make(const std::string &name, const std::string &serial, const uint64_t timestamp)
Factory for new cal data sets.
uhd::usrp::cal::iq_cal::make
static sptr make()
Default factory.
uhd::usrp::cal::iq_cal::set_cal_coeff
virtual void set_cal_coeff(const double freq, const std::complex< double > coeff, const double suppression_abs=0, const double suppression_delta=0)=0
Update / set a calbration coefficient.
uhd::usrp::cal::iq_cal::sptr
std::shared_ptr< iq_cal > sptr
Definition iq_cal.hpp:28
uhd::usrp::cal::iq_cal::get_cal_coeff
virtual std::complex< double > get_cal_coeff(const double freq) const =0
Return a calibration coefficient for a given frequency.
uhd::usrp::cal::iq_cal::clear
virtual void clear()=0
Clear the list of coefficients.
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
container.hpp
interpolation.hpp
uhd::math::interp_mode
interp_mode
Definition interpolation.hpp:11
uhd::usrp::cal
Definition container.hpp:15
uhd::usrp
Definition container.hpp:15
uhd
Definition build_info.hpp:12