function [ ACER, CI, bar_X, bar_Y ] = cutter( ACER, CI, bar_X, bar_Y, eta_X, eta_Y, delta )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
%% cutting from the tail marker eta_1
% bivariate
condX = (bar_X > eta_X);
bar_X = bar_X(condX);

condY = (bar_Y > eta_Y);
bar_Y = bar_Y(condY);

ACER = ACER(condY,condX);
CI = CI(condY,condX);

% Dxy_hat_mean = Dxy_hat_mean(condXY);
% CI_Dxy = CI_Dxy(condXY);
clear condX condY


%% cutting after delta
% bivariate
condXY = ( CI < (ACER)*delta );
[~, r ,c] = BIupdcond(condXY);
ACER = ACER(1:r,1:c);
CI = CI(1:r,1:c);
bar_X = bar_X(1:c);
bar_Y = bar_Y(1:r);
% Dxy_hat_mean = Dxy_hat_mean(condXY);
% CI_Dxy = CI_Dxy(condXY);
clear condXY c r

end

