Skip to content
Snippets Groups Projects
Commit 8602bafe authored by Grant David Meadors's avatar Grant David Meadors
Browse files

Made changes that should fix the remaining bugs. I check to see if there are...

Made changes that should fix the remaining bugs. I check to see if there are any anomalous frames and, in the rare cases where there are, I think an adjustment to the frame head or tail tau variables should suffice.
parent 9a88e9a2
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ classdef AddendaEditor < handle ...@@ -21,6 +21,7 @@ classdef AddendaEditor < handle
baselineCheck baselineCheck
site site
siteFull siteFull
oddFrameWarning
end end
methods methods
...@@ -45,7 +46,7 @@ classdef AddendaEditor < handle ...@@ -45,7 +46,7 @@ classdef AddendaEditor < handle
addenda.site = siteName; addenda.site = siteName;
addenda.siteFull = strcat('L', siteName, 'O'); addenda.siteFull = strcat('L', siteName, 'O');
end end
function initialFixer(addenda, tSub, T) function initialFixer(addenda, oddFrameWarning, tSub, T)
tau1 = floor(tSub.tStart(1) / T.s)*T.s; tau1 = floor(tSub.tStart(1) / T.s)*T.s;
tau2 = ceil(tSub.tEnd(1) / T.s)*T.s; tau2 = ceil(tSub.tEnd(1) / T.s)*T.s;
if tSub.tStart(1) == tau1 if tSub.tStart(1) == tau1
...@@ -65,6 +66,7 @@ classdef AddendaEditor < handle ...@@ -65,6 +66,7 @@ classdef AddendaEditor < handle
else else
addenda.frameTailFlag = 1; addenda.frameTailFlag = 1;
end end
addenda.oddFrameWarning = oddFrameWarning;
end end
function loopFixer(addenda, Hoft, jj, tSub) function loopFixer(addenda, Hoft, jj, tSub)
if jj == length(tSub.tStart) if jj == length(tSub.tStart)
...@@ -87,6 +89,7 @@ classdef AddendaEditor < handle ...@@ -87,6 +89,7 @@ classdef AddendaEditor < handle
addenda.passPRC = Hoft.passPRC; addenda.passPRC = Hoft.passPRC;
clear Hoft.passPRC clear Hoft.passPRC
end end
addenda.oddFrameWarning = Hoft.oddFrameWarning;
end end
function initialPRC(addenda, aFirstHoft) function initialPRC(addenda, aFirstHoft)
addenda.PRCfilter = 1; addenda.PRCfilter = 1;
......
...@@ -55,7 +55,30 @@ classdef Data < handle ...@@ -55,7 +55,30 @@ classdef Data < handle
else else
channels.tau2 = channels.t(2); channels.tau2 = channels.t(2);
end end
% In a few rare cases, the frame files are of inconsistent length
% We check for this with the odd frame warning and adjust the tau,
% which are supposed to correctly correspond to the start and stop
% of frame files on disk, to match what ligo_data_find has told
% us are available, as written out to the cache files and then
% made into the oddFrameWarning flag.
% These errors only seem to occur in specific cases, so this fix
% is also quite specific
for ii = length(addenda.oddFrameWarning)
if str2num(addenda.oddFrameWarning(ii).DUR) ~= addenda.s
if str2num(addenda.oddFrameWarning(ii).GPS) == channels.t(1)
channels.tau1
channels.tau1 = channels.t(1);
channels.tau1
end
if str2num(addenda.oddFrameWarning(ii).GPS) +...
str2num(addenda.oddFrameWarning(ii).DUR)...
== channels.t(2)
channels.tau2
channels.tau2 = t(2);
channels.tau2
end
end
end
% Find how far shifted the signal is into the science segment % Find how far shifted the signal is into the science segment
channels.durationHead =... channels.durationHead =...
channels.t(1) - floor(channels.t(1)/addenda.s) * addenda.s; channels.t(1) - floor(channels.t(1)/addenda.s) * addenda.s;
......
...@@ -50,6 +50,7 @@ classdef HoftEditor < handle ...@@ -50,6 +50,7 @@ classdef HoftEditor < handle
site site
siteFull siteFull
excessFrameAppliedFlag excessFrameAppliedFlag
oddFrameWarning
end end
methods methods
...@@ -89,6 +90,15 @@ classdef HoftEditor < handle ...@@ -89,6 +90,15 @@ classdef HoftEditor < handle
% files that the program is being told to process % files that the program is being told to process
Hoft.site = listContents(1); Hoft.site = listContents(1);
Hoft.siteFull = strcat('L', listContents(1), 'O'); Hoft.siteFull = strcat('L', listContents(1), 'O');
% Let us do a bit of list processing to determine if there are any
% frames of unusual length.
regExOut = regexp(listContents,'-(?<GPS>\d+)-(?<DUR>\d+)\.','names');
Hoft.oddFrameWarning = [];
for ii = 1:length(regExOut)
if str2num(regExOut(ii).DUR) ~= T.s
Hoft.oddFrameWarning = [Hoft.oddFrameWarning; regExOut(ii)] ;
end
end
Hoft.T = T; Hoft.T = T;
Hoft.tStart = tSub.tStart(1); Hoft.tStart = tSub.tStart(1);
Hoft.tEnd = tSub.tEnd(1); Hoft.tEnd = tSub.tEnd(1);
...@@ -133,7 +143,7 @@ classdef HoftEditor < handle ...@@ -133,7 +143,7 @@ classdef HoftEditor < handle
%end %end
function initialMICH(Hoft, T, tSub, addenda) function initialMICH(Hoft, T, tSub, addenda)
addenda.initialFixer(tSub, T); addenda.initialFixer(Hoft.oddFrameWarning, tSub, T);
% Call the filter function itself % Call the filter function itself
aFirstHoft = aletheia(tSub.tStart(1), tSub.tEnd(1), addenda); aFirstHoft = aletheia(tSub.tStart(1), tSub.tEnd(1), addenda);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment