function QC_ACS_by_std(filenames, thresh_a440, thresh_c535)

% awl = 10;
% cwl = 30;


for kf = 1:length(filenames)

    load(filenames{kf})

    tmp = (acs_c.std(:,30) > thresh_c535) | (acs_a.std(:,10) > thresh_a440);

    acs_c.med(tmp,:) = NaN;
    acs_c.mean(tmp,:) = NaN;
    acs_c.std(tmp,:) = NaN;
    acs_c.ns(tmp) = NaN;
    acs_c.nsclean(tmp) = NaN;

    acs_a.med(tmp,:) = NaN;
    acs_a.mean(tmp,:) = NaN;
    acs_a.std(tmp,:) = NaN;
    acs_a.ns(tmp) = NaN;
    acs_a.nsclean(tmp) = NaN;

    save(filenames{kf}, 'acs_c','acs_a')
    
end