Skip to content
Snippets Groups Projects
Select Git revision
  • 5cda671c66f87e437260b946be9c2d8d65a05207
  • master default protected
  • L2SS-2357-fix-ruff
  • sync-up-with-meta-pypcc
  • control-single-hba-and-lba
  • stabilise-landing-page
  • all-stations-lofar2
  • v0.39.7-backports
  • Move-sdptr-to-v1.5.0
  • fix-build-ubuntu
  • tokens-in-env-files
  • fix-build
  • L2SS-2214-deploy-cdb
  • fix-missing-init
  • add-power-hardware-apply
  • L2SS-2129-Add-Subrack-Routine
  • Also-listen-internal-to-rpc
  • fix-build-dind
  • L2SS-2153--Improve-Error-Handling
  • L2SS-2153-Add-Grpc-Gateway-support
  • L2SS-1970-apsct-lol
  • remove-snmp-client
  • v0.52.3 protected
  • v0.52.3dev0 protected
  • 0.53.1dev0
  • v0.52.2-rc3 protected
  • v0.52.2-rc2 protected
  • v0.52.2-rc1 protected
  • v0.52.1.1 protected
  • v0.52.1 protected
  • v0.52.1-rc1 protected
  • v0.51.9-6 protected
  • v0.51.9-5 protected
  • v0.51.9-4 protected
  • v0.51.9-3 protected
  • v0.51.9-2 protected
  • v0.51.9-1 protected
  • v0.51.9 protected
  • v0.51.8 protected
  • v0.39.15-wsrttwo protected
  • v0.39.15-wsrt protected
41 results

comms_client.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    try_quantize.m 2.00 KiB
    %-----------------------------------------------------------------------------
    %
    % Copyright (C) 2016
    % ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
    % P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
    %
    % This program 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 of the License, or
    % (at your option) any later version.
    %
    % This program 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 program.  If not, see <http://www.gnu.org/licenses/>.
    %
    %-----------------------------------------------------------------------------
    % Author: E. Kooistra, 2016
    %
    % Purpose : Try quantize.m
    % Description :
    
    clear all;
    close all;
    fig=0;
    
    % User settings
    nof_bits = 3;
    
    x_period = 2^nof_bits;
    x_max = 2^(nof_bits-1)-1;
    x_step = 0.5;
    %x_step = 1;
    x = -2*x_period:x_step:2*x_period-1;
    
    y_half_away_wrap = quantize(x, x_max, nof_bits, 'half_away', 'wrap');
    y_half_away_clip = quantize(x, x_max, nof_bits, 'half_away', 'clip');
    y_half_up_wrap = quantize(x, x_max, nof_bits, 'half_up', 'wrap');
    y_half_up_clip = quantize(x, x_max, nof_bits, 'half_up', 'clip');
    
    % Plot
    fig=fig+1;
    figure('position', [300+fig*20 200-fig*20 1000 800]);
    figure(fig);
    plot(x, y_half_away_wrap, 'kx', x, y_half_away_clip, 'ro');
    ylim([-x_period/2-0.5 x_period/2+0.5])
    title(['Quantisation with half away and ', num2str(nof_bits), ' bits'] );
    grid on;
    
    fig=fig+1;
    figure('position', [300+fig*20 200-fig*20 1000 800]);
    figure(fig);
    plot(x, y_half_up_wrap, 'kx', x, y_half_up_clip, 'ro');
    ylim([-x_period/2-0.5 x_period/2+0.5])
    title(['Quantisation with half up and ', num2str(nof_bits), ' bits'] );
    grid on;