function [flaggedX, flaggedY] = read_eda2_flags(filename)
% READ_EDA2_FLAGS  returns indices of antennas that are flagged in EDA2
% config file
%   filename:   name of the config text file
    fid = fopen(filename);
    file = textscan(fid,'%d %d %s %d %d','CommentStyle','#');
    flags = file{5};
    xflags = flags(1:2:end);
    yflags = flags(2:2:end);
    flaggedX = find(xflags);
    flaggedY = find(yflags);
end
