Skip to content
Snippets Groups Projects
Commit 28a0595f authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Updated header to show it with help.

parent 340cd7d0
No related branches found
No related tags found
No related merge requests found
Showing
with 100 additions and 87 deletions
...@@ -18,8 +18,12 @@ ...@@ -18,8 +18,12 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>. % along with this program. If not, see <http://www.gnu.org/licenses/>.
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: R. de Wild, 2015 % Author: R. de Wild, 2015 (Original)
% E. Kooistra, 2016 % E. Kooistra, 2016
%
% Purpose : Calculate FIR filter coefficients for Apertif channel
% filterbank using fircls1.
% Description :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% workspace initiation % workspace initiation
......
...@@ -19,11 +19,12 @@ ...@@ -19,11 +19,12 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : BSN source per block of data % Purpose : BSN source per block of data
% Description : % Description :
function [state] = bsn_source(ctrl) function [state] = bsn_source(ctrl)
% Increment BSN for next call % Increment BSN for next call
state = ctrl; state = ctrl;
state.bsn = ctrl.bsn + 1; state.bsn = ctrl.bsn + 1;
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Delay tracking per block of data % Purpose : Delay tracking per block of data
% Description : % Description :
% %
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
% * Index = Time + 1, because for Matlab index starts at 1 instead of at 0. % * Index = Time + 1, because for Matlab index starts at 1 instead of at 0.
function [state, out_data] = dt(ctrl, in_data) function [state, out_data] = dt(ctrl, in_data)
% Data processing % Data processing
N = ctrl.block_size; N = ctrl.block_size;
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>. % along with this program. If not, see <http://www.gnu.org/licenses/>.
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016
%
% Purpose: % Purpose:
% Plot the fringe due to the varying difference in geometrical delay. % Plot the fringe due to the varying difference in geometrical delay.
% Description: % Description:
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: W. Lubberhuizen, 2015 (top.m for LOFAR Station, uses classes) % Author: W. Lubberhuizen, 2015 (top.m for LOFAR Station, uses classes)
% Eric Kooistra, 2016 % Eric Kooistra, 2016 (for Apertif)
%
% Purpose : Model data path for delay tracking with polyphase filterbank % Purpose : Model data path for delay tracking with polyphase filterbank
% Description : % Description :
% * General % * General
......
...@@ -19,11 +19,12 @@ ...@@ -19,11 +19,12 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : FFT per block of data % Purpose : FFT per block of data
% Description : % Description :
function [out_data] = pfft(ctrl, in_data) function [out_data] = pfft(ctrl, in_data)
% Data processing % Data processing
out_data = fft(in_data, ctrl.fft_size); out_data = fft(in_data, ctrl.fft_size);
......
...@@ -19,11 +19,12 @@ ...@@ -19,11 +19,12 @@
% %
%-------------------------------------------------------------------------- %--------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Polyphase FIR filter per block of data % Purpose : Polyphase FIR filter per block of data
% Description : % Description :
function [state, out_data] = pfir(ctrl, in_data) function [state, out_data] = pfir(ctrl, in_data)
% Data processing % Data processing
for t = 1:ctrl.downsample_factor for t = 1:ctrl.downsample_factor
[out_data(t), ctrl.Zdelays(t,:)] = filter(ctrl.coeff(t,:), 1, in_data(t), ctrl.Zdelays(t,:)); % range ctrl.nof_taps coefficients and range ctrl.nof_taps-1 Zdelays [out_data(t), ctrl.Zdelays(t,:)] = filter(ctrl.coeff(t,:), 1, in_data(t), ctrl.Zdelays(t,:)); % range ctrl.nof_taps coefficients and range ctrl.nof_taps-1 Zdelays
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: W. Lubberhuizen, 2005 % Author: W. Lubberhuizen, 2005
% E. Kooistra, 2016 % E. Kooistra, 2016
%
function coeff = pfir_coeff(N, L, BWchan, r_pass, r_stop, nof_bits, config)
% pfir_coeff - compute polyphase filterbank coefficients % pfir_coeff - compute polyphase filterbank coefficients
% Computes the coefficients for a polyphase filterbank with N fft % Computes the coefficients for a polyphase filterbank with N fft
% channels, and subfilter length L and channel bandwidth BWchan. % channels, and subfilter length L and channel bandwidth BWchan.
...@@ -38,6 +37,8 @@ function coeff = pfir_coeff(N, L, BWchan, r_pass, r_stop, nof_bits, config) ...@@ -38,6 +37,8 @@ function coeff = pfir_coeff(N, L, BWchan, r_pass, r_stop, nof_bits, config)
% The returned value is a matrix of dimension (NxL) % The returned value is a matrix of dimension (NxL)
% The run_pfir_coeff.m shows how this pfir_coeff.m can be used. % The run_pfir_coeff.m shows how this pfir_coeff.m can be used.
function coeff = pfir_coeff(N, L, BWchan, r_pass, r_stop, nof_bits, config)
% requested filter length % requested filter length
M2=N*L; M2=N*L;
if strcmp(config.design, 'fir1') if strcmp(config.design, 'fir1')
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>. % along with this program. If not, see <http://www.gnu.org/licenses/>.
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016
%
% Purpose: % Purpose:
% Plot the phase tracking (PT) phase and phase erroras function of the % Plot the phase tracking (PT) phase and phase erroras function of the
% varying geometrical delay. % varying geometrical delay.
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
function out_data = quantize(in_data, in_max, nof_bits, direction, overflow)
% quantize - quantize signed input data % quantize - quantize signed input data
% The output has nof_bits. % The output has nof_bits.
% Internally in_max maps to 2^(nof_bits-1)-1. % Internally in_max maps to 2^(nof_bits-1)-1.
...@@ -33,6 +32,8 @@ function out_data = quantize(in_data, in_max, nof_bits, direction, overflow) ...@@ -33,6 +32,8 @@ function out_data = quantize(in_data, in_max, nof_bits, direction, overflow)
% . 'wrap' : Wrap within nof_bits signed integer range % . 'wrap' : Wrap within nof_bits signed integer range
% The output data range is scaled back to the original in_max. % The output data range is scaled back to the original in_max.
function out_data = quantize(in_data, in_max, nof_bits, direction, overflow)
if ~exist('direction', 'var'); direction = 'half_away'; end; if ~exist('direction', 'var'); direction = 'half_away'; end;
if ~exist('overflow', 'var'); overflow = 'clip'; end; if ~exist('overflow', 'var'); overflow = 'clip'; end;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Run pfir_coeff % Purpose : Run pfir_coeff
% Description : % Description :
% Plot FIR filter coefficients and transfer function. % Plot FIR filter coefficients and transfer function.
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Image spectrum per block of data % Purpose : Image spectrum per block of data
% Description : % Description :
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Try quantize.m % Purpose : Try quantize.m
% Description : % Description :
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Try uencode to determine optimum quantisation % Purpose : Try uencode to determine optimum quantisation
% Description : % Description :
% Remark : It seems more appropriate to use round() instead of uencode(), % Remark : It seems more appropriate to use round() instead of uencode(),
......
...@@ -19,13 +19,14 @@ ...@@ -19,13 +19,14 @@
% %
%----------------------------------------------------------------------------- %-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016 % Author: E. Kooistra, 2016
%
% Purpose : Waveform generator per block of data % Purpose : Waveform generator per block of data
% Description : % Description :
% The WG data is normalized to -1:1. Data outside this range is clipped, % The WG data is normalized to -1:1. Data outside this range is clipped,
% so use ampl >> 1 to create square wave. % so use ampl >> 1 to create square wave.
function [state, data] = wg(ctrl) function [state, data] = wg(ctrl)
% Data processing % Data processing
t = 0:ctrl.block_size-1; t = 0:ctrl.block_size-1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment