Commit 14064319 authored by Ling Sun's avatar Ling Sun
Browse files

minor changes on comments

parent 8d7c3e34
......@@ -20,7 +20,7 @@ function [b,h] = binaryfilter(f,f0,P,a0)
% h - Comb matched filter (not used in the current search)
c = 2*pi*a0*f0;
% Take a wider range [-N N] for calculation
% Take a wider range [-N N] for calculation (100 is a random extended width for c)
N = ceil(c)+100;
n = -N:N;
b0 = besselj(n,c);
......@@ -38,4 +38,3 @@ b(k) = abs(b0).^2;
% Set comb matched filter, which can be used for a C-stat search
h = zeros(M,1);
h(k) = 1;
......@@ -20,14 +20,15 @@ function [f, X, N, T] = readfstats(dirName, startFreq, steps)
% N - Total number of bins
% T - Total number of steps
X = [];
for n = 1:steps
fileName = ['Fstat-' num2str(startFreq) '-' num2str(n-1) '.dat']
try
fstatData = load([dirName fileName]);
% Read the 7th column as Fstat values
X(:,n) = fstatData(:,7);
% Read the 1st column as frequency bins
f = fstatData(:,1);
catch
disp(sprintf('Failed to read step %g',n))
......
......@@ -53,8 +53,8 @@ for m=1:length(g)
end
% Get the optimal path for all asini searched
%[maxsc, a0ind] = max(sc)
%path = path0(a0ind,:)
% [maxsc, a0ind] = max(sc)
% path = path0(a0ind,:)
% Save output file for each 1-Hz sub-band
fid = fopen(outfile,'wt');
......
......@@ -18,15 +18,16 @@ function [path,delta,psi,score] = viterbi_colFLT(M, obslik)
% score - Number of standard deviations above the mean value of log
% likelihood of paths to all the states at the final step
% If M is even, increase M by 1
if round(M/2)==M/2
M = M+1;
end
% Q bins, T steps
[Q,T] = size(obslik);
[Q,T] = size(obslik); % Q bins, T steps
path = zeros(1,T);
delta = zeros(Q,T);
psi = zeros(Q,T);
path = zeros(1,T);
% Using Matlab function colfilt, which rearranges each Mx1 block
% of delta into a column of a temporary matrix and then applies
......@@ -50,8 +51,6 @@ end
% Optimal path backtracking
[sc, path(T)] = max(delta(:,T));
score = (sc-mean(delta(:,T)))/std(delta(:,T));
for t=T-1:-1:1
path(t) = psi(path(t+1),t+1);
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment