Skip to content
Snippets Groups Projects
Verified Commit 735f6b68 authored by leprob001's avatar leprob001
Browse files

fix: Extrapolation for SatfixEtaToToa has added dates that have not been applied

parent 82454787
No related branches found
No related tags found
No related merge requests found
...@@ -48,12 +48,16 @@ for i = 1:length(fnames) ...@@ -48,12 +48,16 @@ for i = 1:length(fnames)
% therefore to get the unshifted values, we need to subtract the empirical shift % therefore to get the unshifted values, we need to subtract the empirical shift
unshiftedToas = artoaWorkspace.toaData.toa(selection) - artoaWorkspace.toaData.empiricalShift(selection); unshiftedToas = artoaWorkspace.toaData.toa(selection) - artoaWorkspace.toaData.empiricalShift(selection);
toaDates = ceil(artoaWorkspace.toaData.toaDate(selection)); toaDates = ceil(artoaWorkspace.toaData.toaDate(selection));
minToaDate = min(toaDates);
maxToaDate = max(toaDates);
if length(toaDates) > 1 if length(toaDates) > 1
% interpolate % interpolate
newToaDates = floor(launchDate):1:ceil(recoveryDate); newToaDates = floor(launchDate):1:ceil(recoveryDate);
toas = interp1(toaDates, toas, newToaDates, 'linear', 'extrap')'; toas = interp1(toaDates, toas, newToaDates, 'linear', 'extrap')';
unshiftedToas = interp1(toaDates, unshiftedToas, newToaDates, 'linear', 'extrap')'; unshiftedToas = interp1(toaDates, unshiftedToas, newToaDates, 'linear', 'extrap')';
toaDates = newToaDates'; toaDates = newToaDates';
toaDates = toaDates(minToaDate <= toaDates(:));
toaDates = toaDates(toaDates(:) <= maxToaDate);
end end
dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate); dates = intersect(toaDates, satfixEtas.(fnames{i}).satDate);
indicesToa = ismember(toaDates, dates); indicesToa = ismember(toaDates, dates);
......
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