thresholds;
files = dir('fdi*.hdf5');
for file = files'
  fname = file.name;
load_hdf;
  alarms = [sum(r0>threshold0),
	       sum(r1>threshold1), 
	       sum(r2>threshold2), 
	       sum(r3>threshold3)];
alarms'
  end
