Skip to content
Snippets Groups Projects
updateSampleQC.m 918 B
Newer Older
function updateSampleQC( hTsgGUI, PARA )          
%
% Update the QC code for WS and EXT samples
%
% Input
% hTsgGui ........... Handle of the main GUI project
% ind ............... Indices of the QC modified in tsg.SSPS_SPL
%
% Ouput
% Date are updated throught the setappdata MAtlab function
%

% Get the tsgstructure from the application
% -----------------------------------------
tsg = getappdata( hTsgGUI, 'tsg_data');

% Update WS QC
% ------------
indWS = find( tsg.([PARA '_SPL_TYPE']) == 1 );
  tsg.([PARA '_WS_QC']) = tsg.([PARA '_SPL_QC'])(indWS);
indEXT = find( tsg.([PARA '_SPL_TYPE']) == 2 );
  tsg.([PARA '_EXT_QC']) = tsg.([PARA '_SPL_QC'])(indEXT);
end

% update the tsg structure in the application
% -------------------------------------------
setappdata( hTsgGUI, 'tsg_data', tsg );

end