Ejemplo n.º 1
0
    def __init__(
        self,
        n=2 ** 10,
        k=10,
        snr=np.inf,
        repeat=1,
        B_k_location=2,
        B_k_estimation=0.2,
        location_loops=4,
        estimation_loops=16,
        loop_threshold=2,
        tolerance_location=1e-6,
        tolerance_estimation=1e-8,
    ):
        """

        :param n: Signal size
        :param k: Signal sparsity
        :param snr: SNR ratio
        :param repeat: Number of times to repeat the experiment and the result averaged
        :param B_k_location
        :param B_k_estimation
        :param location_loops: Number of iterations to find the locations of large frequency bins
        :param estimation_loops: Number of iterations to find the values of large frequency bins
        :param loop_threshold
        :param tolerance_location
        :param tolerance_estimation
        """
        self.n = utils.floor_to_pow2(n)
        self.k = k
        self.snr = snr
        self.repeat = repeat
        self.B_k_location = B_k_location
        self.B_k_estimation = B_k_estimation
        self.location_loops = location_loops
        self.estimation_loops = estimation_loops
        self.loop_threshold = loop_threshold
        self.tolerance_location = tolerance_location
        self.tolerance_estimation = tolerance_estimation
Ejemplo n.º 2
0
    def __init__(self,
                 n=2**10,
                 k=10,
                 snr=np.inf,
                 repeat=1,
                 B_k_location=2,
                 B_k_estimation=0.2,
                 location_loops=4,
                 estimation_loops=16,
                 loop_threshold=2,
                 tolerance_location=1e-6,
                 tolerance_estimation=1e-8):
        """

        :param n: Signal size
        :param k: Signal sparsity
        :param snr: SNR ratio
        :param repeat: Number of times to repeat the experiment and the result averaged
        :param B_k_location
        :param B_k_estimation
        :param location_loops: Number of iterations to find the locations of large frequency bins
        :param estimation_loops: Number of iterations to find the values of large frequency bins
        :param loop_threshold
        :param tolerance_location
        :param tolerance_estimation
        """
        self.n = utils.floor_to_pow2(n)
        self.k = k
        self.snr = snr
        self.repeat = repeat
        self.B_k_location = B_k_location
        self.B_k_estimation = B_k_estimation
        self.location_loops = location_loops
        self.estimation_loops = estimation_loops
        self.loop_threshold = loop_threshold
        self.tolerance_location = tolerance_location
        self.tolerance_estimation = tolerance_estimation
Ejemplo n.º 3
0
 def B_estimation(self):
     return utils.floor_to_pow2(self.BB_estimation)
Ejemplo n.º 4
0
 def B_location(self):
     return utils.floor_to_pow2(self.BB_location)
Ejemplo n.º 5
0
 def B_estimation(self):
     return utils.floor_to_pow2(self.BB_estimation)
Ejemplo n.º 6
0
 def B_location(self):
     return utils.floor_to_pow2(self.BB_location)