Skip to content
Snippets Groups Projects
Commit 20df4672 authored by leprob001's avatar leprob001
Browse files

Bugfixes in show SATFIX-ETA to TOA plot.

parent 1ac79113
No related branches found
No related tags found
No related merge requests found
258 259
\ No newline at end of file \ No newline at end of file
...@@ -17,28 +17,19 @@ fnames = fieldnames(artoaWorkspace.filteredSoundsources); ...@@ -17,28 +17,19 @@ fnames = fieldnames(artoaWorkspace.filteredSoundsources);
results = struct(); results = struct();
for i = 1:length(fnames) for i = 1:length(fnames)
if ~artoa.soundsources.hasAppliedToa(fnames{i}, artoaWorkspace.toaData.soundSource)
continue;
end
results.(fnames{i}) = struct(); results.(fnames{i}) = struct();
results.(fnames{i}).difference = []; results.(fnames{i}).difference = [];
selection = strcmp(artoaWorkspace.toaData.soundSource, fnames(i)); selection = strcmp(artoaWorkspace.toaData.soundSource, fnames(i));
toas = artoaWorkspace.toaData.toa(selection); toas = artoaWorkspace.toaData.toa(selection);
toaDates = ceil(artoaWorkspace.toaData.toaDate(selection)); toaDates = ceil(artoaWorkspace.toaData.toaDate(selection));
if length(toaDates) > 1 if length(toaDates) > 1
% interpolate toa data
[ ...
toaDates, ...
toas, ...
~ ...
] = artoa.data.interpolateRafosData( ...
toaDates, ...
toas, ...
artoaWorkspace.trackParameter.interpolationInterval, ...
artoaWorkspace.trackParameter.gapSize, ...
lower(artoaWorkspace.trackParameter.interpolationMethodString) ...
);
% interpolate % interpolate
%toas = interp1(toaDates, toas, min(toaDates):1:max(toaDates))'; toas = interp1(toaDates, toas, min(toaDates):1:max(toaDates))';
%toaDates = min(toaDates):1:max(toaDates)'; toaDates = [min(toaDates):1:max(toaDates)]';
end end
dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate); dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate);
indicesToa = ismember(toaDates, dates); indicesToa = ismember(toaDates, dates);
......
...@@ -11,13 +11,15 @@ global artoaGui artoaWorkspace; ...@@ -11,13 +11,15 @@ global artoaGui artoaWorkspace;
figureName = artoaGui.figures.satfixEtaToToa; figureName = artoaGui.figures.satfixEtaToToa;
clf(figureName);
axes(figureName); axes(figureName);
hold(figureName.CurrentAxes, 'on'); hold(figureName.CurrentAxes, 'on');
grid(figureName.CurrentAxes, 'on'); grid(figureName.CurrentAxes, 'on');
fnames = fieldnames(artoaWorkspace.filteredSoundsources); fnames = fieldnames(artoaWorkspace.filteredSoundsources);
legendNames = {}; legendNames = {};
for i = 1:length(fnames) for i = 1:length(fnames)
if isempty(results.(fnames{i}).difference) if ~artoa.soundsources.hasAppliedToa(fnames{i}, artoaWorkspace.toaData.soundSource) | isempty(results.(fnames{i}).difference)
continue; continue;
end end
color = artoa.soundsources.colorregister.getColor( ... color = artoa.soundsources.colorregister.getColor( ...
...@@ -41,6 +43,5 @@ xlabel(figureName.CurrentAxes, 'Rafos date'); ...@@ -41,6 +43,5 @@ xlabel(figureName.CurrentAxes, 'Rafos date');
ylabel(figureName.CurrentAxes, 'Difference [s]') ylabel(figureName.CurrentAxes, 'Difference [s]')
hold(figureName.CurrentAxes, 'off'); hold(figureName.CurrentAxes, 'off');
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment