function analyze_isolations(what)
% WHAT can be 'nom' to analyze all nominal experiments and 'fault' to analyze
% all fault experiments.

% list of experiments:
% aft means aft faults
% fwd means fwd faults
% nominal means no faults
% _f means the experiment was run with branch galene and the TRANS variable
% used to process it should be set to false.
% _t means the experiment was run with branch galene-whiplash-detection
% and the TRANS variable used to process it should be set to true.

  
  aft_f = {'2019-04-30-08-07-19'};
  fwd_f = {'2019-04-30-09-08-00'};
  nominal_f = {'2019-04-30-09-35-05'};
  nominal_t = {'2019-04-30-16-40-29',
      %	     '2019-05-01-08-33-16', % censor due to offset start
	       '2019-05-01-14-18-13',
	       '2019-05-07-13-43-18'};
  fwd_t = {'2019-05-07-14-57-52'};
  aft_t = {'2019-05-07-16-25-48'};

  % report the number of runs of 5 or more faults for each experiment
  
  if strcmp(what, 'nom')
    for k=1:length(nominal_t)
      [a, out, ~, ~, ~, ~] = analyze(char(nominal_t(k)), true, '.');
      [sum(out.runs0), sum(out.runs1), sum(out.runs2), sum(out.runs3)]
    end
    for k=1:length(nominal_f)
      [a, out, ~, ~, ~, ~] = analyze(char(nominal_f(k)), false, '.');
      [sum(out.runs0), sum(out.runs1), sum(out.runs2), sum(out.runs3)]
    end
  end


  if strcmp(what, 'fault')
    [a, out, ~, ~, ~, ~] = analyze(char(aft_f), false, '.');
    [sum(out.runs0), sum(out.runs1), sum(out.runs2), sum(out.runs3)]

    [a, out, ~, ~, ~, ~] = analyze(char(fwd_f), false, '.');
    [sum(out.runs0), sum(out.runs1), sum(out.runs2), sum(out.runs3)]

    [a, out, ~, ~, ~, ~] = analyze(char(aft_t), true, '.');
    [sum(out.runs0), sum(out.runs1), sum(out.runs2), sum(out.runs3)]

    [a, out, ~, ~, ~, ~] = analyze(char(fwd_t), true, '.');
    [sum(out.runs0), sum(out.runs1), sum(out.runs2), sum(out.runs3)]
  end

end
