function artdetect_edit

% --------------------------
%
% Helper function to artdetect4.  Grabs the edited outlier
% list from the edit box, then redraws the graphical
% outlier display.  No arguments or output, as befits a good
% callback.
% ------------------------------
% Jeff Cooper, Nov. 2002


%-------------------
% Interrogate GUI
% ------------------

handles = guihandles;
g = guidata(gcf);
out_string = get(handles.indexedit, 'String');
new_idx = round(str2num(out_string));
curr_thresh = str2num(get(handles.threshnum, 'String'));

% ------------------
% Update graphics
% ------------------


% Update graphics
subplot(5,1,2);
cla;
plot(abs(zscore(g)));
ylabel('std away from mean');

thresh_x = 1:length(g);
thresh_y = curr_thresh*ones(1,length(g));
line(thresh_x, thresh_y, 'Color', 'r');

axes_lim = get(gca, 'YLim');
axes_height = axes_lim(1):1:axes_lim(2);
for i = 1:length(new_idx)
    line((new_idx(i)*ones(1, length(axes_height))), axes_height, 'Color', 'r');
end

